Chapter 8. Google Visualizations

The Google Chart Tools API (application programming interface) is an extensive and growing set of data visualization tools that can add impressive visual impact to your data. If you’re picturing boring old pie and bar charts, then read on: interactivity, animation, and just plain fun are all part of the Google Chart Tools mix (Figure 8-1). In fact, there’s a lot more than just charts in Google Chart Tools:

  • Maps

  • Dynamic icons

  • Dials and “o-meter”-style displays

  • Formulas

  • QR codes (2D bar codes for physical-world hyperlinks)

  • Lots of third-party visualizations

  • The ability to create your own custom visualizations

Your accountant won’t appreciate a chart like this
Figure 8-1. Your accountant won’t appreciate a chart like this

The API’s expansive nature easily warrants a book of its own, so this chapter covers just the essentials required to get started, enabling you to make better use of the official online documentation (http://code.google.com/apis/charttools/index.html) to explore further. We will also develop some useful functions and examples to help you get the most out of Google Chart Tools.

Google Chart Tools is split into two distinct sections:

Image charts (aka Chart API)

Image charts are created with a specially formatted URL that is passed to Google’s chart servers. The servers return a static image of the chart for inclusion in web pages. Typically, the URL is used as the value for an ...

Get Supercharged JavaScript Graphics now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.