# Build a treemap

> Show how a total splits into parts as nested rectangles, each sized by its share.

Analyze · 3 min read · Updated 2026-10-28

A treemap shows how a total breaks down into parts. Each member gets a rectangle, and the bigger its value, the bigger the rectangle. Pick Treemap from the chart type selector.

## Fill the shelves

| Shelf | What it holds |
| --- | --- |
| Values | The dimensions to split by. Add more than one to nest the cells. |
| Label | Optional. Extra measures shown inside each cell as lines of text. |
| Color | Optional. Colors the cells by a field. |
| Size | Optional. The measure that sets each cell's area. |

1. Pick Treemap from the chart type selector.
2. Drag a dimension, such as Category, to Values.
3. Drag the measure you want to compare to Size.
4. Drag a field to Color if you want the cells shaded by it.

> **Note:** If you add only a dimension, Number of Records lands on Size, so each cell is sized by its row count until you swap in a measure.

## Format a treemap

Open the format pane and find Treemap options.

- Label position puts the cell names at Top left or Center, or Auto-hide on small cells.
- Show values in cells and Show percentage add each cell's value and share.
- Label rotation turns the cell labels.
- Label size sets the smallest and largest text size, so labels scale with their cells.

## Build it from the chat

You can ask the Analyst pane or a dashboard's Storyteller pane for one in plain words - "show sales by category and sub-category as a treemap" - and Golden fills the shelves for you. Treemaps work the same way in Analyze and on dashboards.

### Related

- [Build a chart](https://goldenanalytics.com/docs/chart-builder)
- [Format a chart](https://goldenanalytics.com/docs/format-a-chart)
- [Chart types](https://goldenanalytics.com/docs/chart-types)
- [Build a Sankey diagram](https://goldenanalytics.com/docs/sankey-diagrams)

Source: https://goldenanalytics.com/docs/treemap-charts
