How to create a stacked column chart

This guide will show you how to prepare your data to create a stacked column chart. 

The  stacked column chart is ideal to present proportions of categories, providing a very easy comparison. This is achieved by adding up constituent categorical dimensions. Each dimension will be represented by a part of a column and color-coded as well as sized accordingly. You can use a stacked area column to compare one year vs. another or reduce it to showing just one year in some cases. 

No matter how detailed your data is, the Datawrapper stacked column chart features an intelligent labeling function to avoid a cluttered visualization.

1

Preparing and importing the data

If you want to create this chart type, your data needs to be in a certain format. You'll need:

  • One header row containing descriptive labels ("Spending", "2000", etc.)
  • One column with categories.
    These can be years, or other categories like regions, products, etc. 
  • At least two columns containing numeric values.
    The values in these columns will define the height of each bar segment. Each column will make one bar: We have four columns with six values each, so our chart will show four bars with six bar segments each. Since this is an absolute stacked column chart, the values do not have to add up to a certain value. If you are looking for a 100% stacked column chart, all values in one row have must add up to 100% (or 1).

That's the data we used to create the chart at the top of the page: 

Spending 2000 2005 2010 2015
Government Pensions 0.5 0.7 1.0 1.2
Government Healthcare 0.5 0.8 1.1 1.4
Government Education 0.6 0.8 0.9 1.0
National Defense 0.4 0.6 0.8 0.8
Government Welfare 0.2 0.3 0.7 0.5
All other spending 1.0 1.2 1.4 1.5

Source: http://www.usgovernmentspending.com/breakdown

Once you prepared your data, create a new chart in Datawrapper. You can do so by going to our homepage and clicking on "Create a chart". In Step 1: Upload, copy & paste your dataset, upload it as a .csv or an Excel sheet. It will look like this: 

Click "Proceed" at the bottom right to go to the next step: 


2

Check & Describe

In the second step, you can check if your dataset was imported correctly and make changes to it - if necessary. If you did not upload a header row, you have to untick "First row as label" to avoid losing your first row of data. Always remember to do this if you don't have descriptive row and column headers.

In step 2, your data looks like this. You can see that Datawrapper correctly recognized your numbers as numbers (and not as text or dates) because they are colored in blue and are right-alined. To learn more about the Datawrapper's automatic recognition of data formats, visit this article.

Click on "Proceed" at the bottom left to go to Step 3: Visualize:

3

Visualize

In this step, you see a first chart. It's probably a line chart. We want to change that. To do so, click on the "Stacked Column Chart" symbol in the grid of available chart types:

You will now see a stacked column chart, without a title, descriptions or customized colors. Maybe you want to further refine, annotate & define this chart. We cover this in a separate short tutorial found here.

Still need help? Contact Us Contact Us