From d850290f6ab39e15778cf63aaaa8c6e9cb3f3625 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Tue, 10 Apr 2007 11:52:03 +0000 Subject: [PATCH] Fix: Si pas de legend on affiche pas. --- htdocs/dolgraph.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/dolgraph.class.php b/htdocs/dolgraph.class.php index be6673090df..a82eff456e9 100644 --- a/htdocs/dolgraph.class.php +++ b/htdocs/dolgraph.class.php @@ -367,7 +367,7 @@ class DolGraph if ($phplotversion >= 5) $top_space=25; $left_space=80; // For y labels $right_space=10; // If no legend - if (isset($this->Legend)) + if (isset($this->Legend) && sizeof($this->Legend)) { foreach($this->Legend as $key => $val) { @@ -390,7 +390,7 @@ class DolGraph if (isset($this->title)) $this->graph->SetTitle($this->title); // D�fini position du graphe (et legende) au sein de l'image - if (isset($this->Legend)) + if (isset($this->Legend) && sizeof($this->Legend)) { $this->graph->SetLegendPixels($this->width - $right_space+8,40,''); $this->graph->SetLegend($this->Legend); -- GitLab