tags:

views:

63

answers:

3
+1  Q: 

PHP: line charts

A: 

The second pic seems to be drawn pixel by pixel with setpixel function (in case of GD extension). All you need is to fill the lower pixels with a color after drawing the one representing value.

If you would like to make a similar graph as on pic1 but filled with a color you can use imagefilledpolygon function to draw the graph.

Petr Peller
A: 

We generally use a commercial component for graphs. It uses flash but as great functionnalities and customization capabilities.

If you want some jpeg or gif picture graphs, in the far past we used to work with jpgraph which is now PHP5 and Object oriented.

Benoit
+2  A: 

I'm not sure what you're using, but the excellent pChart library can do this:

Graph

Philip Morton
On the pChart website it says that to run it on a server you need to use PHP compiled with GD library support. How common is this (eg. if you don't run your own server)? Also, if they don't already support it how easy is it to update the PHP to one with GD support?
Dom
GD library is very common. I have not seen a web host without GD compiled.
Goran Jurić