Try it on your own data
Every report in this article is in the free plan. One snippet for web and apps, up to 10 sites.
Start freeA stacked bar chart splits each bar into segments, so it shows totals and composition together. It reads well for the totals and for the segment on the baseline. Every other segment floats and is hard to compare. Use grouped bars to compare segments, and a 100% stacked bar to compare mix.
What you will learn
- Stacked bars show totals and the bottom series well; put the series that matters on the baseline
- Floating segments are judged by length, which people do less accurately than position on a common scale
- A 100% stack hides totals: in the sample Email orders rose 19.4% while its share fell 1.0 point
Stacked, grouped or 100% stacked: which one fits your question?
All three charts show a value split two ways, such as orders by quarter and by channel. They differ in what they make easy to see. Pick by the question you expect the reader to ask, because no single version answers all of them.
| Reader's question | Chart | What it sacrifices |
|---|---|---|
| Did the total grow, and what is it made of? | Stacked bar | Comparing any segment except the bottom one |
| Which channel grew, and by how much? | Grouped bar | Seeing totals at a glance |
| Did the mix shift? | 100% stacked bar | The size of the totals |
| How did one channel move over many periods? | Small line charts, one per channel | The part-to-whole view |
If the question is two of these, show two charts or a chart plus a small table. A stacked bar asked to do all four does one well.
What does one dataset look like in all three?
Sample data: an online furniture shop's orders by acquisition channel over four quarters.
| Quarter | Search | Social | Direct | Total | |
|---|---|---|---|---|---|
| Q1 | 400 | 300 | 180 | 220 | 1,100 |
| Q2 | 520 | 280 | 200 | 200 | 1,200 |
| Q3 | 460 | 420 | 190 | 230 | 1,300 |
| Q4 | 610 | 330 | 215 | 245 | 1,400 |
The stacked version draws one bar per quarter, 1,100 to 1,400 tall, with the four channels piled in that order. The grouped version draws 16 separate bars in four clusters, all starting at zero. The 100% version stretches every bar to the same height and shows each channel's share:
| Quarter | Search | Social | Direct | |
|---|---|---|---|---|
| Q1 | 36.4% | 27.3% | 16.4% | 20.0% |
| Q2 | 43.3% | 23.3% | 16.7% | 16.7% |
| Q3 | 35.4% | 32.3% | 14.6% | 17.7% |
| Q4 | 43.6% | 23.6% | 15.4% | 17.5% |
Same 16 numbers, three different headlines. "Orders up 27% since Q1" comes from the stacked chart, "Search up 53%, Social up 10%" from the grouped one, and "Email's share slipped" from the 100% one.
What does a stacked bar chart show well?
Two things: the total of each bar, and the segment sitting on the baseline. Both are read from a common zero line. In the sample, totals climb 1,100, 1,200, 1,300, 1,400, and the bottom segment, Search, can be compared directly: 400, 520, 460, 610.
That gives a design rule worth following every time: put the series the reader cares about most at the bottom. If this quarter's story is Social, stack Social first. Whatever sits on the baseline gets accurate comparison; everything above it pays a price.
The CDC's data visualization guidance recommends stacked bars mainly for part-to-whole comparison across time periods or categories. That matches the strength: a reader sees how large each whole is and roughly what it contains. It is a poor way to ask readers to rank the middle pieces.
A stacked bar is also only honest when the segments add up to something real. Orders by channel add to total orders. Unique visitors by channel usually do not, because one person can arrive through two channels. Conversion rates, averages and medians never stack; their sum means nothing.
Why are the middle segments so hard to compare?
A middle segment does not start at zero. Its starting point is the sum of everything below it, so it moves from bar to bar. Look at Email in the stack:
| Quarter | Segment starts at | Segment ends at | Email orders |
|---|---|---|---|
| Q1 | 700 | 880 | 180 |
| Q2 | 800 | 1,000 | 200 |
| Q3 | 880 | 1,070 | 190 |
| Q4 | 940 | 1,155 | 215 |
To see that Email fell from Q2 to Q3, the reader has to compare two lengths floating 80 orders apart. The difference is 10 orders, or 5%. On a chart 400 pixels tall with an axis from 0 to 1,500, each Email segment is about 53 pixels and the difference under 3 pixels.
Research on graphical perception explains why this is hard. William Cleveland and Robert McGill's 1984 experiments ranked how accurately people judge different visual encodings. Jeffrey Heer and Michael Bostock replicated the study in 2010 with online participants: in the judgment types they re-tested, position along a common scale still significantly outperformed length. A segment on the baseline can be judged by the position of its top. A floating segment can only be judged by its length.
The practical reading: if a comparison matters, give it a shared baseline. That can mean reordering the stack, switching to grouped bars, or printing the values.
One dataset, three headlines
| Chart | Headline a reader takes away |
|---|---|
| Stacked | Orders up 27% from Q1 to Q4 |
| Grouped | Search up 53%, Social up 10% |
| 100% stacked | Email share fell from 16.4% to 15.4% |
| Table of counts | Email orders rose 180 → 215 |
When do grouped bars win?
Grouped bars give every value its own bar from zero. In the sample, the grouped chart shows at once that Social jumped from 280 to 420 in Q3 and dropped back to 330 in Q4, a 21% fall, and that Email moved within a narrow 180 to 215 band.
Their cost is space and totals. With 4 quarters and 4 channels there are 16 bars; with 12 months and 6 channels there are 72, which is no longer readable. And the eye cannot add four bars to get a quarter's total.
A decision rule that works in practice:
- Up to about 4 series and 6 categories: grouped bars are comfortable.
- More categories than that: use small multiples, one small panel per channel, all on the same scale.
- More series than that: group the small ones into "other", or pick the two or three the decision depends on.
For two numeric variables, where you want to see a relationship rather than amounts, a bar chart of any kind is the wrong tool; a scatter plot is the right one.
What does a 100% stacked bar hide?
It removes the totals. Look at Email from Q1 to Q4: orders went from 180 to 215, up 19.4%. Share went from 16.4% to 15.4%, down 1.0 point. Both are true. Email grew; the shop as a whole grew faster (27.3%). A reader who sees only the 100% chart will likely conclude that Email is shrinking.
Three habits prevent that:
- Print the total above each bar (1,100, 1,200, 1,300, 1,400).
- Name the unit on the axis as "share of orders", not just "%".
- Show shares and counts side by side when a budget depends on the answer.
100% stacks still have a baseline advantage at both ends: the bottom segment reads from 0 and the top segment reads down from 100. With only two or three segments, that makes them very readable. With six, the middle four are floating again.
Which design choices make a stacked bar readable?
| Choice | Rule | Reason |
|---|---|---|
| Number of segments | About 5 at most, with the rest as "other" | Every extra segment adds another floating baseline |
| Segment order | Most important series on the baseline; same order in every bar | The eye tracks position and order before color |
| Category order | Time left to right; otherwise sort by total | Sorting turns the totals into a ranking |
| Labels | Direct labels or values where space allows | Legends force back-and-forth matching |
| Color | Distinct hues plus a thin white gap between segments | Adjacent areas need to be told apart |
| Long category names | Use horizontal bars | Rotated text is slow to read |
| Negative values | Draw them below zero, as a diverging stack | Mixing them into one pile breaks the totals |
Two accessibility points come from W3C guidance. Color should not be the only way to tell segments apart (WCAG 2.2 success criterion 1.4.1), so label them or add values. And parts of a graphic needed to understand it should reach at least a 3:1 contrast against adjacent colors (1.4.11), which is where a border or gap between segments helps.
| Variant | Shows best | Typical mistake |
|---|---|---|
| Stacked | Totals and the baseline series | Asking readers to compare middle segments |
| Grouped | Segment-to-segment comparison | Too many bars in each cluster |
| 100% stacked | Change in mix | Forgetting that totals disappeared |
| Diverging stacked | Gains versus losses around zero | Summing positives and negatives into one pile |
| Small multiples | Trend of each series | Different y-axis scales across panels |
Choose by the reader's question; show two charts if there are two questions.
How do you make one in a spreadsheet?
- Lay the data out wide: one row per category (quarter), one column per series (channel).
- Select the block, including headers, and insert a stacked column or bar chart.
- Reorder the series so the one that matters is drawn first.
- For a 100% version, either choose the percentage stacking option or compute shares yourself, for example
=B2/SUM($B2:$E2), and check that each row sums to 100%. - Add a totals row and label it above each bar.
- Check that the totals match the source report before sharing.
If your data is in long format (one row per quarter and channel), pivot it first. A pivot table with quarter as rows, channel as columns and a sum of orders as values produces the layout in step 1.
Before publishing, run the test that catches most problems: ask a colleague which channel grew most from Q1 to Q4. In the sample the answer is Search (+210 orders, 52.5%). If they cannot say it in a few seconds from your chart, change the chart.
Where do stacked bars appear in TapCub?
The furniture shop could get its channel-by-period table from TapCub if the purchase event is tracked.

- Open All-platform analytics › Behavior › Event analysis, pick the purchase event with total count, and add a breakdown by channel. The chart keeps the 10 largest groups, so check the total without the breakdown.
- Set the granularity to week or month and the chart type to stacked bar to see totals and composition. Switch to line when you need to compare channels one at a time.
- Export the result as CSV from the ⋯ menu, then build a grouped or 100% version in your spreadsheet if the question needs it.
- For session mix rather than orders, Web analytics › Sources shows channel mix over time and can display either counts or shares.
TapCub also uses a diverging stack where values have opposite meanings. All-platform analytics › Behavior › Lifecycle counts new, returning and resurrecting users above zero and dormant users below it, by week or month. Dormant users are drawn on the following period, and the current unfinished period is not judged as dormant, so the latest bar has no downward part. The report has no breakdown or comparison period. Read it for the balance between what joined and what left; to compare one group across weeks, use the exported numbers.
The chart does not decide what to do next. For choosing among line, bar and area for traffic, see website traffic graphs; for the broader set of chart types, data visualization.
FAQ
What is a stacked bar chart used for?
It shows how a total is divided into parts across several categories or time periods. The full bar gives the total and the segments give the composition. It works when the parts add up to a meaningful whole and there are only a few of them.
What is the difference between a stacked and a grouped bar chart?
A stacked chart piles the segments into one bar per category, emphasizing totals. A grouped chart places each segment as its own bar from zero, side by side, emphasizing comparison between segments. Grouped bars take more width and hide totals.
What is a 100% stacked bar chart?
Every bar is scaled to the same height, and segments show shares rather than amounts. It is useful for tracking mix. It hides the size of the totals, so a segment can lose share while its actual value grows; print totals alongside it.
How many segments should a stacked bar have?
There is no formal limit, but beyond about five the colors get hard to match and the middle pieces hard to compare. Keep the most important series on the baseline, combine small ones into "other", and move detail into a table.
Can a stacked bar chart show negative values?
Yes, as a diverging stack where positive segments build upward from zero and negative ones downward. Label the zero line clearly. Do not add positive and negative segments into a single total unless the net figure is what you want readers to take away.
Sources
Was this article helpful?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Technical Engineer
Focuses on tracking code, SDKs, and API integrations, with practical guidance on implementation checks and troubleshooting.



