PHP Classes

Stacked values

Recommend this page to a friend!

      baaChart  >  All threads  >  Stacked values  >  (Un) Subscribe thread alerts  
Subject:Stacked values
Summary:Maximum value ignored in stacked cols chart
Messages:4
Author:Jamppu Kalske
Date:2006-08-02 22:54:29
Update:2006-08-14 21:58:37
 

 


  1. Stacked values   Reply   Report abuse  
Picture of Jamppu Kalske Jamppu Kalske - 2006-08-02 22:54:29
Can anyone say why max value is changed to 35 on the output in following sample?

include('baaChart.php');
$mygraph = new baaChart(600);
$mygraph->setTitle('Regional Sales','Jan - Jun 2002');
$mygraph->setXLabels("Jan,Feb,Mar,Apr,May,Jun");
$mygraph->addDataSeries('C',COLS_STACKED,"0,0,10","South");
$mygraph->addDataSeries('C',0,"0,10,0","East");
$mygraph->addDataSeries('C',0,"10,0,0","West");
$mygraph->setBgColor(0,0,0,1); //transparent background
$mygraph->setChartBgColor(0,0,0,1); //as background
$mygraph->setXAxis("Month",1);
$mygraph->setYAxis("Sales (£000)",0,10,5,1);
$mygraph->drawGraph();

It looks stupid when the actual maximum is 10 but the graph is showing the grid up to 35

  2. Re: Stacked values   Reply   Report abuse  
Picture of Barry Andrew Barry Andrew - 2006-08-05 14:38:02 - In reply to message 1 from Jamppu Kalske
It currently accumulates series maxima when calculating the chart maximum. Will change to find column max.

  3. Re: Stacked values   Reply   Report abuse  
Picture of Jamppu Kalske Jamppu Kalske - 2006-08-05 15:49:42 - In reply to message 2 from Barry Andrew
Thanks Barry!

Great class! It is wery simple to use, but still relatively wide in features. I've tested quite many different graphing solutions for PHP, this one is the best I've seen. Good job!

  4. Re: Stacked values   Reply   Report abuse  
Picture of Barry Andrew Barry Andrew - 2006-08-14 21:58:37 - In reply to message 3 from Jamppu Kalske
Now fixed if you want to download revised version