Google continues to innovate on the API front, today releasing an API in a
very different category: charting. What is it? From the href="http://code.google.com/support/bin/topic.py?topic=13605">FAQ: “The href="http://code.google.com/apis/chart/">Google Chart API is an extremely
simple tool that lets you easily create a chart from some data and embed it in a
web page. You embed the data and formatting parameters in an HTTP request, and
Google returns a PNG image of the chart. Many types of chart are supported, and
by making the request into an image tag you can simply include the chart in a
web page.” You can see more details on our new href="http://www.programmableweb.com/api/google-chart">Google Chart API Profile
here.
Steve Crossan from the Chart API team in Zurich notes via href="http://google-code-updates.blogspot.com/2007/12/embed-charts-in-webpages-with-one-of.html">their
blog that it’s one of Google’s simplest APIs yet: “Let’s get straight in
with an example. This URL creates this image:
http://chart.apis.google.com/chart?cht=p3&chd=s:hW&
chs=250x100&chl=Hello|World
src="http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=Hello%7CWorld">
“That’s it - no state, no calls, just send your data in an http request and
get a png image graph back. Embed the request in an img tag and you’re done.” He
notes also this was built as a 20% project to support services like href="http://video.google.com/">Google Video and href="http://finance.google.com/">Google Finance.” Given that no API key is
required, this is indeed a very easy API to start using right away.
Currently supported are href="http://code.google.com/apis/chart/#line_charts">line, href="http://code.google.com/apis/chart/#bar_charts">bar, and href="http://code.google.com/apis/chart/#pie_charts">pie charts, as well as
venn diagrams and href="http://code.google.com/apis/chart/#scatter_plots">scatter plots. You
can also add things like fill gradients and markers to charts.
src="http://blog.programmableweb.com/wp-content/googlechartex.png">
Google does note there’s a limit of 50,000 queries per user per day. But this
is a reasonable constraint given that most charts can be generated and then
cached on developer’s own servers.