How to create a

Grouped Bar Chart.

Learn how to group your bar charts to combine several sections into one chart.

The grouped bar chart from Datawrapper is ideal to report about the results of surveys with modern, responsive charts. This chart type let's you put the answers from the survey side-by-side, for easy understanding.

In this tutorial we walk you through the basics and show you a few additional features for this kind of chart. 

How to group your data in the bar chart

Let's assume there was a survey, now the answers are in. Here "grouped bar charts" are often the best option to display the distribution of answers for easy comparison. In our example below you see how one can split the answers for Question 1, Question 2 - while displaying the percentage for the three possible answers for Question 1, then even four answers for Question 2. Plus, there are some more tricks: Such as putting the percentage of answers to the front for proper display of the most important information here.


Preparing the dataset and creating the chart

In order to let Datawrapper display this kind of data a little bit of preparation in the data spreadsheet (e.g. Excel or Google Sheets or any other) is needed.

Two columns: To create a chart like this the dataset should have two label columns. Note that this is a slight departure from the otherwise often very spreadsheets you can use for Datawrapper. For the grouped bar charts we need to add a bit of information for Datawrapper to detect the "groups" later. 

In the example below, the first column (titled "Question") will be used as group labels and the second column ("Answer") will be used as bar labels. Note how "Question 1" is repeated in column A to be properly connected to the answers. 

You can use the demo dataset below, which is used in this particular tutorial. Note that "Question 1" is repeated for "Answer 1" and "Answer 2" and "Answer 3". This is important to later enable the groups. If you are working with results from a survey simply match your questions to the answers this way.

The data from above can be copied here.

Customize your chart

In the visualize step, select the simple bar chart - with the new options for labeling, appearance, etc. we will be able to come to the same result as above.

Once you selected the chart type, the context menu will change - meaning that you have specific options for customization. 

Once you selected bar chart your options for customizing the chart will change, which you can now use to "Refine" the charts appearance. 

Now we need to tell Datawrapper which columns in the dataset should be used for what in the chart. This is what the "customize axes" section in the top is for. Expand the section by clicking the title and then assign your columns to the axes using the select inputs. Datawrapper will automatically select the first numeric column to the values axis and the first text column to the labels axis.

One final feature you can use as an option to make the story of the chart even easier to understand is to "swap" the values for the bars and the labels. This can be done in the same menu, under "Labeling". This way the percentages for the answers are put to the front, the labels are in the bars. 

And that's it, now you should see a grouped bar chart. You can customize and style grouped bar charts in the same way as regular bar charts.


 

Other Interesting Tutorials

How to create a Stacked Column Chart

Learn how to create a stacked column chart in minutes with Datawrapper.

View Guide

All-new line charts

Datawrapper has completely revamped line charts: More responsive, cleaner and with annotations.

View Guide