Google Chart API released
Have you ever had the need to quickly and dynamically generate charts for a web based application? Google can help.
The new Google Chart API is a tool that one can use to create charts and graphs that can be embedded in websites. Basically, you type a few commands into a URL string and Google will spit out a PNG image with a line chart, bar chart, pie chart, venn diagram, or scatter plot. You can customize colors, points, and sizes. The developers guide walks through everything you might want to accomplish with the API.
When complete, copy the charts URL, and wrap a set of images tags around it to embed it into websites.
For example, the chart you see on the right was generated by entering this URL in a browser.
If you are thinking about doing more than 50,000 queries per day, you might have issues, that's the limit Google places on users per day. Right click on our image in this post, and take a peek at the URL, thats the guts of the image.
The new Google Chart API is a tool that one can use to create charts and graphs that can be embedded in websites. Basically, you type a few commands into a URL string and Google will spit out a PNG image with a line chart, bar chart, pie chart, venn diagram, or scatter plot. You can customize colors, points, and sizes. The developers guide walks through everything you might want to accomplish with the API.
When complete, copy the charts URL, and wrap a set of images tags around it to embed it into websites.
For example, the chart you see on the right was generated by entering this URL in a browser.
If you are thinking about doing more than 50,000 queries per day, you might have issues, that's the limit Google places on users per day. Right click on our image in this post, and take a peek at the URL, thats the guts of the image.












Comments
9
Subscribe to commentskingkool68Dec 7th 2007 10:05AM
I don't think quickly is how I would describe generating a chart this way. Futzing around in the URL can be a bit tricky especially with their number encoding system.
Although with a dynamic URL construction you could write some simple JavaScript to create animated graphs in a jiffy. Details on my blog -> http://www.russellheimlich.com/blog/google-releases-api-for-charts/
Chris CareyDec 7th 2007 11:21AM
Still doesn't beat what the code DigitalPoint did. Until Google releases that kind of great reporting they won't get ,y attention. Check out their reporting for Adsense, it will blow you away...
http://www.noheat.com/2007/09/06/graph-and-chart-your-google-adsense-revenue/
AdamDec 11th 2007 11:10AM
We've actually written a wrapper class for the Google Chart API:
http://www.talkphp.com/showthread.php?t=1704
JonDec 11th 2007 7:43PM
Hi,
I've also written a bit of script to build Google Charts. Let me know what you think.
Google Charts
Thanks!
JonDec 11th 2007 7:44PM
Oops.. URL is http://www.jonwinstanley.com/charts/
AdamDec 11th 2007 7:50PM
Not bad, Jon. Although yours is a web-based one, whereas ours is a wrapper class to be used professionally in your PHP code.
Adam @ http://www.talkphp.com/
goshaDec 11th 2007 8:53PM
just another gui for GCharts
http://www.tagarga.com/files/gcui
hope someone likes it
CoreyDec 12th 2007 12:46PM
MindTouch has come out with integration with Google Charts in Deki Wiki, allowing embedding of charts with an easier script implementation. See post on it here: http://www.mindtouch.com/blog/2007/12/11/google-charts-and-graphs/
MalaiacDec 19th 2007 1:05PM
Here is a PHP class to generate and cache Google Charts.
http://www.malaiac.com/GphpChart/