Tree maps are ideal for displaying structured data as the space in the visualization is split up into rectangles that are sized and ordered by a quantitative variable (%, counts or sums). Treemaps can have one level of data as shown in the left example below or two levels of data as shown in the right example. Here we see two Treemap examples, the left one has one level of data and right one has two levels of data. When having two levels of data the user can click a level one group to get an enlarge view of the level two group which makes it easy to analyze the level two result even in cases where the level one result is very low.
Value based coloring can also be applied for visualizing differences in result and to highlight if results are meeting targets or not in the same way as the dynamic colors can be applied to a Heatmap.
Here we see an example of a Treemap, the cells have been colored in a gradient (red to green) based on the values in the cells.
In general the setup is similar to setting up other char ttypes but with some limitations which are listed below.
- Treemap can only be used for quantitative data which means that it is supported when calculating percentage shares, counts and sums only
- Significance testing, benchmark calculations, percentiles and mean value series cannot be applied to a Treemap
- A Treemap can only have one series of data so multiple series cannot be created when a Treemap is selected
- The sorting in a Treemap is always made by value descending form top left corner of the chart.
- The base size can only be displayed in the Tooltip and not in the chart.
- Controls for hiding date gaps, compare series without data etc. are hidden and always on when a Treemap is used as a Treemap cannot show “empty” data series.
- Settings for showing Top/Bottom X result cannot be applied to a Treemap as that is not the purpose of these type of visualizations.
To setup a Treemap add a chart object to your StoryTeller, select Treemap in the chart selection list and select the desired questions, filters and time settings in the same manner as always. When Treemap is selected the Axis and Legend nomenclature will change to Level 1 and Level 2 as shown in the example below. In the example image below you see that Axis and Legend have been changed to “Level 1” and “Level 2” when a Treemap is selected. In this case the gender split is positioned in level two and Age group split in level one.
If you only have one level of data you can either position all your items in Level 1 or in Level 2. There are four different series layout options when selecting the Treemap which you can read about below, this selection is only affecting the visual appearance and does not affect the calculation or thecoloring.
Here we see the control for selecting the series layout, this control is only appearing when Tree map is the selected chart type.
Squarified: A layout algorithm which aims to give each series a low aspect ratio for a better visual comparison. It adds the series one by one to a strip until it finds the best aspect ratio available. Then it alternates the direction and does the same with a new strip. The process continues in the same pattern until all series are placed in the chart. Squarified is the default option.
Strip: The Strip algorithm has the same objective as the Squarified algorithm, to get low aspect ratios. The process is quite similar, but instead of alternating the direction, the strips are drawn side by side as columns.
Slice And Dice: Simple and fast layout algorithm. The drawback with the Slice And Dice is that series can get different aspect ratios which makes it hard to compare results.
Stripes: Another simple and fast layout algorithm which is quite similar to Slice And Dice but instead of alternating the direction between each series, it draws all series in same direction, creating a set of columns.
The colors of the rectangles in the Heatmap can be picked from questions, answers, compare filters or the color template like any other chart type but a value based color option can also be applied which works in the same way as in the Heatmap. To apply the value based coloring select “Gradient scale colors” in the Series color source selection list.
Before defining the colors and the stops you have to select if the coloring shall be based on Level 1 orLevel 2 results and which coloring logic to be used; Fixed or a Dynamic scale. The Fixed scale option colors the rectangles by defined threshold values while a Dynamic scale colors the rectangles based on the minimum and maximum result in the Treemap.
In the example image below you see two identical Treemaps, the only difference is that the top chart uses a Dynamic scale and the bottom chart a Fixed scale. In the bottom chart a rectangle will for example be yellow if the value is in-between 10-20 but in the top chart a rectangle will be yellow if it is within the range of 10%-20% of all the values based on the minimum and maximum result in the chart.
Here we see two examples of Treemaps, the top chart is using a Dynamic scale while the bottom chart is colored by a Fixed scale.
The Fixed scale is great to indicate if values meet targets while the dynamic scale is great for highlighting differences in values when for example comparing different target groups or time periods.The number of defined colors is unlimited and if you do not wish to use gradients like in the examples above you can add the same color twice like in the example below.Here we see an example of “ranges” in the setup...
The position of the Treemap legend, that appears when value based coloring is applied, can be changed in the same way as any other chart type. The legend can be displayed top, bottom, left, right or be hidden completely. Here we see two examples of different legend positions (top and left).
The calculation of the Level 2 result in the Treemap works in same way as in any other chart type and the Level 1 result is calculated based on the Level 2 counts.
- The sum of all the level 1 results will be 100% and the % share of each Level 1 series is based on the counts of the Level two options.
Below we see a basic example. Gender is shown in Level two and Brands in Level one. The level two result is calculated like in any chart type based on selected settings such as filters, weighting, stacked/Full stacked calculation etc. The level one result has been based on the ingoing counts of the level two items as shown in the table below the chart.