In December, Google released a chart generator service they are calling the Google Chart API. Usage is quite straightforward: you link to an image in the form of a parameterized URL, e.g.

http://chart.apis.google.com/chart?cht=p3&chd=t:90,49&chs=350x150&chl=Foo|Bar

… and Google returns a PNG graphic containing the chart. For instance, above URL results in the following image:

Splitting up the image URL parameters, you can see what it’s made up of:

cht=p3
the chart type, in this case, a pie chart
chd=t:90,49
the chart values, text-encoded, and separated by a comma
chs=350x150
the custom chart size, 350×150 pixels
chl=Foo|Bar
the different labels for the pie chart sections, separated via the pipe character

Google limits your requests to this API to 50,000 per day. Even with that limit, you can grab the image and do the caching on your own server automatically (by copying the binary), which would mean 50,000 requests will be good enough for many use cases.

via Google Blogoscoped.

Also see how you can kidnap Google Page Creator’s image generator.

Reading: Google Releases Chart Image GeneratorTweet This