Customizing your stacked bar chart

Select  stacked bar chart after uploading your data. In this step, you can further enhance the appearance of the chart. Plus, there are some small tricks - such as showing how many people did not answer at all visually (as in the example below). Let us show you how to make a beautiful stacked bar chart in three simple steps.

This guide will walk you through the steps necessary to create stacked bar a bar chart as seen above.



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 ("Resize to"). We recommend to do this step first, but you can change the size of your chart at any point.

Customizing the axes

In the "Refine" tab, we see four panels. The first panel lets us customize your axes. Here we can choose which element in your chart shows which data:

  • Labels: Select the column header that contains labels for each row. These labels are in your category-column. We'll choose the column "Topic" as our labels.
  • Groups: You can upload an extra column to put categories into extra group. In our case, we could have a column that states for each topic if it's been reportedd in the "first half" of 2015 or in the "second half". If we chose that column as our "Groups", the chart would make a separation between the bars. Since we only have four topic, we won't group our data.

For our chart, the panel looks like this at the end: 


In this panel, we have just one decision to make: How should the bars and their labels be sorted? You can keep the order of your spreadsheet  with  selecting "keep order". Or you can sort your charts by one of your columns, e.g. "Low Trust". The biggest value in this column will then be at the top. If you'd like to have the biggest value at the top, choose "ascending". 

Our bars are already sorted in this way, so we can either resort or not resort at all. For our chart, the panel looks like this:

Under " Labeling", you can decide the overall look of everything text-related in your chart. Make sure that the number format is the one that represents your data best. For very high numbers, choose "123k" or "123.4k"; for percentages, choose "0%".


In the next panel, we can make some  display decisions that are rather self-explanatory: Do we want to display the labels in a separate line? And do we want to hide the value labels? Display grid lines? Feel free to play around with these settings to see what works best for your data (don't worry, you can't break anything – just uncheck the checkbox again if you're not happy with the setting). 

The most interesting setting here is the Number format. Here we can decide how our values are shown (if we chose to display them). Here are three examples:

  • Choose the number format "123.4k" if you have big numbers like "1,303,428" that you'd rather want to display as "1.3m"
  • Choose the number format "0.0" if you have very detailed numbers like "0.1922302" that you'd rather want to display as "0.2"
  • Choos the number format "0%" or "0.0%" if you have a number that is a relative number, like in our case. This setting will add a percentage sign. 

For our chart, the panel looks like this at the end: 


In the fourth and last panel in the tab "Refine", we can decide the design of our bar chart: We can choose bar colors and decide if we want to separate rows with a line, make our bars thicker or stack the percentages.

Let's focus on how to  choose colors for our bars. We can choose one color for all our bars (click on "Base color" to change the default color). We can also adjust the colors manually. This will help us to make the stacks more distinguishable. To do so, click on "customize colors" next to the base color. 

  • By choosing a light grey for "No answer" we create a blank space. This is a valid visual option helps make clear that a certain proportion did not answer at all. This little visual encoding trick gives the chart a nice touch.
  • We use color saturation to categorize our measures. In this case: The more affirming the answer, the greater the saturation. Choose a color that is easily saturable!

Lastly, make sure that "Show color key" is ticked so that the reader can identify each color code. The following screenshot shows the changes we made:

If you're working with surveys and have two opposed extremes like "Disagree" and "Agree", we recommend the following: Tone down the Neutrals and the Don’t  knows , and tone up the extrema to make them more clearly stand out.

If you do this, Datawrapper will recognize that you want to visualize survey results. It will center-align the labels of the middle category (Neutrals) and right-align the labels of the two categories to the right. This helps to communicate that the chart is showing two opposed positions:
Below the "Appearance" panel, you will find a  “Stack percentages (normalize values to 100%)” checkbox. That means you can upload absolute values (“350 people liked it, 150 disliked it”) and then convert it to percentages directly in Datawrapper (“70% liked it, 30% disliked it”). 

Custom range

Below the four panels, you can find one more option: "Custom range". Here you can decide which value range your x axis should cover. By default, the x-axis will be as long as your biggest bar. In our case, all bars are already 100% long, so that's not necessary. But in some charts, we want to show percentages close to 100%, so 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%. If we'd want to do that, we can write in a "100" in the "max"-field:

These are all the options you can find in the Refine tab. Let's move on to the Annotate tab. Here you'll find two options: "Describe chart" and "Labeling".



Describe chart

If you've created a Datawrapper chart or map before, you already know this feature. Here we can give your chart a title, a description, add notes and a source:

  • We recommend using the title to tell your readers what's interesting about this chart – the one key statement that you want to show on this chart, e.g. "Unemployment highest in the south"
  • The description should have as much information about the data as possible: What do we see exactly? E.g. "Unemployment rates in % in all US states, 2016"
  • Think of notes as footnotes, where we want to specify any abnormalities about your data. E.g. "California unemployment rates from Jan and Feb 2016 not included in the calculation."
  • The source name will give our readers the information about how trustworthy our data is. Does it come from a government institution or another trustworthy organization? The source URL lets our reader dig even deeper and have a look at the underlying data themselves. Both, source name and source URL, should be filled out on every map or chart to increase transparency. E.g. US Bureau of Labour Statistics, August 2017

Highlight elements

In the 2nd panel in the "Annotate" tab, we can choose to highlight elements: The label in front or above of these bars will appear in bold. We can revert the highlight by clicking on the x in front of the label:

Afer explaining the Annotate options, there's only one tab left: Design. 



In this last step, we can select a preset layout and enable social sharing functions to spread your work. 

  • Users of the free plan or Single users have two options: One layout with and one without the "Get the data" link
  • Users of every other plan are able to select a custom layout here 



After we worked through the four tabs of step 3: Visualize, we can now proceed to step 4: Publish & Embed. Here we can select a preset layout and enable social sharing functions to spread your work. Click on "Publish" and you'll be directed to the "Publish & Embed" page.

The best way to use a Datawrapper chart is by embedding it directly on your website. To do that, click the big blue button that says " Embed chart on website". Then, copy & paste the embed code snippet into your website or CMS. You can also download your chart as a PNG or PDF by upgrading to a paid Single or Team account. Click here for more information on the different pricing plans of Datawrapper.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us