Online Shopping : Computers : Programming : Languages : PHP : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

45 of 59 people (76%) answered Yes
Recently 6 of 10 people (60%) answered Yes


Is there a PHP library for drawing graphs?
Is there a PHP library for drawing charts?

Oct 31st, 2004 21:53
Philip Olson, Praveen Kumar Kukkapalli, Alder Rus, A Ottenheimer, Chris Kings-Lynne, Nathan Wallace,

Apart from all these JPGraph is providing so many kinds of graphs like 
bar graph, Pie chart, ad many more. It is free for personal usage and 
charging few $ for commercial use. Overall this is very good ad simple.
You can find about it at
If you are looking for a free graph and chart class that 
works with PHP3, PHP4, gd 1.2 - gd 1.3.8, and has TTF
support, there is PHPLOT at
it has also been released on sourceforge in CVS at
There is a commercial class at:
An example usage of this class is given below.  Be sure not to include
any white space before this PHP code segment.
    include ("class.graph");
    $a = array(
        array(1.0,2.1,2.0,1.3,2.3,2.0) );
        "box_showbox"=> true,
        "grid"=> true,
        "cubic"=> true,
        "title_text"=> "Bar Graph",
        "yaxis_labeltext"=> "Revenue (in million $)",
        "xaxis_labeltext"=> "Months",
        "legend_shift"=> array(-300,10),
        "size"=> array(400,250) ));
            "drawsets" => array(1,2),
            "legend"=> array("First Half Revenue",
            "Last Year Result"),
        "barspacing"=> 8,
        "showvalue"=> false ));
WebGuys have a bar graph generator that creates purely HTML-based