Treemaps let you display data in nested rectangles. You use dimensions to define the structure of the treemap, and measures to define the size and/or color of the individual rectangles.Treemaps are a relatively simple data visualization that can provide insight in a visually attractive format.
In Tableau, you create a treemap by first placing one or more dimensions on the Columns shelf and one or two measures on the Rows shelf. Then choose treemap from Show Me.
The treemap you will create in this exercise shows aggregated sales totals across a range of product categories. You then have two options for enhancing this basic treemap.
Connect to the Sample - Superstore - English (Extract) data source, which is included with Tableau Desktop.
Drag the Category dimension to Columns.
A horizontal axis is created showing product categories.
Drag the Sales measure to Rows.
The measure is automatically aggregated as a sum and a vertical axis is created.
Tableau displays a bar chart—the default chart type when there is a dimension on the Columns shelf and a measure on the Rows shelf.
Choose the treemap chart type from Show Me:
Tableau displays the following treemap:
In this treemap, both the size of the rectangles and their color are determined by the value of Sales—the greater the sum of sales for each category, the darker and larger its box.
Drag the Ship Mode dimension to Color on the Marks. In the resulting view, Ship Mode determines the color of the rectangles—and sorts them into three separate areas accordingly—and Sales determines the size of the rectangles:
To examine another option to modify the treemap, click the Undo button to remove Ship Mode from view. For more information, see Undo and Redo.
Drag the Profit measure to Color on the Marks card. Now Profit determines the color of the rectangles, and Sales is determining their size: