Thread: GoogleCharts
View Single Post
Old 12-11-2007, 12:05 PM   #1 (permalink)
Karl
The Reckoner
Advanced Programmer Top Contributor 
 
Karl's Avatar
 
Join Date: Sep 2007
Posts: 437
Thanks: 22
Karl is on a distinguished road
Default GoogleCharts

I've been playing with some Google Chart classes over the weekend and I've decided to give the code an early release to see what people think. It's all very basic still, I've mainly concentrated on implementing a flexible system, which I think I've achieved pretty well. I haven't done any performance tuning or anything (and there are a few places where performance improvements are obvious).

Have a play around, let me know what you think. I know there are a lot of improvements that can be made, and I'm eager to see everyones opinions. I don't mind a bit of criticism

There's an example included, but here's an example for the people who wanna see before downloading:

PHP Code:
$pChart = new GoogleChart(GoogleChart::TYPE_BAR_HSTACKED);

$pChart->setSize(200100)
    ->
setGridLines(202015)
    ->
setBackgroundFill(new GoogleChart_Fill_Solid('EFEFEF'))
    ->
setChartFill(new GoogleChart_Fill_LinearGradient(0'76A4FB'0'ffffff'1))
    ->
addData(new GoogleChart_Data_Generic(array(0104010), 'Legend 1''FF0000'))
    ->
addData(new GoogleChart_Data_Generic(array(40201020), 'Legend 2''00FF00'));

echo 
'<img src="' $pChart->render() . '" alt="" />'
Attached Files
File Type: zip TalkPHP GoogleChart v0.1.zip (129.5 KB, 366 views)
File Type: zip TalkPHP GoogleChart v0.2.zip (16.8 KB, 368 views)
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

Last edited by Karl : 02-01-2008 at 01:17 PM.
Karl is offline  
Reply With Quote
The Following 8 Users Say Thank You to Karl For This Useful Post:
adamcharnock (03-28-2008), Alan @ CIT (02-01-2008), bdm (12-11-2007), codefreek (06-26-2008), maZtah (12-11-2007), mortisimus (12-14-2007), sketchMedia (12-12-2007), thrash56 (02-01-2008)