← All chart types

composition family

treemap

Hierarchy as nested rectangles, area encodes magnitude.

Composition with hierarchy and many small leaves. Each rectangle's area is proportional to its value; nesting shows parent-child relationships. Strong for showing portfolios, market structures, budget allocations with hundreds of items.

When to use

20+ items where total composition + hierarchy matter, and you have screen real-estate.

When NOT to use

Few items (use bar), no hierarchy (use bar sorted), or items have wildly varying scales (small ones become unreadable).

Rhetorical roles

  • distribute
  • decompose

Variants & related

Required primitives

  • has_data_labels

Optional primitives

  • has_legend
  • has_source_note

Common anti-patterns

  • rainbow-palette
  • unreadable-small-cells

Disambiguation rules

  • Rectangles tile a rectangular space without gaps; sizes vary.
  • If the layout is radial (concentric rings), it is sunburst.