> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-06-24-docs-simplify-date-zoom-usage-description.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Treemap chart

> Use treemap charts to show parts of a whole using nested rectangles.

Treemaps show parts of a whole using nested rectangles. Each rectangle's size represents the value of a metric, and dimensions define how the data is grouped and nested. You can use a single dimension or multiple and they will work as described below.

**One dimension**: Each category becomes a rectangle, sized by the metric value.

<Frame>
  <img src="https://mintcdn.com/lightdash-06-24-docs-simplify-date-zoom-usage-description/sEKjy2UyAItBAfnq/images/references/chart-types/treemap-single-dim.png?fit=max&auto=format&n=sEKjy2UyAItBAfnq&q=85&s=9cda5b337ea4e8a950555da9aae6a986" alt="" width="2258" height="1222" data-path="images/references/chart-types/treemap-single-dim.png" />
</Frame>

**Two dimensions**: Creates a hierarchy where each rectangle is split into sub-rectangles based on the second dimension.

<Frame>
  <img src="https://mintcdn.com/lightdash-06-24-docs-simplify-date-zoom-usage-description/sEKjy2UyAItBAfnq/images/references/chart-types/treemap-two-dims.png?fit=max&auto=format&n=sEKjy2UyAItBAfnq&q=85&s=f5155964d572e2343bc434ac3cd7b8a9" alt="" width="2272" height="1230" data-path="images/references/chart-types/treemap-two-dims.png" />
</Frame>

**Three or more dimensions**: The chart displays the top-level hierarchy. Users can click to drill down into deeper layers.

<Frame>
  <img src="https://mintcdn.com/lightdash-06-24-docs-simplify-date-zoom-usage-description/sEKjy2UyAItBAfnq/images/references/chart-types/treemap-drilldown.gif?s=06e46937de265b998e62b19bbc2dbd6d" alt="" width="2874" height="1508" data-path="images/references/chart-types/treemap-drilldown.gif" />
</Frame>

Treemaps are useful when:

* You want to compare proportions across categories
* You're visualizing hierarchical data
* Space is limited and you want a compact alternative to bar or pie charts

To create a treemap, select **Treemap** as the chart type and choose your dimensions.

## Layout

* **Dimension hierarchy** tells Lightdash how to group or nest the dimensions.
* **Size metric** determines how large each section of the treemap chart is.
* **Color metric** allows you to set a color scale for Highlighting each section of the treemap.

## Display

* **Minimum section size** determines when to start hiding sections, anything smaller than this size can be shown by zooming in.
* **Max leaf depth** allows you to choose when a user needs to start drilling into sections to see the next tier, default value is 2.
