Skip to content

Treemap

Many parts in groups, sized by value.

Definition · Updated Nov 2, 2026

A treemap fills a rectangle with tiles sized by value and grouped by category, so the big sellers and the long tail show in one view. Use it for sales by category and subcategory, spend by team or storage by folder.

Pay once. Every update included.

Live preview

Sales by categoryQ3 net sales of $535K across 4 categories and 15 subcategories; Apparel is the largest at $227K, led by Shirts at $84K.Shirts$84KDenim$62KBedding$58KAPPARELHOMEBEAUTYOUTDOOR
Sales by category
CategorySubcategoryNet sales
ApparelShirts$84K
ApparelDenim$62K
ApparelOuterwear$41K
ApparelKnitwear$28K
ApparelSocks$12K
HomeBedding$58K
HomeLighting$36K
HomeKitchen$33K
HomeDecor$21K
BeautySkincare$47K
BeautyFragrance$25K
BeautyHaircare$18K
OutdoorTents$30K
OutdoorFootwear$26K
OutdoorPacks$14K

Sample data: net sales by subcategory in apparel, home, beauty and outdoor, shirts $84K

Size
Legend
Data shape
Parts with a value, grouped in categories
Good for
Sales by subcategory, spend, storage
Avoid when
Values are close and need exact comparison
Sizes
XS, S, M and L, re-laid out from the data

Anatomy

Inspect it like the Figma file.

The same layers, names and tokens as the component. Select one to read its size, fill and style.

Layers

030 / Treemap

chart/030-treemap
plot · treemap
Layer
tile · bedding
Type
Rectangle
Size
128 × 163
Fill
data/cat-2
Radius
3
Group
Marks · 15

Layers

030 / Treemap

chart/030-treemap
plot · treemap
Layer
tile · bedding
Type
Rectangle
Size
76 × 48
Fill
data/cat-2
Radius
3
Group
Marks · 15

Sizes

Re-laid out, never scaled.

The same data at XS, S, M and L. Every size is redrawn from the data, so text and line weights never shrink.

M against S

Width360 px480 px

Plot328 px440 px

Labels822

Marks1515

Height212 px246 px

Same tokens at every size: text styles, 1 px lines and mark radius stay put.

When to use

Many parts at once.

Three signs it fits, and three signs another type fits better.

Are there many parts?

A few parts.

Yes: Keep the treemap

Are they grouped?

Two levels as rings.

Yes: Keep the treemap

Is it one moment?

Region and category together.

Yes: Keep the treemap

Code and Figma

One name in Figma and in code.

Every Figma property is a prop with the same name and values. One command installs it.

Figma

chart/030-treemap

size
legend
Property = propValuesDefault
size"xs" · "s" · "m" · "l""xs"
legendtrue · falsetrue
color"cat-1" · "cat-2" · "cat-3" · "cat-4""cat-1"
npx shadcn add @chartory/treemap
treemap.tsx
import { Treemap } from "@/components/chartory/treemap"import { salesBySubcategory } from "./sales-by-subcategory"export function SalesBySubcategory() {  return (    <Treemap      data={salesBySubcategory}      size="m"      legend={true}    />  )}

Hearth widget

Treemap as a widget.

The chart in a Hearth card with a hero number and two blocks. One token set, light and dark.

Code
Get the code

EmberPreset

ChartoryDefault preset

Pick the blocks, the size and the preset for your own widget.

Read the Hearth widget docs

FAQ

Treemap questions.

What people ask before they put a treemap in a dashboard.

Something else?

hello@usechartory.com
  • Tiles too small for a value show only their name, and tiles too narrow or short for a name show nothing at M. The category colour and the size still place them.

Related types

The same question, a different shape of answer. Every type ships in Figma and in code.

Same family

Part of a whole

16 types in Chartory answer this question.