Eye-catching graphics with the Google Charts API
Web Grapher

© auris, Fotolia, Fotolia
The Google Chart API lets you draw custom graphs, charts, maps, and barcodes through a simple web interface.
If a picture is worth a thousand words, a chart must be something akin to a novella. With just a glance, a chart can convey the state of the stock market, a trend in website traffic, the distribution of voters by county, and how monies are allocated in a household budget. Additionally, a chart is simply more memorable than a large table full of numbers.
Oddly, though, very few websites use charts to great advantage, largely because creating a chart requires unique programming and specialized, server-side software to render data. For example, if your site is based on PHP, you must install pChart [1] (or an analog), add the GD graphics library, and write code to produce a graphic of any kind. Ideally, any contributor – an editor, a writer, or a user adding comments – should be able to create and embed a chart.
Indeed, dynamism, simplicity, and convenience are at the heart of the Google Chart application programming interface (API) [2], perhaps more accurately described as software as a service (SaaS). Simply craft a parameterized URL in the form http://chart.apis.google.com/chart?parameter1¶meter2¶meterN and let Google Chart do all the heavy lifting. Google Chart lets you render six kinds of charts, a Google-o-meter, a QR code (a kind of barcode), and maps, and you can specify a googol of customizations, such as bar color, background color, legend, and more.
[...]
Buy this article as PDF
(incl. VAT)