From a307e701540dd31f43b8e7c91708514038c2c9a2 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 24 Nov 2003 08:40:20 +0000 Subject: [PATCH] Modification des graphs --- htdocs/commande/stats/month.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/stats/month.php b/htdocs/commande/stats/month.php index 3e02ff80d96..c66839b9a9b 100644 --- a/htdocs/commande/stats/month.php +++ b/htdocs/commande/stats/month.php @@ -47,10 +47,11 @@ $dir = DOL_DOCUMENT_ROOT; $data = $stats->getNbCommandeByMonth($year); -$filev = "/document/images/commande.png"; +$filev = "/document/images/commande$year.png"; -$px = new Graph(); -$px->SetWidth(450); +$px = new Graph($data); +$px->SetMaxValue($px->GetMaxValue()); +$px->SetWidth(500); $px->SetHeight(280); $px->SetYLabel("Nombre de commande"); $px->draw($dir.$filev, $data, $year); @@ -68,7 +69,10 @@ for ($i = 1 ; $i < 13 ; $i++) $file_amount = "/document/images/commandeamount.png"; -$px = new Graph(); +$px = new Graph($data); +$px->SetMaxValue($px->GetAmountMaxValue()); +$px->SetWidth(500); +$px->SetHeight(250); $px->SetYLabel("Montant des commande"); $px->draw($dir.$file_amount, $data, $year); @@ -81,7 +85,10 @@ for ($i = 1 ; $i < 13 ; $i++) $data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]); } $file_avg = "/document/images/commandeaverage.png"; -$px = new Graph(); +$px = new Graph($data); +$px->SetMaxValue($px->GetAmountMaxValue()); +$px->SetWidth(500); +$px->SetHeight(250); $px->SetYLabel("Montant moyen des commande"); $px->draw($dir.$file_avg, $data, $year);