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 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. Just specify a start and end color and have Dundas BI calculate the proper shading for 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 on its ROWS axis, 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 and nodes generally correspond to members of a Product hierarchy consisting of three levels (product category, product subcategory, and product).
3. Data preparation
The easiest way to set up a treemap is to prepare a metric set beforehand. For example, create a new metric set by dragging two measures (OrderQty and LineTotal) and a Product hierarchy/dimension to the canvas.
The first measure will be used to determine the size of the nodes (rectangles) while the second measure will be used to coloring the nodes.
4. Add a treemap
Create a new dashboard from the main menu and use the Blank template.
Go to the toolbar, click Data Visualizations, and then click Treemap.
An empty treemap is added to the canvas with its Data Analysis Panel open.
Go to the Explore panel, locate your metric set, and drag it onto the treemap on the canvas.
The treemap now displays nodes (rectangles) corresponding to the top level of the Product hierarchy (in this case, product categories such as Bikes and Clothing).
5. Drill down on a treemap
In View mode, you can drill down or drill up on the treemap's hierarchy using the context menu.
For example, 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.
6. Change the hierarchy level
By default, a treemap displays nodes corresponding to the top hierarchy level. To change the displayed hierarchy level, switch to View mode, 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 achieve this effect in Edit mode by editing the hierarchy from the Data Analysis Panel.
This section describes some of the key properties of a treemap.
7.1. Auto Color Rule
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 secondary 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.
7.2. Heading Background
Under Look \ Appearance, expand the Heading Background property to see options for changing the background color of a heading.
7.3. Layout Mode
Under Layout \ COMMON, you'll find the Layout Mode property which is set to Rectangular by default. Rectangular is the most compact option but you can change it to a Vertical or Horizontal layout instead.
Under the Text section, you can customize the Label Text and Tooltip Text properties for either headings and/or nodes.
These properties accept regular text as well as special keywords for inserting the hierarchy member name, the value of the Size measure, and measure column values.
Below is a list of the supported treemap-specific keywords.
|[Member]||The hierarchy member caption (a column's values each become a hierarchy member caption if it's a hierarchy).|
|[Level]||The hierarchy level caption.|
|[Size]||The measure value for the measure used to determine the node size.|
|[SizeMeasure]||The name of the measure used to determine the node size.|
The treemap also supports standard keywords such as the name of a measure.
8. See also