Embed a Chart

Chart 1


Now you can display charts in your Sites by going to Insert Menu and choosing
Charts in edit mode.  See https://support.google.com/sites/answer/1680639?hl=en

Google Chart

It is simpler now Just use Insert>>Chart

Old instructions below:

Get the embed code for your chart. Instructions here.

Create your own gadget using the gadget editor. see Gadget Editor

Embed the code you got in the first step into your gadget.

Get the gadget's URL as described in the Gadget Editor page.

Insert your gadget using 'Insert gadget by URL'.

In its properties adjust the height and width and click 'Include a scrollbar on gadget when necessary' if you want them.

The embedded chart will follow any changes made in the spreadsheet, but only when the page is reloaded.

Example code for the gadget:

(The bold text is the code from the first step)

<?xml version="1.0" encoding="UTF-8"?>
<ModulePrefs title="chart2" />
<Content type="html"><![CDATA[
<img src="https://docs.google.com/spreadsheet/oimg?key=0Am8Gtf1n8u8DdEdYR0t0Z1VxdVRnZFdDbG1xZXllcUE&oid=5&zx=qajlu1gn9rc" />

An easier way is to use an embed gadget:

Insert>>More Gadgets, Search for Embed Gadget and insert it.

Configure it with your code such as:

<img src="https://docs.google.com/spreadsheet/oimg?key=0Am8Gtf1n8u8DdEdYR0t0Z1VxdVRnZFdDbG1xZXllcUE&oid=5&zx=qajlu1gn9rc" />