PlotSet LogoPlotSet
All chart types

Treemap Maker

Fit a whole hierarchy into one rectangle, sized by value. Upload your categories and numbers, and publish an interactive treemap you can embed anywhere — free.

What is a Treemap?

A treemap divides a rectangle into smaller rectangles, one per category, each sized in proportion to its value. Nest the categories and the tiles nest with them, so a whole hierarchy fits into a single fixed frame with no scrolling and no legend. That fixed frame is the trade: a treemap will happily display two hundred categories where a bar chart would need a second page, but it buys that density by asking you to compare areas, which the eye does less accurately than it compares lengths.

When to use a Treemap

  • You have a hierarchy to show

    Sector inside market, product inside category, folder inside drive. Nesting is what a treemap does that no bar chart can, and it is the main reason to reach for one.

  • There are too many categories for bars

    Fifty budget lines make an unreadable bar chart and a perfectly legible treemap, because the small ones shrink out of the way instead of stretching the axis.

  • The sizes are genuinely uneven

    Treemaps are at their best when a few large tiles dominate and the tail is small. Even values produce a grid of near-identical rectangles that says very little.

  • Space is fixed and precious

    A dashboard tile or a slide. The chart fills exactly the room it is given, whatever the number of categories.

When not to use a Treemap

  • Precise comparison matters

    Judging that one rectangle is 15% larger than another is genuinely hard, especially when their shapes differ. If a reader needs to rank the middle of the distribution, use bars.

  • You are showing change over time

    A treemap is a snapshot. Two treemaps side by side are almost impossible to compare because the tiling algorithm rearranges everything.

  • Any value can be negative

    A rectangle cannot have negative area. Profits and losses in the same treemap will silently misrepresent the losses.

  • You have only a handful of categories

    Five or six values with no hierarchy are a bar chart, and a clearer one. A treemap earns its complexity through nesting or through count.

How to make a Treemap

From a spreadsheet to a published chart, step by step.

01

Start from the treemap template

Open the PlotSet treemap template. It loads with sample data bound so you can see how the category, parent and value columns map onto tiles.

02

Shape your data as category, parent and value

One row per tile: its name, the group it belongs to, and its size. Leave the parent blank for a top-level tile. A flat treemap with no parents works too.

03

Upload or connect your data

Import a CSV or Excel file, paste from a spreadsheet, or connect a Google Sheet so the treemap can be refreshed later.

04

Use colour for a second variable

Size is already taken by the value. Colouring by group keeps the hierarchy readable; colouring by a rate — growth, margin, change — adds a whole second dimension for free.

05

Publish, embed or export

Publish for a live interactive embed where hovering a tile shows its exact value, or export a PNG, SVG or PDF.

Start from the Treemap template with sample data already loaded, then swap in your own.

Open the template

The parts of a Treemap

Tile
One category, drawn as a rectangle whose area is proportional to its value. The smallest tiles are often too small to label, which is a limit worth planning around.
Parent group
A block of tiles sharing a border and usually a colour family. This is where the hierarchy becomes visible.
Area
The encoding for value. Area is read less precisely than length, which is the reason tooltips and labels matter more here than in most charts.
Colour
Free to carry something other than size — group membership, or a diverging scale for change. Using it for size as well wastes it.
Tiling order
Most treemaps place the largest tile top-left and work outwards, so position is a rough ranking. It is a convention, not a guarantee.
Aspect ratio
How square the tiles are. Long thin rectangles are much harder to compare than square ones, which is why squarified layouts are the default.

Common Treemap mistakes

Including negative or zero values

They cannot be drawn, so they are dropped or forced positive, and the total silently stops adding up. Split them out and say so.

Labelling every tile

Text crammed into slivers is noise. Label what fits, put the rest in the tooltip, and consider grouping the tail into a single named tile.

Comparing two treemaps

The layout algorithm reorders tiles whenever the values change, so a before-and-after pair looks like two unrelated pictures. Use a slope chart or paired bars instead.

Colouring by size

Size is already encoded by area. Repeating it in colour throws away the one channel a treemap leaves free.

Treemap: common questions

Showing part-to-whole relationships across many categories, especially when those categories are nested. Budgets, market composition, disk usage and portfolio holdings are typical.

Make your Treemap now

Free to start with 300+ templates. No credit card required.