

We can place one category at the top and the other at the bottom, so it’s easy to see whether production levels are shrinking or growing as a proportion of the total. Unlike the original, you can now compare two categories across bars with ease because of the consistent starting point.Ĭontinuing with the example, let’s say the goal was to emphasize the production of tablets and phones. The benefit is that there are two baselines. In this variation, the bars extend from 0 to 100%. In the stacked family, you can opt to visualize percentages instead of absolutes, creating a 100% stacked bar chart. Similar to other chart types, related alternatives exist. Up until now, we’ve only looked at a typical stacked bar chart. If a precise analysis of multiple subcategories is important to show, then you’d be better served by iterating to a different approach than a stacked bar chart: unstack the bars and show separate bar charts, for instance or, abandon bars altogether, and use a line graph. Have phone production levels increased or decreased in recent years? What about tablets? Because these categories come higher in the stack and no longer align to a consistent baseline or starting point, insights about the data are much harder to see. Just as we can quickly scan across the tops of the entire stack to easily compare the total heights of the bars, we can quickly compare just the purple segments in this example by scanning across their tops, because we know that the bottom of each one starts at the same place (usually, zero).Ĭhallenge yourself to answer questions about the other subcategories in this chart. The bottom subcategory in a stacked bar chart will always be the easiest to compare since it has a consistent baseline across all of the bars. Notice how it’s easy to see details about laptop production, but much harder to do the same for the other devices? That’s because “laptops” are the bottom-most subcomponent in this graph. This is where many stacked bar charts fail. If your main goal is to compare the subcomponent pieces across each bar, be careful.

If you have to talk about both the overall total and the subcomponent breakdown, but your main goal is to focus on the total length of the bars, stacked bars could work. The opposite is not true.
#Am charts stack bar chart post units portable
It’s also clear that phones (teal) are produced more frequently compared to other portable devices, tablet production (blue) is the smallest, and production for laptops (purple) has declined in recent years but is expected to increase.Ī couple of worthy takeaways here. Now we have two categorical variables: year and device. But if we also wanted to get a sense of the breakdown by device, we could morph the traditional bar chart into a stacked bar chart showing the component contribution. The total production of all devices can be displayed in a standard bar chart. Here we have total production levels and forecasts for a few types of devices: tablets, phones, and laptops. The first (and primary) variable is shown along the entire length of the bar, and the second variable is represented as stacks within each categorical bar. A stacked bar chart shows two categorical variables. A traditional bar chart displays a single categorical variable in the form of bars. While this may seem obvious, a stacked bar chart is not the same as a standard bar chart. In this guide, we’ll aim to rectify these mishaps by sharing examples, clarifying when you should (and shouldn’t) use a stacked bar chart, and discussing best practices for stacking bars.

Despite their prevalence, they are commonly both misused and misunderstood. Stacked bars are everywhere you’ve likely seen them in a recent report, a dashboard, or in the media. A few years ago, we posted a question on this blog that is as relevant today as it was years ago: “ Is there a good use case for a stacked bar chart?”
