Printing PNG Charts

Overview

Google Charts can be printed directly from your browser, or from
JavaScript via the print() function. If you want to
provide access to a PNG image of a chart, you can use the
getImageURI() method. This currently works for core
charts
and geocharts.

If your chart (of type ChartType, such as ColumnChart or
PieChart) is called my_chart and the div displaying it
is my_div, here's how you access the chart as a PNG:

Snapshotting Selections

As a chart creator, you can do most anything to your charts
programmatically that users can do in their browsers. So if you want
to create a static image of the chart with
a tooltip
showing or with
crosshairs at a
particular point, you can do that by calling setSelection()
prior to
getImageURI(), as shown below.

Here's a scatter chart with 100 random points, one of them with
tooltip and crosshairs pre-selected:

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

Reload and you'll see a different point selected. The code, with key lines in bold: