Thursday, December 6, 2007

Embed Charts in Your Pages with Google Charts API

If you've ever complained about creating charts to embed in your web pages, you'll be pleased to hear about this new Google API.

Let's get straight in with an example. This URL:

http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=Hello|World

Creates this image:



That's as simple as it can get. A simple http request and you get a PNG image back with a rendered chart. Currently there are line charts, bar charts, pie charts, scatter plots, and sparklines.

Although this project began as a 20% project and was intended to be used internally - on Google Video and Google Finance - it was only natural to allow other users to use it as well.

You can find out all about it at on the Google Chart API homepage and there's a Google Chart API group for questions and support.

No comments:

Post a Comment

Related Posts with Thumbnails

Amazon Store