Google has released a chart generator service called the Google Chart API. The Google Chart API lets you build a URL that will dynamically create a chart for you. This service is used internally for Google Finance, Google Video, and beyond.
“The Google Chart API returns a PNG-format image in response to a URL. Several types of image can be generated: line, bar, and pie charts for example. For each image type you can specify attributes such as size, colors, and labels. You can include a Chart API image in a webpage by embedding a URL within an <img> tag. When the webpage is displayed in a browser the Chart API renders the image within the page.”
All these charts can be created dynamically by building some admittedly complicated URLs. Usage is quite straightforward: you link to an image in the form of a parameterized URL, e.g.
Splitting up the image URL parameters, you can see what it’s made up of:
|the chart type, in this case, a pie chart|
|the chart values, text-encoded, and separated by a comma|
|the custom chart size, 350×150 pixels|
|the different labels for the pie chart sections, separated via the pipe character|
Here are a couple of more examples of what can be done with the Chart API (cached again, but click them to see a live parametrized version):
Google, Google Char, API