Parts of a whole Stacked bar charts
A stacked bar chart uses different colour segments within each bar to show a breakdown of categories.
Visual styles for small multiple charts are detailed in our chart style guide on Notion (opens in a new tab) .
Example of a stacked bar chart
When to use a stacked bar chart
Use a stacked bar chart to compare the composition of totals across groups.
Stacked bars effectively communicate how the components make up parts of a whole and are most effective when the components vary significantly in size.
Comparing the size of segments in the middle of a stacked bar can be difficult because they do not share a common baseline.
Note: The guidance on this page is relevant for both horizontal stacked bar charts and stacked column charts. We use column charts to show time series data
Types of stacked bar charts
There are two main types of stacked bar charts: stacked bar charts with varying totals and 100% stacked bar charts.
Stacked bar charts with varying totals show the total value of each category, with segments representing the breakdown of that total.
This type highlights both the overall size and the components within each category. However, because the total size of the bar varies, it can be more difficult to compare the proportion of components within each bar.
Example of a stacked bar chart with varying totals
In a 100% stacked bar chart, also known as a percentage bar chart, all bars have the same total length, set to 100%.
This type of bar chart is ideal for comparing the relative proportions of components between categories, regardless of the size of the bars.
Use a 100% stacked bar chart when you want to compare the proportions of components across categories, such as comparing the distribution of home ownership across regions.
Example of a 100% stacked bar chart
Warning: Ensure that the total length of all bars in a 100% stacked bar chart exactly equals 100%. Rounding issues can cause bars to slightly exceed or fall short of 100%, which can be confusing.
Data type
The segments in stacked bar charts must represent parts of a total. Stacked bar charts should not be used for plotting rates or where values can fall into more than one category.
Showing a single breakdown
Only use a stacked bar chart when you want to compare values for two or more bars.
If you want to show the breakdown of components of a single total, use a pie chart or a standard bar chart. These charts make it easier to compare the size of the components.
Avoid overcrowding
To make your chart easy to read, limit the number of segments in each bar to five or fewer.
If there are many small or less significant series, combine them into an “other” category.
In custom charts where segments represent categories on a scale you may use more colours.
Colour
Use our standard category colour palette for stacked bar charts.
An exception is when segments have a natural order, which should have a colour scale palette. See the Using colours in charts guidance (opens in a new tab) for more information.
Order
Arrange both the bars and their segments in a logical sequence. See the Ordering in charts guidance (opens in a new tab) for more information.
Primary and secondary categories
Stacked bar charts show two sets of categories:
- categories represented by each bar (primary)
- categories represented by the segments within each bar (secondary)
Decide which variable should be represented by the bars and which should be represented by the segments. The bars should represent the categories you want to compare the composition between.
For example, if you have data on gender and economic activity, determine whether you want to compare:
- the breakdown by gender within each economic activity group
- the breakdown by economic activity within each gender group
Example of a chart comparing gender distribution between different economic activities
Example of a chart comparing economic activity breakdown between genders
Displaying positive and negative data
Stacked bars can include both positive and negative values.
Plot negative segments below the zero axis and use a point marker to indicate the net total.
Make sure the marker has a good level of contrast with the segments in the bar.