Static documentation

Data Visualisation Catalogue Gallery

Rendered markdown notes for the catalogue review, compiler mapping, implementation tracker, and chart method specs.

38 chart methods
10 with reference assets
43 documents

Treemap

Source: Data Visualisation Catalogue - Treemap

Treemap reference

Treemap anatomy

Why This Belongs In The Compiler Gallery

The catalogue describes treemaps as hierarchical rectangles where area encodes quantity. The compiler now executes a flat squarified treemap transform and renders the output with rect/text glyphs. This chart is important because it proves the compiler can own non-axis-aligned layout that still compiles to basic rectangles.

Data Contract

Each raw data row represents a node in a hierarchy.

FieldTypePurpose
idtextNode identity.
parentIdtext or nullParent node identity; still a follow-up for nested hierarchy support.
label / categorytextDisplay label.
value / revenuequantitativeArea measure for leaf nodes or categories.
xquantitative, derivedTile x position.
yquantitative, derivedTile y position.
widthquantitative, derivedTile width.
heightquantitative, derivedTile height.
sharequantitative, derivedTile share of the total.
depthordinal, derivedHierarchy depth; future nested output.

Expected Visual

The faithful catalogue version should use nested rectangles. Parent rectangles contain child rectangles, and each rectangle's area is proportional to its value relative to siblings. Labels appear inside sufficiently large tiles. The catalogue notes that squarified tiling is common because it keeps rectangles closer to square.

ElementExpected treatment
TilesRects sized by value and nested by hierarchy.
Parent/child relationChild tiles must be spatially contained within parent bounds.
ColorCategory or depth color.
LabelsOnly show labels when tile area can contain them cleanly.
GapsThin gutters or strokes separate sibling tiles.

Compiler Mapping

Compiler partMapping
Data sourcenodes raw hierarchy and tiles layout output.
Transformtreemap computes flat squarified tile geometry from raw metric rows.
Scalescolor: ordinal for category/depth; no x/y scale needed when tile geometry is precomputed.
Layersrect tiles, text labels, optional text values.
InteractionTile hover should expose label, value, parent path, depth, and source rows.

Faithfulness Notes

The current gallery treemap no longer precomputes tile geometry in the spec. The remaining faithfulness gap is nested hierarchy: parent/child containment, depth-specific gutters, and label hiding for small tiles should be added before treating treemap as a complete hierarchy family.