Diff Charts

Overview

A diff chart is a chart designed to highlight the
differences between two charts with comparable data. By making the
changes between analogous values prominent, they can reveal
variations between datasets.

You create a diff chart by calling the computeDiff
method with two datasets to generate a third dataset representing the
diff, and then drawing that.

You can control the relative size of the circles
with diff.innerCircle.radiusFactor, the border between
the two with diff.innerCircle.borderFactor, and the
transparency of each with diff.oldData.opacity
and diff.newData.opacity. Finally, you can invert the
behavior so that the oldest data surrounds the newest data
with diff.oldData.inCenter. An example of each:

[This section requires a browser that supports JavaScript and iframes.]

Diff Bar and Column Charts

The diff bar and diff column charts overlay newer data on top of
older data. Here, we take two simple column charts—one of old data, one of new—and diff them:

[This section requires a browser that supports JavaScript and iframes.]

For a more complicated example, let's look at how the popularity of
some names (in particular, the names of Google Visualization summer
interns) has changed from the 1980s to the present (numbers are per
millions of babies, courtesy of
the Baby Name
Wizard).

[This section requires a browser that supports JavaScript and iframes.]