Skip to main content
The SunburstChart component visualizes hierarchical data using nested circular sectors. It’s similar to a Treemap but uses polar coordinates, making it effective for showing multi-level hierarchies and proportions.

Basic sunburst chart

Custom colors per node

Custom inner and outer radius

Ring padding

  • padding: Space between sectors within the same level
  • ringPadding: Space between hierarchical levels

Custom angles

Custom center position

cx and cy can be numbers (pixels) or percentages. If undefined, the chart centers automatically.

Custom text options

Event handlers

Deep hierarchy example

Custom name and value keys

The data structure must use children as the key for nested items. Use nameKey to specify which field contains display names.

Responsive sunburst

Common pitfalls

  • Data structure: Root node must have a children array. Leaf nodes should have the value property specified by dataKey.
  • Automatic calculations: Parent node values are automatically calculated from children. Don’t manually set values on parent nodes.
  • Color inheritance: If a child node doesn’t specify a fill, it inherits from its parent.
  • Center space: Use innerRadius to control the size of the empty center. Larger values create more space for labels.
  • Text visibility: Text only appears if there’s sufficient space in the sector. Adjust fontSize in textOptions for better visibility.
  • Tooltip event type: SunburstChart only supports 'item' tooltip event type.