PHP Classes


Recommend this page to a friend!

      CGraph  >  All threads  >  Linegraph  >  (Un) Subscribe thread alerts  
Summary:Linegraph hanging with text as keys
Author:Marco Abiuso
Date:2005-05-23 07:22:22
Update:2007-08-30 00:26:06

  1. Linegraph   Reply   Report abuse  
Picture of Marco Abiuso Marco Abiuso - 2005-05-23 07:22:22
I've discovered LineGraph CGraph class have problems when the data keys are text, while the others like 3dbargraph do not.
Would anyone be able to fix this problem in the LineGraph class?


data {
A = -3
3 = 5
C = 0
D = 7
5 = 10

Data with letters as keys do not appear.
If all the keys are text, the DrawGraph function hangs.

This example works perfectly with 3dbargraph class


  2. Re: Linegraph   Reply   Report abuse  
Picture of matt brookes matt brookes - 2007-01-31 08:59:18 - In reply to message 1 from Marco Abiuso
I have found the same problem. I will take a look as I need text labels as well.

But I also can't work out how to display more than one series in any of the graphs. Do you know if it supports more than one series?

  3. Re: Linegraph   Reply   Report abuse  
Picture of Sky Sky - 2007-08-30 00:26:06 - In reply to message 2 from matt brookes
As far as I can tell, it's not possible to display more than one series. I have another issue with the script that I'm trying to work out. I'm using this to graph dynamic data and every once in a while the data is consistent across the series (meaning the same values for all). The script locks up at this point and generates a division by zero error. I've wrapped line 472 in class.graph.php to catch this error but it still locks up because miny and maxy are the same. I'm trying to work around it, but not having much luck.