SunburstChart
Sunburst chart component for hierarchical data
Source
Package
Usage
SunburstChart is based on the SunburstChart recharts component.
It displays hierarchical data as concentric rings.
In this storage example, the inner ring shows folders and the outer ring shows their contents:
Storage usage
Data format
Each node has a name. Leaf nodes have a value.
Nodes with children show the sum of their children, or their own value if it is larger:
Nested data
Add another children array to show a deeper level.
This example expands project folders to reveal how much space their dependencies use:
Project storage breakdown
client-app/node_modules uses 24 GB of the 48 GB in Projects
Legend
Set withLegend to display a legend for top-level nodes.
Hover over a legend item to highlight its branch:
Legend position
The legend is displayed below the chart by default.
Set legendProps={{ position: 'top' }} to display it above the chart:
Node color
color accepts theme colors and any valid CSS color.
Children inherit their parent's color unless they set their own, like client-app below.
Top-level nodes without color use a default palette:
Stroke color
Use strokeColor to change the color of the stroke around each sector:
Chart size
Use size prop to control the width and height of the chart:
Gap
Use gap prop to control the spacing between sectors and rings:
Inner radius
Use innerRadius prop to control the size of the empty circle in the center of the chart:
Start and end angle
Use startAngle and endAngle props to draw a part of the ring.
Angles are in degrees, 0 points to the right and angles grow counterclockwise.
Without endAngle, the chart draws a full circle from startAngle:
Labels
Set withLabels to display value labels inside sectors.
Labels that do not fit are hidden; increase size to give them more space.
This example shows sales by category and product:
Sales by category · October 2026
Value formatter
Use valueFormatter to format values in the tooltip and labels:
Sales by category · October 2026
Disable tooltip
To disable the tooltip, set withTooltip={false}: