When stacked bars work, why only the bottom segment is easy to compare, when to use 100% stacked bars, and when grouped bars or small multiples are better.
By DataVisuals TeamUpdated 5 min read
Best for
Showing how a total splits into a few parts across categories or periods, such as sales by channel per quarter.
Avoid when
Readers need to compare the middle segments precisely, or you have more than four or five parts.
Data you need
One category or time column, one column for the parts, and a numeric value for each combination.
A stacked bar chart draws one bar per category and splits it into colored segments, one for each part of the total. A bar for Q1 sales might be split into web, store and phone sales. The full bar shows the total; the segments show where it came from.
That double duty is its strength and its trap. Readers can compare the totals easily, and they can compare the bottom segment easily, because both start from the same baseline. Every other segment floats at a different height in every bar, and comparing those is mostly guesswork.
When to use a stacked bar chart
Use stacked bars when you need to show a total and its composition together, and the total is at least as important as the parts. Examples:
Revenue per quarter split by sales channel
Website visits per month split by traffic source
Survey responses per group split by answer
Energy use per year split by source
Keep the number of parts small, ideally two to four. Each extra segment adds a color to decode and makes the middle segments thinner and harder to judge.
If the total doesn't matter and you only care about comparing the parts, use grouped bars or a simple bar chart instead. If there is only one total, a single stacked bar, or in a few cases a pie chart, will do.
Only the bottom segment is easy to compare
Our eyes compare lengths well when the bars share a baseline. In a stacked chart, only the bottom segment and the total have that baseline. The segments above them start at different heights in each bar, so the reader has to compare lengths that are shifted up and down. People are poor at that.
Fig. 1 Sales by channel for four quarters. In the stacked bars, the Store segment floats on top of a changing Web segment, and its steady decline is hard to see. Drawn on its own baseline, the drop from 30 to 22 is obvious.
This gives you a practical rule for ordering segments. Put the part that matters most at the bottom, where it can be compared. If you want readers to track a part that sits in the middle, the stacked chart is the wrong tool for that part: give it its own chart, or move it to the bottom.
Direct labels help too. A segment labeled "Store 22" at the end of the last bar saves the reader a trip to a legend and gives them a number to hold on to.
100% stacked bars
A 100% stacked bar chart scales every bar to the same length, so each segment shows a share instead of an amount. It answers "how is the mix changing?" rather than "how big is each group?"
Fig. 2 Share of visits by device, 2021 to 2025. Mobile sits at the left edge, where its share is easy to compare, and grows from 48% to 68%. Total traffic is not shown at all.
This version shines for survey data, where groups often have different sizes and you want to compare answers as percentages. It also works for market share and device mix over time.
The cost is that the totals vanish. A segment can grow in share while shrinking in absolute terms, if the total fell faster. Say in the subtitle that the bars show shares, and if the totals moved a lot, show them in a small chart alongside.
For horizontal 100% bars, the leftmost and rightmost segments both have a fixed edge, so you can compare two parts easily rather than one. Put the two parts readers care about at the ends.
When grouped bars are better
Grouped bars place the parts side by side within each category, all starting from zero. Every part can be compared across categories, but the total disappears and the chart widens quickly.
Question
Better choice
How big is each total, and roughly what is it made of?
Stacked bars
How does one part compare across categories?
Grouped bars, or that part alone
How is the mix changing, regardless of size?
100% stacked bars
How do several parts each change over time?
Small multiples (one small chart per part)
Small multiples deserve more use than they get. One small bar chart per part, all on the same scale, lets readers compare every part on its own baseline. The reader gives up the total but gains every other comparison.
Rule of thumb: put the segment you most want readers to compare at the bottom. If you need two segments compared, you probably need two charts.
Colors and order
Stack the segments in the same order in every bar, and keep the legend (or the direct labels) in that same order, top to bottom. If readers see "Phone" at the top of the legend, it should be the top segment.
Use colors that are clearly different but not loud. A dark color for the part you discuss and lighter tones for the rest works well. For ordered parts, such as survey answers from "very unhappy" to "very happy", use a scale that follows the order: a sequential scale for a one-directional order, or a diverging scale centered on the neutral answer. The color guide explains both.
Thin white gaps between segments help readers see where one ends and the next begins, especially when neighboring colors are similar.
Stacked areas and other relatives
A stacked area chart is a stacked bar chart drawn as continuous layers over time. It has the same limits: the bottom layer and the total are readable, the layers in between wiggle up and down with the layers below them. Use it for a long time series with two or three parts, and avoid it for anything more.
For survey answers on an agree-disagree scale, a diverging stacked bar (with negative answers extending left from a center line and positive answers right) is often clearer than a plain 100% stack, because the neutral middle sits on a fixed line.
Common mistakes
Mistake
Why it hurts
Fix
Six or more segments
Colors blur, thin segments vanish
Merge small parts into "Other"
Key part in the middle of the stack
Cannot be compared across bars
Move it to the bottom, or chart it alone
Segment order changes between bars
Readers lose track
Same order in every bar
Legend in a different order from the stack
Extra decoding
Match the order, or label directly
100% bars without saying so
Shares read as amounts
Say "share of" in the title
Stacking parts that don't add up to a total
The total bar is meaningless
Use grouped bars
Before you publish a stacked chart, ask which comparison the reader needs most. If it is the total or the bottom segment, stacked bars are fine. If it is anything else, there is a simpler chart for it.
Questions
What is the difference between stacked and grouped bars?
Stacked bars put the parts on top of each other, so the total is easy to read but the parts are hard to compare. Grouped bars put the parts side by side on a shared baseline, so the parts are easy to compare but the total is not shown.
When should I use a 100% stacked bar chart?
When the mix matters more than the size, for example the share of mobile visits each year, or survey answers across groups of different sizes. Say clearly that totals are not shown.
How many segments can a stacked bar have?
Three or four is comfortable. Beyond five, the colors get hard to tell apart and the thin segments carry little information. Group the smallest parts into "Other" or switch to another chart.