12-11-2007, 11:05 AM
|
#1 (permalink)
|
|
The Reckoner
Join Date: Sep 2007
Posts: 437
Thanks: 22
|
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(200, 100)
->setGridLines(20, 20, 1, 5)
->setBackgroundFill(new GoogleChart_Fill_Solid('EFEFEF'))
->setChartFill(new GoogleChart_Fill_LinearGradient(0, '76A4FB', 0, 'ffffff', 1))
->addData(new GoogleChart_Data_Generic(array(0, 10, 40, 10), 'Legend 1', 'FF0000'))
->addData(new GoogleChart_Data_Generic(array(40, 20, 10, 20), 'Legend 2', '00FF00'));
echo '<img src="' . $pChart->render() . '" alt="" />';
__________________
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 12:17 PM.
|
|
|
|