When to Use
Use sunburst charts when you need to:- Visualize hierarchical data with proportional values
- Show multi-level categorical breakdowns
- Display nested percentage distributions
- Analyze hierarchical compositions (e.g., budget breakdowns)
- Represent file system or disk usage hierarchies
- Show organizational structures with quantitative data
Basic Configuration
A sunburst chart requires hierarchical data where each node’s value determines its angular size.Complete Example
Here’s a comprehensive example showing company revenue breakdown:Key Options
Data Structure
Hierarchical data nodes. From SunburstSeries.ts:81-96, 151
Layout Configuration
Center position of the sunburst. From SunburstSeries.ts:228Can be absolute pixel values or percentages.
Inner and outer radius of the sunburst. From SunburstSeries.ts:229
- First value: inner radius (0 for full circle)
- Second value: outer radius
Rotation
Whether sectors are laid out clockwise. From SunburstSeries.ts:133, 231
Start angle in degrees (0 is right, 90 is top). From SunburstSeries.ts:134, 232
Display Control
Minimum angle in degrees for a sector to be displayed. From SunburstSeries.ts:135, 234Sectors smaller than this angle won’t be rendered.
Whether to show nodes when all child values sum to zero. From SunburstSeries.ts:138, 237
Whether to render labels for nodes with zero value. From SunburstSeries.ts:149, 242
Node Click Behavior
Behavior when clicking a node. From SunburstSeries.ts:86, 147, 240
'rootToNode': Set clicked node as new root'link': Navigate to URL specified in node datafalse: No action
Labels
Label configuration. From SunburstSeries.ts:55-60, 78, 244-255
Item Style
Sector visual styling. From SunburstSeries.ts:43-53, 256-265
Emphasis
What to highlight on hover. From SunburstSeries.ts:72, 268
'self': Only the hovered sector'descendant': The sector and all descendants'ancestor': The sector and all ancestors'relative': The sector, ancestors, and descendants
Levels
Level-specific configurations. From SunburstSeries.ts:97-115, 153Each array element configures a specific hierarchy level.
Sorting
Sort order for sectors at each level. From SunburstSeries.ts:157, 298
'desc': Descending by value (largest first)'asc': Ascending by value (smallest first)- Custom function:
(a, b) => number
Animation
Animation type. From SunburstSeries.ts:155, 281
'expansion': Sectors expand from center'scale': Sectors scale up
Animation duration in milliseconds. From SunburstSeries.ts:282
Update animation duration in milliseconds. From SunburstSeries.ts:283
Multi-Level Styling
Use thelevels array to configure different visual styles for each hierarchy level:
Best Practices
- Use appropriate
minAngleto hide very small sectors that would be hard to read - Configure
levelsto give each hierarchy level distinct visual styling - Set
label.rotate: 'radial'for inner levels and'tangential'for outer levels - Use
emphasis.focus: 'descendant'to highlight the selected branch - Enable
nodeClick: 'rootToNode'for interactive drill-down - Set
radiusto leave space in the center for a title or back button - Use
borderRadiusfor a modern, polished appearance - Consider
stillShowZeroSum: falseto hide branches with no data - Sort data with
sort: 'desc'to place larger sectors first