Bar Charts in Google Sheets

Google Sheets
POL 307

Making bar charts in Google Sheets from a table isn’t too hard, but there are some things you need to consider ahead of time that will make your life easier:

  1. There isn’t any native way to rearrange categories once they’ve been added to the chart, so you need to make sure your data is in order prior to creating your chart.
  2. Related, you will want to make sure that any categories are combined prior to making your chart.
  3. Google Sheets has a fairly limited number of chart options, and some things require a fair amount of manual editing to make them look nice.

Prepping Data

Before you make your chart you need to get your data into a useful format. If you started with a Pivot table this might mean copying and pasting rows and columns into a logical order. If you have started with Qualtrics then your data might already look nice. What is important is that you have a a simple table with your rows and columns labeled and the values you want to show (row or column percentages) in the center. See Figure 1 for an example of where I am starting.

Figure 1

Making Your Plot

Making your plot is easy now. Highlight the table we made (including the labels) and go to “Insert” and then select “Chart.” You should now have a bar plot.

Figure 2

If you want to edit the type of chart there should be a window on the right that shows you different options. Select whatever you’d like. For this example we are going to stick with the stacked bar chart.

It is often helpful to add the labels to the bars. To do this select the Customize tab on the chart menu on the right.1 Go to the “Series” section. Near the bottom of that section check the “Data labels” box. A new menu will open up, if you want to center the labels pick Center from the Position dropdown. See Figure 3

Figure 3

It defaults to showing the labels in the format that you have in the table it is drawing the data from. If you want to change them to not show as many digits you need to highlight your original data and select Format \(\rightarrow\) Number \(\rightarrow\) Custom format number. A box will pop up (Figure 4) that lets you select a format for the numbers. To select percentages with no decimal points write “0%” (IF you wanted just one decimal point you’d write “0.0%”, for two “0.00%”, etc).

Figure 4

There are a few other things you can do:

  • If you’d like to change the theme/colors. Select the plot and then go to Format \(\rightarrow\) Theme. You’ll have options that pop up in the menu on the right.
  • To move the legend position, in the chart editor go to Customize \(\rightarrow\) Legend and then use the Position dropdown.
  • You can customize particular colors by going to Customize \(\rightarrow\) Series and then selecting a particular category from the first dropdown. You can then edit how that is displayed.
  • To edit the title double click on it. You can do the same with other labels.
  • You can also switch if the rows are on the axis and the columns the fill by going to Setup. Scroll to the bottom and check the “Switch rows / columns” box.

To download the plot click the three dots on the top right and select “Download Chart”. It will provide a few different options. A PNG is probably most common, while SVG will look the best. @final-plot is the SVG version of what I have made.

Footnotes

  1. If the plot menu ever vanishes click on the plot and click the three dots on the top right of the plot. Select the edit option and the menu will pop back up.↩︎