π Unstack This: a new chart type you'll definitely use!
Published 24 days agoΒ β’Β 2 min read
π Hi!
Hope things are going great on your side of the world. β Over here, life is pretty sweet: I'm writing this while sipping mint tea in Morocco, where my brother is getting married! βοΈπ
Anyway, today I want to share something I love about the dataviz world: It's 2025, and somehow...
Weβre still inventing new chart types! β Let me show you in just a few minutes as usual.
β
π€― The trouble with stacking
Stacked bar & area charts are everywhere. β But they have a problem: they make it really hard to compare subgroups, especially the ones that arenβt sitting at the bottom.
Take this example from my Data to Viz project. Can you tell how the middle green group changes over time?
Can you tell how the middle green group changes over time? It's hard!
Itβs tough, right? β The lack of a shared baseline makes it almost impossible. (Answer is here btw).
β
π Grouped barplot to the rescue?
A grouped barplot fixes this by placing bars side-by-side instead of on top of each other.
β
Now, you can compare subgroups easily... but it's the total of each group that becomes very hard to grasp. π β Youβd have to sum all the bars in your head.
β
β‘οΈ Nested Column Charts
A few weeks ago, something cool popped up in the dataviz bubble. β A new chart type called the nested column chart, apparently invented by Brittany Rosenau.
Imagine a grouped barplot, but with a big grey block behind the bars representing the total.
β
Itβs brilliant. π₯
Now you can compare both the subgroups and the total at a glance.
How did I not think of this earlier?
π¨βπ³ Make your own!
You know I love dataviz tools & programming. So here is how to make this at home:
React + D3.js: Of course I had to build a version for web devs! With an extra touch: hover over subgroup names to highlight them in the chart β¨
Javascript = little touch of interactivity
So next time youβre about to reach for a stacked or grouped barplotβ¦ try a nested column chart instead.
And if you do, send me a screenshot. Seriously. Itβll make my day.
Cheers, β Yan β βPS: another cool thing happened this week. A student of my Matplotlib Journey course used his newly acquired skills to make a pretty chart that triggered a lot of interest on LinkedIn. β It's a cool way to represent a population pyramid so I thought I would share it too :)