How to create a grouped bar chart
- Free
- Pro
- Business
- Enterprise
The bar chart is probably the most versatile chart type out there. But often, you don't want to show just one value for a category (e.g. "number of cooks"), but split it up – e.g. by gender, location, or department. The grouped bar chart is great for doing so. It's the slightly less intuitive but more responsive sibling of the grouped column chart: A grouped bar chart can handle lots of categories, even when the chart width is limited.
This article explains how to create and customize a grouped bar chart in Datawrapper. We'll use the chart above as an example.
👉 To learn how to group bars in bar charts, split bar charts, stacked bar charts, dot plots, range plots, and arrow plots, visit this Docs article.
👉 If you want to create a simple bar chart in Datawrapper, please read How to create a bar chart.
Preparing your data
Formatting your data
Your data needs to be in a certain format for Datawrapper to create a grouped bar chart:
- Descriptive labels in the first row. They will determine the labels in your color key. In our case, these are the genders.
- Descriptive labels in the first column. They will determine the labels in front of your bars. In our case, these are the occupations.
- At least two numeric columns. These values need to be numeric in order to determine the length of each corresponding bar. In our case, the values are number of people with a certain occupation. (If you upload just one numeric column, you'll get a simple bar chart, not a grouped one.)
Here's what that looks like for the chart above:
| Occupation | Men | Women |
| Chefs and head cooks | 379,776 | 136,224 |
| Cooks | 1,181,737 | 917,263 |
| Food preparation workers | 401,760 | 528,240 |
| Bartenders | 184,896 | 247,104 |
| Fast food workers | 328,937 | 630,063 |
| Waiters and waitresses | 529,708 | 1,224,292 |
- These columns don't need to be in this exact order. Datawrapper will use the column with the numeric values for the bar lengths – no matter if it's the first, second, or third column.
- The rows don't need to be in the exact order. You can sort them later.
Uploading your data
You got your data? Neat! Let's get it into Datawrapper. To do so, create a new chart (e.g., by going here.) Now paste your data from e.g. Excel or Google Sheets into the big text field on the right:

There are other ways to get your data into Datawrapper, too. Here's an overview.
Once you're done, click on step 2: Check & Describe.
Checking data and units
In the second step, you can check if your dataset was imported correctly. Datawrapper tries to automatically interpret your column types (text, number, dates), but you can make changes, if necessary.
By selecting the correct output locale, Datawrapper chooses the correct decimal and thousand separators for you.

To add a unit (like km/h, kg, inches, $, etc.) to your numbers, click on a column header and then add the unit of your choice to the Prepend/append options on the left. You can learn more about adding units to numbers here.
Click on Proceed at the bottom left to go to step 3: Visualize.
Choosing a grouped bar chart
In the Visualize step you have four tabs: Chart Type, Refine, Annotate, and Layout. Select Grouped Bars to see your data visualized as a grouped bar chart:

Congratulations, you just created a grouped bar chart! The next step is to refine and annotate your chart.
Refining your chart
Let's continue with the Refine tab. Here, we see four panels: Labels, Horizontal axis, Appearance, and Sorting & Grouping.

Resizing
In any tab of step 3: Visualize, you can click, hold, and drag the arrow in the lower right corner to scale the chart window or manually determine the dimension of the chart by entering values in the boxes below the chart (Size).
We recommend checking what the chart looks like on different screen sizes several times while designing it, by clicking on the little icons (mobile, tablet, and computer) below the chart.
Learn more about changing the width and height of your chart in this article.
Formatting labels

The first section is about Labels. Here we have the following options:
- Alignment: Decide if your category labels are left-aligned or right-aligned.
- Move labels to separate line: If you choose to turn this on, then instead of being in front of your bars, the category labels sit on top of the bars and the whole chart becomes taller. This is a good choice for a chart with long labels, because they get more space (= the complete width of your chart).
- Show values: In most charts, your audience should be able to see the underlying values of each bar, so your chart will show the values by default. You can choose the Visibility (if the values are visible all the time or only when a reader hovers over a bar), Value alignment (if the values should sit left-aligned or right-aligned in each bar) and the Number format of the values. Learn more about available number formats and when to choose which one here.
- Replace country codes with flags: That's a great choice if your category labels include mentions of countries. Learn more here.
- Show color legend: A color legend helps your readers make sense of your bars, so this is turned on by default. Only turn it off if you explain the bars (and their colors) sufficiently e.g. with annotations. If you choose to Stack labels, the color legend items show up below each other instead of next to each other.
Changing the axis range

The next panel lets us customize the x-axis.
First, with Custom range, you can decide which value range your x-axis should cover. By default, the x-axis for each column will be as long as your biggest bar. But if your chart shows percentages close to 100%, it makes sense to extend the chart to 100%. Readers will then be able to see how much is "missing" to achieve the ideal 100%. So we can write "100" in the max field.
You'll also find the option to turn on id lines.

Datawrapper will try to set grid lines that make sense, but you can also customize them. For example, if you type in "500000, 1000000", your grid lines show up like this:

Besides that, you can choose the grid position (above the chart, the default; or below the chart), and can change the number format here, too.
Changing bar colors and appearance

In the third panel in the tab Refine, we can decide the design of our bar chart: We can choose the colors of our bars and decide if we want to make our bars thicker, separate each category with a line, or give each bar a grey background.
Let's focus on how to choose colors for our bars. After clicking on Customize colors, you'll get the option to set a color for each of your bars in your chart. Select an element to change its colors by clicking on the color swatch:
Sorting and grouping bars

In the fourth and last panel, we can decide how to sort the order of your bars and labels and decide how you want to group them.
- Sort bars: You can keep the order of your spreadsheet by leaving this option unselected. If you select this option, you can choose the column you want to sort the bars by.
- Reverse order: If you select this option, you will have the largest bars at the bottom.
- Groups: You can upload an extra column to put categories into extra groups (grouped grouped bars, so to speak!). Learn more about grouping bars here.
And that's all for the Refine tab! Let's continue with the Annotate tab.
Annotating your chart
Adding a title and source

In the Annotate tab, you're first asked to give your visualization a title, description, notes, source, byline, and an alternative description for screen readers. You can find a detailed explanation of all these Annotate options here.
Highlighting bars
In the 2nd panel in the Annotate tab, you can choose to highlight elements: The label in front of these bars will appear in bold, and the bars of the unselected categories will fade into the background. You can revert the highlight by clicking on the x in front of the label:
Adding text annotations
You can add annotations to your grouped bar chart by clicking on Add text annotation. You can then style and move the text, add an arrow and circle to it, and adjust how it will appear on mobile. Here's an in-depth explanation of all the options.

Highlighting ranges
You can add a range or line highlight by clicking on Add range highlight and then dragging on the chart where you want the highlight to be. You can then change its position, color, opacity, and line width and style, or delete it again. Here's an in-depth explanation of all the options.

Publishing your chart
In the Layout tab, you can select an output locale, change the design theme and footer options, and enable social sharing. Find a detailed explanation of all the Layout options here.
In the final step 4: Publish & Embed, you have the option to publish the chart either by sharing the URL or by copying the embed code directly on your website or CMS (recommended). You can also download your chart as a PNG (available to all users regardless of the type of subscription plan they have) or as an SVG or PDF (available only to users of paid plans). For more information on the different pricing plans, click here.
And that's it! You've successfully created and customized your first grouped bar chart.