Docs
๐Ÿ“Š โ Charts
Sunburst Chart ๐Ÿ†•

Sunburst Chart

A Sunburst Chart in REAVIZ is designed to display hierarchical data using concentric circles. The central circle represents the root node, with the hierarchy expanding outwards from this point. Each segment of the inner circle has a hierarchical connection to the segments of the outer circle that fall within the angular range of the parent segment.

Where to use:

  • Visualize Hierarchical Data: Ideal for displaying hierarchical relationships in a compact, radial format.
  • Show Category Relationships: Useful for showing the relationships between categories and subcategories.
  • Analyze Data Structure: Great for analyzing the structure and distribution of hierarchical data.

Quick Start

To create a sunburst chart, use import the SunburstChart and give it some data.

Examples

Simple

3-Level

API

SunburstChart (opens in a new tab)

PropDescriptionDefault
dataData the chart will receive to render.
ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>[] | ChartNestedDataShape[]
[]
seriesThe series component that renders the components.
ReactElement<SunburstSeriesProps, FC<Partial<SunburstSeriesProps>>>
<SunburstSeries />
idId of the chart.
string
widthWidth of the chart. If not provided will autosize.
number
heightHeight of the chart. If not provided will autosize.
number
marginsMargins for the chart.
Margins
0
classNameClassnames for the chart.
string
containerClassNameClassnames for the chart.
string
styleAdditional css styles.
StyleHTMLAttributes<SVGSVGElement>
centerCenter the chart. Used mainly internally.
boolean
centerXCenter chart on X Axis only. Used mainly internally.
boolean
centerYCenter chart on Y Axis only. Used mainly internally.
boolean

SunburstSeries (opens in a new tab)

PropDescriptionDefault
idId set by the parent.
string
dataThe internal data object built by d3
any[]
animatedWhether the chart is animated or not.
boolean
true
colorSchemeColor scheme for the chart.
ColorSchemeType
cybertron
radiusRadius of the chart. Set internally by `SunburstChart`.
number
arcThe arc component to render.
ReactElement<SunburstArcProps, FC<Partial<SunburstArcProps>>>
<SunburstArc />
labelThe arc label component to render.
ReactElement<SunburstArcLabelProps, FC<Partial<SunburstArcLabelProps>>>
<SunburstArcLabel />

SunburstArc (opens in a new tab)

PropDescriptionDefault
idId set by the parent.
string
radiusRadius of the chart. Set internally by `SunburstChart`.
number
dataThe internal data object built by d3
any
fillFill color for the arc.
string
animatedWhether the chart is animated or not.
boolean
cursorCursor for the element.
string
pointer
tooltipTooltip element.
ReactElement<ChartTooltipProps, FC<Partial<ChartTooltipProps>>>
<ChartTooltip />
gradientGradient shades for the bar.
ReactElement<GradientProps, FC<Partial<GradientProps>>>
onClickThe onClick handler for the arc.
(event: MouseEvent<Element, MouseEvent>, data: any) => void
onMouseEnterEvent for when the arc has mouse enter.
(event: any, data: any) => void
onMouseLeaveEvent for when the arc has mouse leave.
(event: any, data: any) => void

SunburstArcLabel (opens in a new tab)

PropDescriptionDefault
idId set by the parent.
string
dataThe internal data object built by d3
any
fillFill color for the arc.
string
black
radiusRadius of the chart. Set internally by `SunburstChart`.
number
fontSizeFont size of the text.
number
14
fontFamilyFont family of the text.
string
sans-serif
animatedWhether the chart is animated or not.
boolean