SunburstChart
Sunburst chart component for hierarchical data
Source
LLM docs
Docs
Package
Usage
SunburstChart is based on the SunburstChart recharts component.
It displays hierarchical data as concentric rings, similar to a treemap plotted in polar coordinates:
Data format
SunburstChart expects an array of objects. Each object must have a name and color property.
Leaf nodes must have a value property. Parent nodes can have a children array:
Node color
You can reference colors from theme the same way as in
other components, for example, blue, red.5, orange.7, etc. Any valid CSS
color value is also accepted. Children inherit the color of their parent node.
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:
Labels
Set withLabels to display value labels inside each sector. It is recommended
to increase size to give labels enough space:
Disable tooltip
To disable the tooltip, set withTooltip={false}: