Alternatives to a Stacked Bar

by Bianca Ng

DSNY2 began our client projects recently, and one of my charts drew ire (rightfully so). Though I originally had misgivings about it, I proceeded to utilize a stacked bar chart. Today, I’ll cover my redemption ch(arc)t.

Goal: To show totals and compare between categories.

A stacked bar chart seems reasonable, but examine the chart below and try to compare across categories. You can compare the left-most category, but what about a category in the middle?

Inspiration: Makeover Monday 2021 Week 30

Data: Population Distribution by Race/Ethnicity (select Timeframe: 2021, and Data View: Number)

At time of writing, the values for Asian and American Indian/Alaska Native appear to be swapped - all the visualizations below were created with aliases while keeping the original data the same. I also used Tableau Prep to pivot (columns to rows) the data.

The left-most category starts at 0 across the chart. When you move one category to the right, it starts from different places and becomes more difficult - not only do you have to gauge the length of that section, but also consider where it started. Additionally, with a high number of categories and some of them almost too small to see, we need to find another way to visualize the comparison.

We can still see the total population by state, but since we can’t compare the Asian population (for example) across states effectively, the color is not helping our understanding.


I spent time exploring some alternatives and here are the results (link to Tableau Public).

1. Unstacking the bars

Having totals on the side, and separating the single stacked bar into several bars retains the total population comparison, and allows for comparison between states and within states. Downside - this is a big viz.

2. Tile Grid (Map)

With state data, I really wanted to make a cool tile grid map like I’ve seen so many times on Tableau Public. This is good for comparing within states, and not quite as good for comparing across states or seeing small differences - especially when the bar is near 0.

3. Stacked bar with a sort

The evil is back with a twist - this chart now sorts a single selected category to the left, allowing for comparison as that particular bar now starts at 0 for all states. It also keeps the totals in the same chart, and can be used to compare one category at a time. Again, this is a big viz and can look messy with the amount of colors.

4. Filtering down to just one state or just one race

If the goal is to compare within states, or just across states, we can just separate the charts and filter it down to what you’re looking for. It can always be used in conjunction with an overall chart if we’re missing the totals.

Whew - bar exam over.