Sunburst Diagram
Source: Data Visualisation Catalogue - Sunburst Diagram
Why This Belongs In The Compiler Gallery
Sunburst diagrams combine hierarchy aggregation with radial partition geometry. They are a high-value bridge between the existing polar-sector work and broader hierarchy layouts.
Data Contract
Each raw row is one hierarchy node.
| Field | Type | Purpose |
|---|---|---|
node | categorical | Stable node id. |
parent | categorical/null | Parent node id; null identifies the root. |
label | text | Visible node label. |
value | quantitative | Leaf metric used for aggregate angular share. |
aggregateValue, depth, share | derived | Hierarchy and partition outputs. |
pathD | text, derived | Generated annular sector path. |
innerRadius, outerRadius, startAngle, endAngle | quantitative, derived | Radial sector geometry. |
Compiler Mapping
| Compiler part | Mapping |
|---|---|
| Data source | Raw hierarchy-rows, normalized hierarchy, and derived sectors. |
| Transform | hierarchy normalizes parent-child rows; layout with layoutKind: "sunburstSectors" derives annular paths. |
| Scales | Ordinal color by sector label. |
| Layers | Direct path sectors plus text labels for readable sectors. |
Faithfulness Notes
The hierarchy aggregation and annular path generation are compiler-owned. Remaining polish is radial guide labels, curved text, and collision-aware sector labeling.