Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

TreemapChart

Nested sizes as rectangles; click a group to zoom into it.

import { TreemapChart } from '@loidolt/theme-charts';

Example

Storage by shelf

Treemap of 3 groups totalling 1,130. Largest: Sheet stock 720, Finished parts 210 and Offcuts 200.

Notes

  • The data table lists every node by its path ("Sheet stock › Cork").

Props

Generated from the component source, so it cannot drift from the implementation.

TreemapChart props
PropTypeDefaultNotes
data required TreeNode[]—A tree of named values; a branch is the sum of its children.
tableLabels { pathLabel?: string; valueLabel?: string }{}Headings of the data table columns.

Plus the attributes of Omit<ComponentProps<typeof Chart>, 'option' | 'table' | 'extensions'>andTreemapOptions, forwarded to the root element.