From a30726216fa6ecf0f01f1e355fc5328c226d5132 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 25 Nov 2003 10:22:44 +0000 Subject: [PATCH] Modif le nombre de ligne automatiquement --- htdocs/bargraph.class.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/htdocs/bargraph.class.php b/htdocs/bargraph.class.php index ee18d45a5ed..ac24545b71d 100644 --- a/htdocs/bargraph.class.php +++ b/htdocs/bargraph.class.php @@ -61,8 +61,22 @@ class BarGraph extends Graph Function draw($file, $data, $title='') { $this->prepare($file, $data, $title); + + if (substr($this->MaxValue,0,1) == 1) + { + $this->graph->SetNumVertTicks(10); + } + elseif (substr($this->MaxValue,0,1) == 2) + { + $this->graph->SetNumVertTicks(4); + } + else + { + $this->graph->SetNumVertTicks(substr($this->MaxValue,0,1)); + } + + - //Draw it $this->graph->DrawGraph(); } }