
Vlad - 2007-07-31 11:14:36 -
In reply to message 1 from kev ivison
Its probably can't be displayed since class call is actually commented out in the head of the class. If you have GD library installed uncomment class call and it should work for you. U can copy class call to a separate file also and just call it as http://yourdomain/classCall.php. Originally it was created to track down website members. Each bar representes members of different category. Var $bars is an array of values of how high is each bar, $barNames is corresponding bar Names, so # of bars should be equal of # of barNames. 3d argument is maxHeight, default is 0 and it sets 500 point above the highest bar to keep bars within the frame. I am using maxHeight as members total so its always > then highest bar. Last argument in construct is actual graph name, the one which sits on top middle of the image.
The beauty of it is that it can be used for anything to graphically illustrate or compare. Array $bar can be from 1 to many and graph will stretch proportionally.
Also click on SEE IT ON MY SITE ( http://www.blackmonkeymedia.com/scripts/simpleGraph.php?showValues=yes&showGrid=yes ) to see its working. Although its modified a little for demonstration purposes.
I hope it helps.