GoogChart: PHP Class For Google Charts API

Creating charts via Google Charts API is already simple.

GoogChart is a PHP class which makes it easier & more flexible.

Google Charts PHP Class

Here is an example:

After creating an array ($data in the example), this simple code is enough for generating a pie chart.

$chart = new googChart();
$chart->setChartAttrs( array(
    ‘type’ => ‘pie’,
    ‘data’ => $data,
    ‘size’ => array( 300, 200 )
echo $chart;

Although GoogChart supports a serious amount of attributes & types for Google Charts API, currently, not all of them.

There are also other similar PHP classes which you may want to check like: