Skip to content

Treemap

Draws a squarified treemap from TreemapNode records.

<Treemap ... />

Overview

Nested nodes (parent) are drawn inside their parent below a header band holding their label. Colors are muted semantic colors that lighten with depth; hatched marks reclaimable space. Clicking selects a cell and hovering outlines it.

Topics

Properties

Name Type Required Description
onSelect function optional onSelect(id, clickCount).
onHover function optional onHover(id); nil when leaving.
selected string optional Id of the initially selected cell.
onBack function optional Delete goes up a level (keyboard).
dragItem function optional dragItem(id) -> path: dragging a cell drags its file.
accessibilityLabel string optional Summary read by VoiceOver.

Example

<Treemap height="320"><TreemapNode id="a" value="3" color="systemBlue" label="Apps" /></Treemap>

Platform notes

  • AppKit uses the AppKit implementation.

Source: lua/embedded/AppKit.lua:2228 (AppKit.Treemap)