Plotly Treemap

A nested set of rectangles whose areas encode a numeric value, with color encoding a secondary metric and the rectangle hierarchy mirroring the data hierarchy. Built with Plotly so a single click drills into any rectangle — the children expand to fill the canvas — and a click on

Template details

  • chart
  • treemap
  • hierarchy
  • proportion
  • plotly

When to use this template

This visualization excels at revealing the proportional contribution of hierarchical segments to a total, making it easy to identify the largest contributors and their sub-components. Analysts use it to quickly understand resource allocation, budget distribution, or market share across multiple categorical levels, while simultaneously observing a secondary performance metric.

  • Hierarchical data with at least two nested categorical levels.
  • A primary numeric measure representing size or quantity.
  • An optional secondary numeric or ordinal measure for color.
  • Data where part-to-whole relationships are critical.
  • Positive, non-zero values for the primary quantitative metric.
  • Datasets with high cardinality at lower hierarchical levels.

Browse all Koan templates