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). Below are three steps to customize your newly created stacked bars chart:



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 reported 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 by 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 re-sort or not re-sort at all. For our chart, the panel looks like this:

Under " Labelling", 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"
  • Choose 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 extremes 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:



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 clarify 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'' on the left side of the label:



    In the ''Design'' tab under step 3: Visualize, you can select a preset layout and enable social sharing function to share your work. Users of the Free plan have two options: one layout with and one without the "Get the data" link. Users of Datawrapper's Custom and Enterprise plan have the option to select a custom layout here. The output locale option allows you to choose a particular format in which you want the decimals, 1000 separators and dates to appear in your visualization.



    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 a SVG or PDF (available only to users of Custom and Enterprise plan). For more information on the different pricing plans, click here.

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