data visualization: basics

Make a pie chart

The pie chart is the most ubiquitous of charts. Here's what it is and when to use it.

  • It is a circle divided into segments.
  •  It should illustrate the relationship of the parts of a total.
  • The data may be numeric but it is usually displayed in percentages.
  •  Never more than 5 parts. If you have more than five subsets, consider a TreeMap.

Save your spreadsheet and call it "Pie Chart." You only have to do this once. The document will autosave as you make changes.

Save Your Spreadsheet

 

Fill in the data as shown below. Select cell A1 by clicking it once. Hold down the Shift key and click in Cell B4 to select the range of data.

Pie data for Google Gadget

 

Let's add a Google gadget to make an interactive pie chart that you can embed in your site. Click on Insert in the Google Menu Bar and select Gadgets and a new window will appear.

How to insert a Google Gadget into a spreadsheet

 

A new window will appear in your spreadsheet. This is the gadget that you will eventually embed on your page. But first, let's take a look at the editing menu and and how to refine your chart.

Anatomy of Google Gadget interactive pie chart settings

  1. This is the range of cells you selected earlier. If you select the wrongs cells, don't fret. You can edit them here. Just replace A1 or B4 to change the range.
  2. This is the number of rows you are using to label your columns. "Auto" is fine 90 percent of the time. But if you use two rows for some reason or if you have no column headers, you can change it here.
  3. This is the title that Google uses to identify your gadget. It will NOT show up in the graphic.
  4. This is the headline for your chart. It WILL show up in your graphic. Describe what you are illustrating in the chart.
  5. Choose "On top" whenever possible. This helps readers because the read from top to bottom and expect to find out what the legend is before they read the chart. However, with a pie chart, it is also acceptable to select "Labeled."
  6. Stop! Hold it right there! Never, ever select the 3D button. Making a chart 3D distorts it's data. This can make large areas seem smaller than they are or small areas look larger. It is very easy to accidentally mislead your readers.
  7. Once everything is done, select "Apply and close." If you want to make further changes, click on the gadget. A title bar will appear. Click "Edit"to continue making changes.

To embed the chart, click the the triangle on the top right of the gadget. In the menu, select "Publish Gadget." This opens a new window with an embed code that you can copy and paste into a page on your site.

Generate embed code for a Google Gadget pie chart

Resize your gadget. Once you've pasted into a page on your site, you can change the size of your gadget. Make sure you are editing in HTML mode. Near the bottom of your code, there is  a "height" and "width"  measurement. This is the size of your gadget in pixels. If either is changed, the gadget will redraw to avoid looking stretched.

Change the size of a Google Gadget by editing the embed code