PHP Classes

Usage

Recommend this page to a friend!

      SimpleGraph  >  All threads  >  Usage  >  (Un) Subscribe thread alerts  
Subject:Usage
Summary:Can you define the usage of this class
Messages:2
Author:kev ivison
Date:2007-07-31 09:00:40
Update:2007-07-31 11:14:36
 

  1. Usage   Reply   Report abuse  
Picture of kev ivison kev ivison - 2007-07-31 09:00:41
There are no notes other than at the head of the script on how to use this class. The script bombs out on execution with

The image “http://server1/chart/charttest.php” cannot be displayed, because it contains errors.

Any thoughts??
Keith

  2. Re: Usage   Reply   Report abuse  
Picture of Vlad 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.