Generate Charts On-the-Fly with Google's API
Posted by Gina Trapani at 11:00 AM on December 11, 2007
Google's newly released chart API generates charts and graphs on the fly called by a URL with the right parameters set. The Google Blogoscoped weblog runs down what data to hand the API to get back a pie chart, line chart, bar graph and more. Don't hot-link the image on your high traffic web site, though, you only get 50,000 hits on it. Above I've used it to generate a chart of the percentage of the last 30 Google-related posts we've published here at Lifehacker by editor. Here's the live URL if you want to play with it and modify for your own purposes.

Comments (AU Comments · US Comments)
There are currently no AU comments for this post.
Rob P.
Posted 9:26 PM 10/12/07
Finally, something free that will generate anti-aliased charts! Ah, to be free of Excel's gray and purple defaults.
Now, to integrate this into something a little more user-friendly...
Rob P.
mahalie
Posted 9:16 PM 10/12/07
For reluctant programmers like myself, this is a great option for adding charts to my little web apps. I *smooch* Google! (will look at Fusion too - gotta love WebAppers for finding this type of stuff for me)
mahalie
whitefrog
Posted 8:49 PM 10/12/07
While it is good to see Google continuing to expand the offering of free services and tools, I think I will keep my current solution for the time being. Check out Fusion Charts Free at the link below. As the name implies, the price is right and the integration is fairly painless.
[www.fusioncharts.com]
-Matthew
whitefrog
2kreative
Posted 7:39 AM 11/12/07
Just to throw an alternative into the mix, there are some pretty nice free chart variants available if you have your own webhosting and a little bit of time to experiment:
[www.maani.us] - PHP/SWF Charts, XML/SWF version also available.
[naku.dohcrew.com] - Libchart - PHP library for charts
Granted these may not be as user friendly as Googles API - but they are worth a play.
2kreative
rachelandrew
Posted 3:19 PM 11/12/07
Today's tutorial on 24ways.org is a nice introduction to Google charts (including how to create sparklines).
rachelandrew
provenza
Posted 12:41 AM 11/12/07
Very useful. Before google chart I used jpchart for php. If you like you can use this:
[www.heavytrader.it]
A simple wizard to use google chart apis.
provenza
MeMyselMe
Posted 7:42 PM 10/12/07
Here we go: another tool to generate junk charts. For all of you interested in good and sound methods to generate charts, refer to any of Tufte's books. Everyone else, please keep using what Excel and the like imposes on you.
MeMyselMe
cjtannu
Posted 9:49 AM 12/12/07
The Google Charts API is a nice and simple way to jazz up a page. I'm glad it was released as it gives me another option. In fact I integrated it with Deki Wiki so that it is even easier to embed in a wiki page. Check out my blog post here: [www.mindtouch.com]
cjtannu
elfgeek
Posted 11:11 PM 12/12/07
Fusion Charts is OK, however, this Google API is nice because 1) Flash is not required and 2) it is a much simpler API.
elfgeek
dsparks
Posted 3:54 AM 13/12/07
Someone has actually already put the API to good use, if you want to see an example of an application--it's kind of dorky but pretty cool. Really illustrates the power and simplicity of the API. Also, the proprietary algorithm they use here is amazingly accurate! (mostly kidding, of course) It's at [lovegraph.thefootnotes.com] -- worth checking out. By the way, love the blog, keep up the good work!
dsparks