Native Solid 2 fork of solid-recharts (MIT, © Thomas Guehenneux), derived from Recharts (MIT, © recharts). Adapted documentation; neither project endorses this fork.
SunburstChart
SunburstChart is a self-contained radial hierarchical chart that displays nested data
as concentric rings of sectors. Each sector's angle is proportional to its value within
its parent, making hierarchical proportions and structure easy to see at a glance. It is
not placed inside another chart container.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | object | — | Root node with nested children array |
dataKey | string | "value" | Key to read each node's numeric value |
nameKey | string | function | "name" | Key to read each node's name / label |
width, height | number | "%" | — | Fixed size or percentage inside ResponsiveContainer |
innerRadius | number | 50 | Radius of the innermost ring (center hole) |
outerRadius | number | — | Outer radius of the outermost ring |
padding | number | 2 | Space between sectors (stroke width) |
ringPadding | number | 2 | Padding between each hierarchical level |
cx, cy | number | "%" | "50%" | Center point of the chart |
fill, stroke | string | — | Default sector colors |
The base props follow the Recharts 3.9.2 SunburstChart API (reference commit b3451050) that solid-recharts tracks; see the Recharts SunburstChart reference. The next-suite release scope lists selected adaptations, not full Recharts 3.10.1 parity.
Notes
- Data shape: The
dataprop is a single root node object with a nestedchildrenarray. Each child can have its ownchildren, forming an arbitrary tree. - Values: Each node's numeric
dataKeyis summed across its children. Leaf nodes should have explicit values; parent values roll up automatically. - Colors: Use the
fillprop on nodes (in the data) to assign colors to individual sectors. The chart applies a default color palette if no node fill is set. - Tooltip: Sunburst supports item-type tooltips; hover a sector to see its details (name and value).
- Animation: Entry animation is wired; nodes fade and grow on mount. Update animation is not yet ported.
See also
- ResponsiveContainer — fluid sizing
- Tooltip — hover info