Expand description
Treemap — weighted rectangles, area ∝ value, laid out by a deterministic
slice-and-dice algorithm that alternates split direction by depth-of-cut
so the tiling stays readable. The layout (squarify) is a pure function
returning (index, Rect) pairs, tested independently of any painter. Tile
fills come from a theme-derived sequential Ramp.
Structs§
- Tile
- A labelled, weighted item.
- Treemap
View - A treemap over a flat list of weighted tiles.
Functions§
- squarify
- Lay
weightsout intoarea, area ∝ weight, via squarified slice-and-dice. Returns(original index, rect)for each positive-weight item, in input order. Zero/negative weights are skipped. Pure geometry → directly testable.