Using a treemap
A treemap is a visualization that can display a large amount of hierarchical data using nested rectangles of varying size and color. The total area of a treemap normally reflects the sum of its parts, which consist of inner rectangles or nodes.
Treemaps have the ability to display a second measure as the color or shade of each rectangle.
2. Elements of a treemap
The figure below shows the main elements of a treemap data visualization.
This example is configured with a Product hierarchy, and two measure values (OrderQty and LineTotal). The OrderQty measure is used to determine the size of each treemap node. This value is also displayed as text within each node. The LineTotal measure is used to determine the color of each node. A darker shade of blue implies a higher LineTotal value for that node.
Headings (seen here in black) group the rectangular nodes into multiple hierarchical levels: in this case product category, product subcategory, and product.
3. Choosing a treemap
When editing a metric set, dashboard, or another view, choose Treemap from the Data Visualization or Re-Visualize toolbar menu.
Select at least one measure (numeric data) and at least one hierarchy in your metric set to visualize as a treemap.
4. Exploring data
Treemaps excel at visualizing the hierarchical grouping of data. You can explore and navigate hierarchical data using a treemap.
4.1. Drilling down
When a multi-level hierarchy is selected, right click the Clothing node and select Drill Down.
The treemap now shows a new heading corresponding to the Clothing product category, which is stacked below the All heading. The nodes of the treemap now correspond to product subcategories of the Clothing category.
Right click the treemap and click Drill Up to go back to the previous view.
4.2. Change the hierarchy level
With a multi-level hierarchy, you can change the details level lower and view its data grouped by the upper levels of the hierarchy.
To change the displayed hierarchy level, right click the treemap, and then select Change Level.
Select a hierarchy level from the submenu. For example, select Product Subcategory.
The treemap now displays all product subcategories in the form of nodes that are grouped under their respective headings.
You can also change the level from the Data Analysis Panel by editing the hierarchy's settings.
4.3. Expanding and collapsing
When multiple hierarchies or a multi-level hierarchy is selected, you can right-click data and choose Expand to view that node's data broken up into additional details, or Collapse to combine multiple values into a summary.
For details and examples with treemaps and other visualizations, see Expand and collapse hierarchy members.
This section describes some of the key properties of a treemap.
5.1. Color rules
The second measure added to a treemap is assigned automatically as Color in the Data Analysis Panel Visualization tab, or you can add a measure there yourself.
In the Properties window for a treemap, click Look and expand the Color Rules section. You'll see the default Auto Color Rule item which you can click to view or edit.
Use the From Color and To Color properties to set the range of colors for mapping to the measure values. You can choose to have colors ranging from red to green, for example, instead of using different shades of a single color.
There are also some more advanced properties in this section which allow you to set the Number of Classes (the number of different data ranges where each range is associated with a display/color value), and choose the Distribution method for assigning data points to the various classes. For more details on distribution methods, see Displaying symbols on a map.
5.2. Heading background
In the Look tab, expand the Heading Background property to see options for changing the background color of a heading.
5.3. Layout mode
In the Layout tab, you'll find the Layout Mode property which is set to Rectangular by default. Rectangular is the most common option but you can change it to a Vertical or Horizontal layout instead to display a single row or column of rectangles of varying sizes.
In the Text tab, you can customize the Label Text and Tooltip Text properties for either headings and/or nodes.
These properties accept regular text as well as placeholder keywords for inserting the hierarchy member name, the value of the Size measure, and measure column values.
See Formatting text for details about supported keywords and formatting.
- Treemaps require the metric set's total values to represent the sizes of nodes correctly, so totals should be left as enabled on the metric set and its hierarchies.