View Single Post
Old 12-08-2007, 05:08 PM   #8 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

I got bored last night and wrote a quick wrapper for this API. It means I could write something like the following and get the image back.

php Code:
$aData = array(33, 30, 37, 37, 40, 23, 15, 18, 17, 4);

$pChart = new GoogleChart_Line(200, 100);
$pChart->data($aData);
$pChart->title("My Chart", '333333', '20'); // optional
$pChart->fill_background('ECF0F3'); // optional
$pChart->render();

Which results in:
It's very crude at the moment, so no code releases! Maybe you can have a stab at writing a similar class too.

Last edited by Salathe : 12-08-2007 at 05:42 PM.
Salathe is offline  
Reply With Quote