Skip to content

Documentation / @ripl/charts / SunburstChart

Class: SunburstChart ​

Defined in: charts/src/charts/sunburst.ts:129

Sunburst chart rendering hierarchical data as concentric arc rings.

Each depth level is rendered as a ring of arc segments whose angular extent is proportional to the node's value. Child nodes inherit parent colors and are positioned within the parent's angular range. Supports legend, tooltips, and staggered radial entry animations.

Extends ​

Constructors ​

Constructor ​

new SunburstChart(target, options): SunburstChart

Defined in: charts/src/charts/sunburst.ts:135

Parameters ​

ParameterType
targetstring | Context<Element, Record<string, unknown>> | HTMLElement
optionsSunburstChartOptions

Returns ​

SunburstChart

Overrides ​

Chart.constructor

Properties ​

PropertyModifierTypeInherited fromDefined in
animationOptionsprotectedChartAnimationOptionsChart.animationOptionscharts/src/core/chart.ts:72
autoRenderprotectedbooleanChart.autoRendercharts/src/core/chart.ts:71
colorGeneratorprotectedGenerator<string, string, any>Chart.colorGeneratorcharts/src/core/chart.ts:78
optionsprotectedSunburstChartOptionsChart.optionscharts/src/core/chart.ts:77
parent?publicEventBus<EventMap>Chart.parentcore/src/core/event-bus.ts:79
rendererprotectedRendererChart.renderercharts/src/core/chart.ts:70
sceneprotectedSceneChart.scenecharts/src/core/chart.ts:69
titleOptions?protectedChartTitleOptionsChart.titleOptionscharts/src/core/chart.ts:73
defaultKeyreadonlytypeof defaultKeyChart.defaultKeycore/src/core/disposer.ts:10

Methods ​

destroy() ​

destroy(): void

Defined in: charts/src/core/chart.ts:195

Destroys the chart, its scene, context, and cleans up all event subscriptions.

Returns ​

void

Inherited from ​

Chart.destroy


dispose() ​

protected dispose(key?): void

Defined in: core/src/core/disposer.ts:24

Disposes all resources under the given key, or all resources if no key is provided.

Parameters ​

ParameterType
key?PropertyKey

Returns ​

void

Inherited from ​

Chart.dispose


emit() ​

Call Signature ​

emit<TEvent>(event): TEvent

Defined in: core/src/core/event-bus.ts:127

Emits an event, invoking all matching handlers and bubbling to the parent if applicable.

Type Parameters ​
Type ParameterDefault type
TEvent extends Event<undefined>Event<undefined>
Parameters ​
ParameterType
eventTEvent
Returns ​

TEvent

Inherited from ​

Chart.emit

Call Signature ​

emit<TEvent>(type, data): Event<EventMap[TEvent]>

Defined in: core/src/core/event-bus.ts:128

Emits an event, invoking all matching handlers and bubbling to the parent if applicable.

Type Parameters ​
Type Parameter
TEvent extends keyof EventMap
Parameters ​
ParameterType
typeTEvent
dataEventMap[TEvent]
Returns ​

Event<EventMap[TEvent]>

Inherited from ​

Chart.emit


getAnimationDuration() ​

protected getAnimationDuration(referenceDuration?): number

Defined in: charts/src/core/chart.ts:132

Parameters ​

ParameterTypeDefault value
referenceDurationnumber1000

Returns ​

number

Inherited from ​

Chart.getAnimationDuration


getChartArea() ​

protected getChartArea(): ChartArea

Defined in: charts/src/core/chart.ts:163

Returns ​

ChartArea

Inherited from ​

Chart.getChartArea


getPadding() ​

protected getPadding(): ChartPadding

Defined in: charts/src/core/chart.ts:153

Returns ​

ChartPadding

Inherited from ​

Chart.getPadding


getSeriesColor() ​

protected getSeriesColor(seriesId): string

Defined in: charts/src/core/chart.ts:190

Parameters ​

ParameterType
seriesIdstring

Returns ​

string

Inherited from ​

Chart.getSeriesColor


has() ​

has(type): boolean

Defined in: core/src/core/event-bus.ts:84

Returns whether there are any listeners registered for the given event type.

Parameters ​

ParameterType
typekeyof EventMap

Returns ​

boolean

Inherited from ​

Chart.has


init() ​

protected init(): void

Defined in: charts/src/core/chart.ts:100

Returns ​

void

Inherited from ​

Chart.init


off() ​

off<TEvent>(type, handler): void

Defined in: core/src/core/event-bus.ts:102

Removes a previously registered handler for the given event type.

Type Parameters ​

Type Parameter
TEvent extends keyof EventMap

Parameters ​

ParameterType
typeTEvent
handlerEventHandler<EventMap[TEvent]>

Returns ​

void

Inherited from ​

Chart.off


on() ​

on<TEvent>(type, handler, options?): Disposable

Defined in: core/src/core/event-bus.ts:89

Subscribes a handler to the given event type and returns a disposable for cleanup.

Type Parameters ​

Type Parameter
TEvent extends keyof EventMap

Parameters ​

ParameterType
typeTEvent
handlerEventHandler<EventMap[TEvent]>
options?EventSubscriptionOptions

Returns ​

Disposable

Inherited from ​

Chart.on


once() ​

once<TEvent>(type, handler, options?): Disposable

Defined in: core/src/core/event-bus.ts:117

Subscribes a handler that is automatically removed after it fires once.

Type Parameters ​

Type Parameter
TEvent extends keyof EventMap

Parameters ​

ParameterType
typeTEvent
handlerEventHandler<EventMap[TEvent]>
options?EventSubscriptionOptions

Returns ​

Disposable

Inherited from ​

Chart.once


render() ​

render(): Promise<void>

Defined in: charts/src/charts/sunburst.ts:146

Returns ​

Promise<void>

Overrides ​

Chart.render


resolveSeriesColors() ​

protected resolveSeriesColors(series): void

Defined in: charts/src/core/chart.ts:175

Parameters ​

ParameterType
seriesobject[]

Returns ​

void

Inherited from ​

Chart.resolveSeriesColors


retain() ​

protected retain(value, key?): void

Defined in: core/src/core/disposer.ts:13

Registers a disposable resource under an optional key for later cleanup.

Parameters ​

ParameterTypeDefault value
valueDisposableundefined
keyPropertyKeyDisposer.defaultKey

Returns ​

void

Inherited from ​

Chart.retain


update() ​

update(options): void

Defined in: charts/src/core/chart.ts:113

Merges partial options into the current options and re-renders if autoRender is enabled.

Parameters ​

ParameterType
optionsPartial<TOptions>

Returns ​

void

Inherited from ​

Chart.update