Features · type

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.

Oak is larger.Oak is larger.Oak: 8 · WOak8Steel: 6 · MSteel6WM
{
  "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.

LibraryStatusOptionVerificationSource
Chart.jsplugin—npm · weak—
RechartsnativeTreemaptypes · strongrecharts/types/chart/Treemap.d.ts:188
Apache EChartsnativeseries.type=treemaptypes · strongecharts/types/dist/shared.d.ts:11176
Highchartsnativeseries.type=treemaptypes · stronghighcharts/options/abands.d.ts:1386
Plotly.jsnativetrace.type=treemaptypes · strongplot-schema.json#traces.treemap
NivonativeTreeMaptypes · strong@nivo/treemap/dist/types/TreeMap.d.ts:4
Victorynone—absence · absence—
visxnativeTreemaptypes · strong@visx/hierarchy/lib/hierarchies/Treemap.d.ts:45
ApexChartsnativechart.type=treemaptypes · strongapexcharts/types/apexcharts.d.ts:1767
Tremor (npm)none—absence · absence—
Observable Plotmanualgrep: renderd3 hierarchy + rect (documented)mechanism · weak@observablehq/plot/src/scales.d.ts:166
Vega-LitemanualTopLevelSpec.layervega (not vega-lite) has treemapmechanism · weakvega-lite/build/spec/layer.d.ts:27
AG Chartsnative entseries.type=treemaptypes · strongag-charts-types/dist/types/src/series/cartesian/areaOptions.d.ts:86
amCharts 5nativegrep: Treemapgrep · weak@amcharts/amcharts5/package.json:28
Google ChartsnativeTreeMaptypes · strong@types/google.visualization/index.d.ts:1131
uPlotnone—absence · absence—
TradingView Lightweight Chartsnone—absence · absence—
MUI X Chartsnone—absence · absence—
Mermaid (chart-ish diagrams only)nativeMermaidConfig.treeViewtreemap-beta diagramtypes · strongmermaid/dist/config.type.d.ts:237
AntV G2nativeMarkTypes=treemaptypes · strong@antv/g2/lib/spec/mark.d.ts:13