Treemaps display hierarchical data by using nested rectangles, that is, smaller rectangles within a larger rectangle.
In this image you have several product groups, such as
Sorting is automatic according to size. By default, the coloring is by dimension, with 12 colors, but that can be changed in the properties panel. When you have more than one dimension, you can decide which dimension to color by. In this example, the coloring is not by dimension, but by expression (Avg(Margin)), a calculated measure, and by using this expression, you can see which items have the highest average margin. The darker the color, the higher the average margin.
If the data set contains negative values, a text message is shown stating that the negative values cannot be displayed.
When to use it
Use a treemap when space is constrained and you have a large amount of hierarchical data that you need to get an overview of. Treemaps should primarily be used with values that can be aggregated.
Treemaps are economical in that they can be used within a limited space and yet display a large number of items simultaneously.
When there is a correlation between color and size in the tree structure, you are able to see patterns that would be difficult to spot in other ways, for example, when a certain color is particularly relevant.
Treemaps are not good when there is a big difference in the magnitude of the measure values. Nor is a treemap the right choice when mixing absolute and relative values.
Negative values cannot be displayed in treemaps.
Creating a treemap
You can create a treemap on the sheet you are editing.
- From the assets panel, drag an empty treemap to the sheet.
- [軸を追加] をクリックして、軸または項目を選択します。 This should be the highest level in the hierarchy. It will be displayed as the main group in the chart.
- [メジャーを追加] をクリックし、メジャーを選択するか、項目からメジャーを作成します。 The measure will define the size of a rectangle.
- Add more dimensions in the order of hierarchy level . The last dimension you add defines the rectangles. The other dimensions define the grouping of the rectangles.
In a treemap you need at least one dimension and one measure, but to make full use of the treemap it is preferable to have two or three dimensions. You can only have one measure, but up to 15 dimensions. We do not recommend using more than three dimensions as the treemap may become unmanageable.
When you have created the treemap, you may want to adjust its appearance and other settings in the properties panel.
Adding custom tooltips
You can add measures as custom tooltips that appear as additional tooltips over a rectangle. You can add a measure from a field, or you can add a measure using an expression.
Styling the custom tooltip
You can change the way the tooltip is displayed.
- You can change the label of the tooltip with Label.
- You can set the formatting with Number formatting.
Custom tooltips cannot be used with set expressions, expressions using total, or charts with calculated dimensions. In snapshots, basic tooltips will be shown instead of customs tooltips.
When displaying large amounts of data in a treemap , there may be cases when not each dimension value within a rectangle is displayed with correct color and size. These remaining values will instead be displayed as a gray, striped area. The size and total value of the rectangle will still be correct, but not all dimension values in the rectangle will be explicit.
To remove the gray areas, you can either make a selection or use dimension limits in the properties panel.