From 6aa4e6aa8f34359f49a0b7ccf8f6e3379f7fb401 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Dec 2007 18:37:12 +0000 Subject: [PATCH] Fix: Graph ko avec php4 --- htdocs/dolgraph.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/dolgraph.class.php b/htdocs/dolgraph.class.php index eefc49d4ca2..cebcfa48c1a 100644 --- a/htdocs/dolgraph.class.php +++ b/htdocs/dolgraph.class.php @@ -139,6 +139,10 @@ class DolGraph { dolibarr_syslog("DolGraph.class::draw_artichow this->type=".$this->type); + if (! defined('SHADOW_RIGHT_TOP')) define('SHADOW_RIGHT_TOP',3); + if (! defined('LEGEND_BACKGROUND')) define('LEGEND_BACKGROUND',2); + if (! defined('LEGEND_LINE')) define('LEGEND_LINE',1); + // Create graph $class=''; if ($this->type == 'bars') $class='BarPlot'; @@ -225,7 +229,7 @@ class DolGraph if ($this->mode == 'depth') $plot->setBarSpace(2); $plot->barShadow->setSize($this->SetShading); - $plot->barShadow->setPosition(Shadow::RIGHT_TOP); + $plot->barShadow->setPosition(SHADOW_RIGHT_TOP); $plot->barShadow->setColor(new Color(160, 160, 160, 50)); $plot->barShadow->smooth(TRUE); //$plot->setSize(1, 0.96); @@ -258,8 +262,8 @@ class DolGraph if (sizeof($this->Legend)) { - if ($this->type == 'bars') $group->legend->add($plot, $this->Legend[$i], Legend::BACKGROUND); - if ($this->type == 'lines') $group->legend->add($plot, $this->Legend[$i], Legend::LINE); + if ($this->type == 'bars') $group->legend->add($plot, $this->Legend[$i], LEGEND_BACKGROUND); + if ($this->type == 'lines') $group->legend->add($plot, $this->Legend[$i], LEGEND_LINE); } $group->add($plot);