Thread: PHP GD Graphs
View Single Post
Old 04-05-2008, 01:01 PM   #3 (permalink)
crazyryan
The Contributor
 
Join Date: Dec 2007
Posts: 27
Thanks: 0
crazyryan is on a distinguished road
Default

Ok cool. I downloaded sparkline and looked at some of the examples and samples/deficit.php seems to be what retailmenot are using, or atleast thats what the procuded graph looks like.

In deficit.php they have this:
PHP Code:
$data = array(1983 => 207.802,
              
1984 => -185.367,
              
1985 => -212.308,
              
1986 => -221.215,
              
1987 => -149.728,
              
1988 => -155.152,
              
1989 => -152.456,
              
1990 => -221.195,
              
1991 => -269.328,
              
1992 => -290.376,
              
1993 => -255.087,
              
1994 => -203.250,
              
1995 => -163.972,
              
1996 => -107.473,
              
1997 =>  -21.958,
              
1998 =>   69.213,
              
1999 =>  125.563,
              
2000 =>  236.445,
              
2001 =>  127.299,
              
2002 => -157.802,
              
2003 => -304.159); 
I edited some of the values and thats whats being shown in the graph. How would I put my data into that, I guess I need to work out the percentage in a week or every 2 weeks or something, and then put it into that array?
crazyryan is offline  
Reply With Quote