TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack (21) Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 12-11-2007, 12:05 PM   21 links from elsewhere to this Post. Click to view. #1 (permalink)
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)
 


LinkBacks (?)
LinkBack to this Thread: http://www.talkphp.com/script-giveaway/1704-googlecharts.html
Posted By For Type Date
Advanced PHP Wrapper Class for Google Charts This thread Refback 01-11-2008 03:55 PM
Untitled document This thread Refback 01-10-2008 02:57 PM
Google Charts and Graphs | MindTouch Blog This thread Refback 01-08-2008 02:54 PM
Untitled document This thread Refback 01-08-2008 02:11 PM
Advanced PHP Wrapper Class for Google Charts This thread Refback 01-08-2008 04:08 AM
NamePros.Com - Advanced PHP Wrapper Class for Google Charts This thread Refback 01-08-2008 03:40 AM
g :: Google Chart API Revisited This thread Refback 01-06-2008 11:03 PM
Untitled document This thread Refback 01-05-2008 06:06 PM
Creating Charts - SitePoint Forums This thread Refback 01-03-2008 11:36 PM
Untitled document This thread Refback 01-03-2008 09:52 AM
Untitled document This thread Refback 12-30-2007 08:11 AM
PHP / Javascript Wrappers for Google | David Bisset: Web Designer, Coder, Wordpress Guru This thread Refback 12-28-2007 06:15 PM
Dynamic Google Charting API - Google Blogoscoped Forum This thread Refback 12-26-2007 08:56 PM
Create Charts Online with Google Chart API This thread Refback 12-26-2007 08:28 PM
Untitled document This thread Refback 12-26-2007 05:00 PM
Untitled document This thread Refback 12-26-2007 11:23 AM
Javascript | David Bisset: Web Designer, Coder, Wordpress Guru This thread Refback 12-26-2007 03:31 AM
Phil Windley's Technometria | Google Chart API This thread Refback 12-25-2007 02:29 AM
24 ways: Tracking Christmas Cheer with Google Charts This thread Refback 12-22-2007 11:10 PM
Google Chart API released - Download Squad This thread Refback 12-22-2007 04:07 PM
Untitled document This thread Refback 12-21-2007 10:51 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 09:46 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design