Treemap
native
Nested rectangles sized by value
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.type=treemap.
Nested or flat. Siblings in a branch shift lightness and keep a gap. Label ink clears 4.5:1 against the fill. A formatted value sits under the name when the tile fits it.
Source: chartkit:packages/core/src/generated/schema.ts:24
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"version": "1",
"type": "treemap",
"data": [
{
"x": "Oak",
"y": 8,
"c": "W"
},
{
"x": "Steel",
"y": 6,
"c": "M"
}
],
"encoding": {
"x": "x",
"y": "y",
"color": "c"
},
"a11y": {
"alt": "Oak is larger."
},
"size": {
"width": 640,
"height": 260
}
}Other libraries
Option names are the paths recorded in the matrix. A grep-only cell names the identifier that matched, not a render test. Markdown copy: type.treemap.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | plugin | — | npm · weak | — |
| Recharts | native | Treemap | types · strong | recharts/types/chart/Treemap.d.ts:188 |
| Apache ECharts | native | series.type=treemap | types · strong | echarts/types/dist/shared.d.ts:11176 |
| Highcharts | native | series.type=treemap | types · strong | highcharts/options/abands.d.ts:1386 |
| Plotly.js | native | trace.type=treemap | types · strong | plot-schema.json#traces.treemap |
| Nivo | native | TreeMap | types · strong | @nivo/treemap/dist/types/TreeMap.d.ts:4 |
| Victory | none | — | absence · absence | — |
| visx | native | Treemap | types · strong | @visx/hierarchy/lib/hierarchies/Treemap.d.ts:45 |
| ApexCharts | native | chart.type=treemap | types · strong | apexcharts/types/apexcharts.d.ts:1767 |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | manual | grep: renderd3 hierarchy + rect (documented) | mechanism · weak | @observablehq/plot/src/scales.d.ts:166 |
| Vega-Lite | manual | TopLevelSpec.layervega (not vega-lite) has treemap | mechanism · weak | vega-lite/build/spec/layer.d.ts:27 |
| AG Charts | native ent | series.type=treemap | types · strong | ag-charts-types/dist/types/src/series/cartesian/areaOptions.d.ts:86 |
| amCharts 5 | native | grep: Treemap | grep · weak | @amcharts/amcharts5/package.json:28 |
| Google Charts | native | TreeMap | types · strong | @types/google.visualization/index.d.ts:1131 |
| uPlot | none | — | absence · absence | — |
| TradingView Lightweight Charts | none | — | absence · absence | — |
| MUI X Charts | none | — | absence · absence | — |
| Mermaid (chart-ish diagrams only) | native | MermaidConfig.treeViewtreemap-beta diagram | types · strong | mermaid/dist/config.type.d.ts:237 |
| AntV G2 | native | MarkTypes=treemap | types · strong | @antv/g2/lib/spec/mark.d.ts:13 |