Treemap vs stacked bar for showing composition
Both show parts of a whole. The deciding factor is how many parts there are and whether time is involved.
Treemaps scale to many categories
Twenty rectangles sized by value stay readable in a way twenty stacked segments never do. Portfolio holdings, budget lines, market share by vendor — all natural treemaps.
Treemaps are bad at time
Comparing two treemaps means comparing areas across separate images, which people do poorly. As soon as the question involves change over time, treemaps stop working.
Stacked bars handle periods
One bar per quarter with the same segments in the same order lets the eye track a single band across time. That is the comparison a treemap cannot make.
Neither is good above about thirty items
Past thirty, treemap rectangles become slivers you cannot label. Group the tail into Other and put the detail in a table underneath.
- One period, many categories → treemap.
- Several periods, few categories → stacked bar.
- Several periods, many categories → line chart of the top five plus Other.
A useful pairing: treemap for the current snapshot, small line chart underneath for how the top three got there.
Frequently asked
When is a treemap better than a pie chart?
Above roughly six categories, or when values span orders of magnitude. Rectangles remain comparable where thin slices stop being.
Can treemaps show change over time?
Not well. Comparing areas across two images is unreliable; use a stacked bar or line chart when time is part of the question.