Skip to Content
DocsπŸ“Š ⏐ ChartsSunburst 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Β 

NameTypeDefault
dataChartShallowDataShape[] | ChartNestedDataShape[]

Data the chart will receive to render.

[]
seriesReactElement<SunburstSeriesProps, FC<Partial<SunburstSeriesProps>>>

The series component that renders the components.

`<SunburstSeries />`
idstring

Id of the chart.

widthnumber

Width of the chart. If not provided will autosize.

heightnumber

Height of the chart. If not provided will autosize.

marginsMargins

Margins for the chart.

classNamestring

Classnames for the chart.

containerClassNamestring

Classnames for the chart.

styleStyleHTMLAttributes<SVGSVGElement>

Additional css styles.

centerboolean

Center the chart. Used mainly internally.

centerXboolean

Center chart on X Axis only. Used mainly internally.

centerYboolean

Center chart on Y Axis only. Used mainly internally.

SunburstSeriesΒ 

NameTypeDefault
idstring

Id set by the parent.

dataany[]

The internal data object built by d3

animatedboolean

Whether the chart is animated or not.

true
colorSchemeColorSchemeType

Color scheme for the chart.

'cybertron'
radiusnumber

Radius of the chart. Set internally by SunburstChart.

arcReactElement<SunburstArcProps, FC<Partial<SunburstArcProps>>>

The arc component to render.

`<SunburstArc />`
labelReactElement<SunburstArcLabelProps, FC<Partial<SunburstArcLabelProps>>>

The arc label component to render.

`<SunburstArcLabel />`

SunburstArcΒ 

NameTypeDefault
idstring

Id set by the parent.

radiusnumber

Radius of the chart. Set internally by SunburstChart.

dataany

The internal data object built by d3

fillstring

Fill color for the arc.

animatedboolean

Whether the chart is animated or not.

cursorstring

Cursor for the element.

'pointer'
tooltipReactElement<ChartTooltipProps, FC<Partial<ChartTooltipProps>>> | null

Tooltip element.

`<ChartTooltip />`
gradientReactElement<GradientProps, FC<Partial<GradientProps>>> | null

Gradient shades for the bar.

onClick(event: MouseEvent<Element, MouseEvent>, data: any) => void

The onClick handler for the arc.

onMouseEnter(event: any, data: any) => void

Event for when the arc has mouse enter.

onMouseLeave(event: any, data: any) => void

Event for when the arc has mouse leave.

SunburstArcLabelΒ 

NameTypeDefault
idstring

Id set by the parent.

dataany

The internal data object built by d3

fillstring

Fill color for the arc.

radiusnumber

Radius of the chart. Set internally by SunburstChart.

fontSizenumber

Font size of the text.

14
fontFamilystring

Font family of the text.

'sans-serif'
animatedboolean

Whether the chart is animated or not.

Last updated on