Sankey Diagram vs Treemap: Which to Use
A treemap shows a strict hierarchy as nested areas; a Sankey shows quantities between categories even when a child has several parents. Compare them and pick the right one.
A treemap is the right chart for a strict hierarchy: every part belongs to exactly one parent. A Sankey is for quantities that connect categories in more than one way.
The example is revenue by region and by product. Each product is sold in several regions, so a product has more than one parent. A treemap would need to pick one hierarchy and repeat the other.
In the Sankey the product totals are visible directly: Product A is 550 of 1,000 even though it appears in all three regions.
Hierarchy or flow
A treemap divides a rectangle into nested rectangles, which assumes a tree. A Sankey allows a node to receive from more than one source.
Density and many parts
A treemap handles hundreds of small parts in a compact space. A Sankey runs out of room much earlier, and past a dozen nodes per column it needs grouping.
- Treemap: many parts, one hierarchy.
- Sankey: few parts, several connections.
- Treemap: area comparison only.
- Sankey: width along a shared scale, with flow direction.
Choosing
Choose a treemap for a large, strict hierarchy such as a file system. Choose a Sankey when the same category appears under several parents and its total matters.
Key points
- EMEA is half of revenue; Product A is 550 of the 1,000, spread across three regions.
- Product A is the largest product in EMEA (300) and the Americas (200), but second to Product B in APAC (50 against 100).
- Product C appears only in the Americas.
- The figures are invented.
The example’s data
Invented figures, balanced at every node.
| From | To | Amount (thousand euros) |
|---|---|---|
| Revenue | EMEA | 500 |
| Revenue | Americas | 350 |
| Revenue | APAC | 150 |
| EMEA | Product A | 300 |
| EMEA | Product B | 200 |
| Americas | Product A | 200 |
| Americas | Product B | 100 |
| Americas | Product C | 50 |
| APAC | Product A | 50 |
| APAC | Product B | 100 |
The same data as CSV
source,target,value
Revenue,EMEA,500
Revenue,Americas,350
Revenue,APAC,150
EMEA,Product A,300
EMEA,Product B,200
Americas,Product A,200
Americas,Product B,100
Americas,Product C,50
APAC,Product A,50
APAC,Product B,100How it works
Check whether each part has one parent
If yes, a treemap works. If a part appears under several, use a Sankey.
List the pairs with their amounts
For example region and product.
Enter the flows
Revenue to region, region to product.
Check the balance
Each region should pass on what it received.
Frequently asked questions
Can a treemap show flows?
No. It shows part-to-whole inside a hierarchy, with no direction between categories.
Which is better for many categories?
A treemap. A Sankey with many small nodes is hard to read; group the smallest into Other.
Edit this revenue Sankey
Open the example as your own chart and enter your regions and products.
