Intro

Treemaps are used to display hierarchical data. The information is displayed as a cluster of rectangles varying in size and color, depending on their data value. The size of each rectangle represents a quantity, while the color can represent a number value or a category. Treemaps are economical in that they can be used within a limited space and yet display a large number of items simultaneously. Treemaps allow you to view trends and make comparisons quickly.

Treemap chart

Treemap chart

Usage

Treemaps are one of the most compact and space-efficient options for displaying hierarchies and are also great for comparing the proportions between categories via their size. When there is a correlation between color and size in the tree structure, the user is able to see patterns that would be difficult to spot in other charts.

Use the treemap if:

Do not use the treemap if:

Responsiveness

The treemap chart is fully responsive. When the size of the screen gets smaller, the labels start to truncate and hide if there is not enough space.

Treemap chart - Size L

Treemap chart - Size L

Treemap chart - Size M

Treemap chart - Size M

Treemap chart - Size S

Treemap chart - Size S

Color Palette

The treemap chart supports sequential and semantic color palettes.

Legend

The treemap chart supports both the legend and value-based legend.

Drilldown

You can let users drill down through the hierarchical data. This is done by selecting a rectangle and pressing the Drill Down button in the chart toolbar.

Drilldown in a treemap chart

Drilldown in a treemap chart

Selection and Popover

When the user clicks on a rectangle, all the associated values are displayed in a popover. You can also customize the popover to display other information and actions.

Resources

Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.

Elements and Controls

Implementation

Visual Design