|
HTML_Graphs
Tim Perdue
When I compiled PHP on my LinuxPPC box, I didn't have GD installed and
didn't want to add another layer of complexity by compiling it in. GD
will let you do all kinds of cool things - creating gifs, complex charts, etc,
if you use libraries from the Sample Code Archive here on this site and PHP's
built in functionality.
I didn't want the lack of GD to stifle me too much, so I started hunting around
for a way to generate html-based graphs and charts. Fortunately, someone
had already gone to the trouble of writing up a class to handle that.
Phil Davis at
WebGuys
provided a nifty class called HTML_Graphs.
At first, I was a little taken back by the complexity of the class. It does
all kinds of things, from vertical bar charts to multiple horizontal bar charts.
Because I knew I was going to use the class a lot, I spent some time creating a
couple of wrapper functions.
Many of the functions of the class don't need to be used for basic graphing,
which is what I am showing here. For instance, I don't see any need to
go into detail on creating multiple charts at once. And vertical charts
are created as easily as horizontal charts - just change the "type" parameter
in the GraphIt() function that I detail elsewhere.
So let's get started. I will at first lay out the functions I have written,
and then we'll talk about a specific use for them.
[ Next Page ]
| Comments: | ||
| rectangular coordinats system graphs. | mitchell penneau | 06/08/05 12:18 |
| php upload one image | tndvrs | 03/01/05 12:53 |
| Tell me how to install GD into a Unix (Darwin | jeanloui | 09/21/03 05:16 |
| tell me about apache and unix in | laban | 09/20/02 09:48 |
| RE: JPGraph does this - but how... | Markus | 06/05/02 06:29 |
| RE: JPGraph does this - but how... | Markus | 06/04/02 14:01 |
| RE: Create a bar chart in PHP / HTML? | fareed | 06/01/02 01:14 |
| creating a GIF | Tom Fritsch | 12/10/01 18:43 |
| RE: Create a bar chart in PHP / HTML? | Thomasson | 10/21/01 12:35 |
| graphs | Per Kummervold | 08/06/01 05:58 |
| RE: Create a bar chart in PHP / HTML? | Deepak | 07/27/01 02:51 |
| JPGraph does this - but how... | Owen Lees | 07/08/01 14:07 |
| Create a bar chart in PHP / HTML? | Jacky Hung | 06/01/01 08:32 |
| RE: Tell me ,can I use the GD library in PHP41pl2 | zealousness | 05/29/01 06:18 |
| Html Graphs | Sean Dowell | 05/04/01 11:58 |
| on the fly gif graphs | George Kesarios | 03/10/01 12:14 |
| GifPix.class - without GD or tables | Roberto Bertó | 02/19/01 03:55 |
| interesting and very useful | katherine | 12/28/00 21:27 |
| way cool site | nduati githae | 12/21/00 02:54 |
| How can I use this with templates? | Gary Smith | 11/21/00 20:48 |
| I have done it before. | Ahmad Anvari | 11/08/00 15:37 |
| Enhancements to wrapper (2) | Rob Watkins | 09/06/00 09:43 |
| Enhancements to wrapper (1) | Rob Watkins | 09/06/00 09:40 |
| Tell me ,can I use the GD library in PHP41pl2 | Ting.Xu | 07/14/00 18:05 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


