GoogChart: PHP Class For Google Charts API
29
Oct
Creating charts via Google Charts API is already simple.
GoogChart is a PHP class which makes it easier & more flexible.
Here is an example:
After creating an array ($data in the example), this simple code is enough for generating a pie chart.
<?php
$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:
Website: http://luddep.se/notebook/2008/04/13/charts-php-and-...
Download: http://code.google.com/p/googchart/
Download: http://code.google.com/p/googchart/
- Tags:
Google Charts Php
- Filed under: Charts, Goodies, MIT License




















2 Responses for "GoogChart: PHP Class For Google Charts API"
Please take a look at AnyChart http://www.anychart.com
[...] at WebResourcesDepot, they had a post about using GoogChart to create easy Google Charts API bar, line and pie [...]