Skip to content

Documentation / @ripl/charts / AreaChart

Class: AreaChart<TData> ​

Defined in: charts/src/charts/area.ts:167

Area chart rendering filled regions beneath series lines.

Supports stacked and unstacked modes with optional markers, crosshair, tooltips, legend, chart title, and grid. On entry the line draws on and the fill is revealed left-to-right (a true wipe, not a horizontal stretch); areas transition smoothly on update and fade out on exit. Unstacked areas are painted largest-first so smaller areas are never hidden behind larger ones.

Extends ​

Type Parameters ​

Type ParameterDefault typeDescription
TDataunknownThe type of each data item in the dataset.

Constructors ​

Constructor ​

new AreaChart<TData>(target, options): AreaChart<TData>

Defined in: charts/src/charts/area.ts:173

Parameters ​

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

Returns ​

AreaChart<TData>

Overrides ​

CartesianChart.constructor

Properties ​

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
animationOptionsprotectedChartAnimationOptionsundefined-CartesianChart.animationOptionscharts/src/core/chart.ts:195
autoRenderprotectedbooleanundefined-CartesianChart.autoRendercharts/src/core/chart.ts:194
colorGeneratorprotectedGenerator<string>undefined-CartesianChart.colorGeneratorcharts/src/core/chart.ts:208
crosshair?protectedCrosshairundefined-CartesianChart.crosshaircharts/src/core/cartesian.ts:294
grid?protectedGridundefined-CartesianChart.gridcharts/src/core/cartesian.ts:293
legend?protectedLegendundefined-CartesianChart.legendcharts/src/core/chart.ts:198
optionsprotectedAreaChartOptionsundefined-CartesianChart.optionscharts/src/core/chart.ts:202
parent?publicEventBus<AreaChartEventMap>undefinedThe parent event bus that emitted events bubble up to, if any.CartesianChart.parentcore/src/core/event-bus.ts:107
rendererreadonlyRendererundefinedThe renderer driving the chart's animation loop. Exposed for inspection and tooling (e.g. devtools binding).CartesianChart.renderercharts/src/core/chart.ts:193
scenereadonlySceneundefinedThe scene the chart renders into. Exposed for inspection and tooling (e.g. devtools binding).CartesianChart.scenecharts/src/core/chart.ts:191
themeprotectedThemeundefinedThe resolved theme (palette + furniture colors) this chart renders with.CartesianChart.themecharts/src/core/chart.ts:204
title?protectedChartTitleundefined-CartesianChart.titlecharts/src/core/chart.ts:197
titleOptions?protectedChartTitleOptionsundefined-CartesianChart.titleOptionscharts/src/core/chart.ts:196
tooltip?protectedTooltipundefined-CartesianChart.tooltipcharts/src/core/cartesian.ts:292
tooltipTriggerprotectedChartTooltipTrigger'item'The resolved tooltip trigger mode ('item' per-mark, 'axis' shared), kept in sync by Chart.syncTooltip.CartesianChart.tooltipTriggercharts/src/core/chart.ts:207
xAxisprotectedChartXAxisundefined-CartesianChart.xAxischarts/src/core/cartesian.ts:282
xAxisOptionsprotectedChartAxisItemOptions<TData>undefinedResolved x-axis options (scale type, ticks, min/max, format), re-resolved from the chart options each render.CartesianChart.xAxisOptionscharts/src/core/cartesian.ts:289
yAxesprotectedChartYAxis[][]All y-axes (primary plus any secondary). CartesianChart.yAxis is the primary (yAxes[0]).CartesianChart.yAxescharts/src/core/cartesian.ts:285
yAxesOptionsprotectedChartYAxisItemOptions<TData>[][]Resolved options for every y-axis, parallel to CartesianChart.yAxes.CartesianChart.yAxesOptionscharts/src/core/cartesian.ts:287
yAxisprotectedChartYAxisundefined-CartesianChart.yAxischarts/src/core/cartesian.ts:283
yAxisOptionsprotectedChartYAxisItemOptions<TData>undefinedResolved y-axis options (scale type, ticks, min/max, format), re-resolved from the chart options each render.CartesianChart.yAxisOptionscharts/src/core/cartesian.ts:291
defaultKeyreadonlytypeof defaultKeyundefinedThe key under which resources are retained when no explicit key is provided.CartesianChart.defaultKeycore/src/core/disposer.ts:11

Accessors ​

$events ​

Get Signature ​

get $events(): keyof TEventMap[]

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

The event types this bus can emit. The base returns an empty list; subclasses override it to declare their emittable events (type-checked against their EventMap), so tooling such as the devtools can enumerate them, including events added by custom subclasses.

Returns ​

keyof TEventMap[]

Inherited from ​

CartesianChart.$events


context ​

Get Signature ​

get context(): Context

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

The rendering context the chart's scene draws into.

Returns ​

Context

Inherited from ​

CartesianChart.context


isNavigating ​

Get Signature ​

get protected isNavigating(): boolean

Defined in: charts/src/core/cartesian.ts:332

Whether a navigator pan/zoom gesture is currently in flight. Subclasses can gate entry/update animations on this so marks snap to the new view each frame instead of tweening (which would lag behind the pointer). Mirrors the animation suppression in CartesianChart.resolveAnimation.

Returns ​

boolean

Inherited from ​

CartesianChart.isNavigating


Get Signature ​

get navigator(): DOMNavigator | undefined

Defined in: charts/src/core/cartesian.ts:323

The pan/zoom/brush controller for this chart, or undefined when the navigator option is off. Use it for imperative framing (centerOn, fitBounds, reset) and to subscribe to brush/brushend for brush-and-link.

Returns ​

DOMNavigator | undefined

Inherited from ​

CartesianChart.navigator

Methods ​

addPlotContent() ​

protected addPlotContent(elements): void

Defined in: charts/src/core/cartesian.ts:905

Adds plotted marks to a persistent, plot-clipped container instead of straight to the scene, so that panning/zooming can't smear marks over the axes, title or legend. Subclasses call this in place of this.scene.add(...) for their data marks (bars, bubbles, lines, …). The container sits just above the grid (z-index 1) and below the axes/title/legend, and its clip only bites while a navigator is active (see clipPlot), so non-navigator rendering is byte-for-byte unchanged.

Parameters ​

ParameterType
elementsOneOrMore<Element<Partial<BaseState>, ElementEventMap>>

Returns ​

void

Inherited from ​

CartesianChart.addPlotContent


applyView() ​

protected applyView(scale, axis): Scale<number>

Defined in: charts/src/core/cartesian.ts:839

Rescales a continuous axis scale to the window currently visible under the navigator's view transform, keeping the same pixel range. Returns the scale unchanged when no navigator is active or the view is at the identity. Subclasses pass their final x/y scales through this so pan/zoom rescales the axis domains (and repositions geometry) without a data rebuild.

Parameters ​

ParameterType
scaleScale<number>
axis"x" | "y"

Returns ​

Scale<number>

Inherited from ​

CartesianChart.applyView


applyViewToScale() ​

protected applyViewToScale<TScale>(scale, axis): TScale

Defined in: charts/src/core/cartesian.ts:864

Transforms a scale's pixel output by the current view (k·pos + t) instead of rescaling its domain. This suits categorical axes (point/band scales) where domain rescaling is meaningless, so the category positions pan and zoom in lock-step with the continuous axis. Returns the scale unchanged when there is no navigator or the view is at rest. Band/point pixel spans (bandwidth/step) scale with the zoom so bars widen as you zoom in.

Type Parameters ​

Type Parameter
TScale extends Scale<any, number>

Parameters ​

ParameterType
scaleTScale
axis"x" | "y"

Returns ​

TScale

Inherited from ​

CartesianChart.applyViewToScale


bandCenterScale() ​

protected bandCenterScale(band, keys): Scale<string>

Defined in: charts/src/core/cartesian.ts:1373

Wraps a band scale as a point scale positioned at each band's center, rendering one centered tick per category. Shared by the bar chart (its categorical axis) and the trend chart (which places line/area markers at the center of each category slot).

Parameters ​

ParameterType
bandBandScale<string>
keysstring[]

Returns ​

Scale<string>

Inherited from ​

CartesianChart.bandCenterScale


buildOverviewSeries() ​

protected buildOverviewSeries<TSeries>(series, data, getType, getValue): ChartNavigatorSeries[]

Defined in: charts/src/core/cartesian.ts:646

Builds the per-series overview data (ChartNavigatorSeries) the strip renders (id, palette color, draw type, and per-category values) from a series list and per-series type/value resolvers. Shared by the line, area, bar, and trend charts so each only supplies how to resolve its own type and values.

Type Parameters ​

Type ParameterDescription
TSeries extends objectThe chart's series-options type (must carry an id).

Parameters ​

ParameterTypeDescription
seriesTSeries[]The series to describe.
dataTData[]The dataset each series is sampled over.
getType(series) => ChartNavigatorSeriesTypeResolves how a series is drawn in the strip (line/bar/area).
getValue(series, item) => numberResolves a series' numeric value at a data item.

Returns ​

ChartNavigatorSeries[]

One ChartNavigatorSeries per input series, in order.

Inherited from ​

CartesianChart.buildOverviewSeries


categoryScale() ​

protected categoryScale(keys, left, right): Scale<string>

Defined in: charts/src/core/cartesian.ts:1323

Builds the x scale for category-keyed charts: a continuous time scale when the x-axis is configured with scale: 'time' (keys parsed as dates: Date objects, epoch milliseconds, or ISO strings), otherwise the standard evenly spaced point scale. The time facade accepts raw keys, Dates, and epoch values interchangeably, so series renderers (string keys) and axis ticks (Date values) share one scale, and unevenly spaced samples position proportionally to their timestamps.

Parameters ​

ParameterType
keysstring[]
leftnumber
rightnumber

Returns ​

Scale<string>

Inherited from ​

CartesianChart.categoryScale


clipPlot() ​

protected clipPlot(area): void

Defined in: charts/src/core/cartesian.ts:941

Points the plot-content clip at the current plot rectangle and enables it only while a navigator is active. Subclasses call this once per render after they know their plot area. With no navigator the clip stays inert, preserving the exact un-clipped rendering.

Parameters ​

ParameterType
areaChartArea

Returns ​

void

Inherited from ​

CartesianChart.clipPlot


continuousXScale() ​

protected continuousXScale(extent, left, right): Scale

Defined in: charts/src/core/cartesian.ts:1339

The continuous x scale for numeric-x charts (e.g. scatter): a time scale with calendar-aligned ticks when the x-axis is configured with scale: 'time' (values treated as epoch milliseconds or dates), otherwise the standard value scale.

Parameters ​

ParameterType
extentnumber[]
leftnumber
rightnumber

Returns ​

Scale

Inherited from ​

CartesianChart.continuousXScale


createLayout() ​

protected createLayout(): ChartLayout

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

Creates a fresh layout for the current canvas size and padding.

Returns ​

ChartLayout

Inherited from ​

CartesianChart.createLayout


destroy() ​

destroy(): void

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

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

Returns ​

void

Inherited from ​

CartesianChart.destroy


dispose() ​

protected dispose(key?): void

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

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

Parameters ​

ParameterType
key?PropertyKey

Returns ​

void

Inherited from ​

CartesianChart.dispose


emit() ​

Call Signature ​

emit<TEvent>(event): TEvent

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

Emits an event, invoking all matching handlers and bubbling to the parent if applicable. Handlers for the event's own type run first, then EVENT_WILDCARD subscriptions.

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

TEvent

Inherited from ​

CartesianChart.emit

Call Signature ​

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

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

Emits an event, invoking all matching handlers and bubbling to the parent if applicable. Handlers for the event's own type run first, then EVENT_WILDCARD subscriptions.

Type Parameters ​
Type Parameter
TEvent extends keyof AreaChartEventMap
Parameters ​
ParameterType
typeTEvent
dataAreaChartEventMap[TEvent]
Returns ​

Event<AreaChartEventMap[TEvent]>

Inherited from ​

CartesianChart.emit


export() ​

export(): ContextExport

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

Exports a snapshot of the chart's rendered context (image, url, or string). See Context.export.

Returns ​

ContextExport

Inherited from ​

CartesianChart.export


filterActive() ​

protected filterActive<T>(items, getId?): T[]

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

Filters series or segments down to the ones whose legend item is active. The id defaults to each item's id property; pass an accessor for keyed data items.

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
itemsT[]
getId(item) => string

Returns ​

T[]

Inherited from ​

CartesianChart.filterActive


getAnimationDuration() ​

protected getAnimationDuration(referenceDuration?): number

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

Parameters ​

ParameterTypeDefault value
referenceDurationnumber1000

Returns ​

number

Inherited from ​

CartesianChart.getAnimationDuration


getChartArea() ​

protected getChartArea(): ChartArea

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

Returns ​

ChartArea

Inherited from ​

CartesianChart.getChartArea


getPadding() ​

protected getPadding(): ChartPadding

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

Returns ​

ChartPadding

Inherited from ​

CartesianChart.getPadding


getSeriesColor() ​

protected getSeriesColor(seriesId): string

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

Parameters ​

ParameterType
seriesIdstring

Returns ​

string

Inherited from ​

CartesianChart.getSeriesColor


gridTicks() ​

protected gridTicks(scale, count): GridTick[]

Defined in: charts/src/core/cartesian.ts:1135

Maps a scale's ticks into value-keyed GridTicks for CartesianChart.renderGrid, so grid lines join by tick value and transition across rescales.

Parameters ​

ParameterTypeDescription
scaleScale<any, number>The scale producing tick values and positions.
countnumberThe target tick count (the axis ticks option).

Returns ​

GridTick[]

The grid ticks (value + pixel position).

Inherited from ​

CartesianChart.gridTicks


groupSeriesByAxis() ​

protected groupSeriesByAxis<TSeries>(series): TSeries[][]

Defined in: charts/src/core/cartesian.ts:1199

Partitions series by the y-axis each one binds to: one group per entry in CartesianChart.yAxes, in axis order. Charts derive an independent value extent per axis from these groups, so every axis scales to the series it actually labels.

Type Parameters ​

Type Parameter
TSeries extends object

Parameters ​

ParameterTypeDescription
seriesTSeries[]The series to partition, typically the legend-active ones.

Returns ​

TSeries[][]

One group per y-axis; a group is empty when nothing binds to that axis.

Inherited from ​

CartesianChart.groupSeriesByAxis


has() ​

has(type): boolean

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

Returns whether there are any listeners registered for the given event type. Wildcard subscriptions (EVENT_WILDCARD) are not listeners for any concrete type, so a bus observed only through the wildcard still reports false here.

Parameters ​

ParameterType
typekeyof AreaChartEventMap

Returns ​

boolean

Inherited from ​

CartesianChart.has


hideUnboundAxes() ​

protected hideUnboundAxes(series): void

Defined in: charts/src/core/cartesian.ts:1221

Hides every secondary y-axis that has no series bound to it for this render.

An axis with nothing bound resolves to a zero-width extent, which is a single tick at the range start — an axis labelled 0 against the baseline, describing data that is not on the plot. Not drawing it at all is both honest and self-diagnosing: a mis-bound series shows up as a missing axis rather than as a misleading one. The band goes with it, so the plot reclaims the space through the usual outside-in pass.

The primary axis always draws: it frames the plot and carries the grid and the annotation scales, so it stays even when every series is hidden via the legend.

Call this after CartesianChart.prepareAxes and before resolving the plot. The hidden state lasts one render — prepareAxes re-applies the configured visibility at the top of the next one — so an axis comes back as soon as something binds to it again.

Parameters ​

ParameterTypeDescription
seriesobject[]The legend-active series whose bindings decide which axes have something to draw.

Returns ​

void

Inherited from ​

CartesianChart.hideUnboundAxes


highlightSeries() ​

protected highlightSeries(id): void

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

Highlights a single series/segment by id (dimming the others), or restores all when null. Wired to legend hover via reserveLegend. No-ops for charts that never registered highlight groups.

Dims the leaf elements of each group rather than the group itself: a group's opacity does not cascade multiplicatively, and the leaves carry no explicit opacity (so a group-level tween is a no-op; element.interpolate skips nil current values). Each leaf's rest opacity is remembered on the element (via a Symbol slot, like applyHoverHighlight), tracking the target a render stashed on .data where there is one, so hidden elements stay hidden, an element caught mid-fade-in still restores to full, and restoring returns to the true value.

Parameters ​

ParameterType
idstring | null

Returns ​

void

Inherited from ​

CartesianChart.highlightSeries


init() ​

protected init(): void

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

Returns ​

void

Inherited from ​

CartesianChart.init


isItemActive() ​

protected isItemActive(id): boolean

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

Whether the series or segment behind a legend item id is currently shown. Legend clicks toggle this via Chart.setItemActive; charts read it when building legend items and filtering their rendered series.

Parameters ​

ParameterType
idstring

Returns ​

boolean

Inherited from ​

CartesianChart.isItemActive


protected navigationAxis(): "x"

Defined in: charts/src/charts/area.ts:185

Area charts are category-on-x, so the navigator windows the x axis (bottom scrub bar).

Returns ​

"x"

Overrides ​

CartesianChart.navigationAxis


protected navigatorCategoryLayout(): ChartNavigatorCategoryLayout

Defined in: charts/src/core/cartesian.ts:629

How the overview strip positions category marks: 'band' (bar/trend: padded category bands with marks at band centers, so bars sit fully inside the strip) or 'point' (line/area: marks spread edge-to-edge). Defaults to 'point'; category-band charts override it.

Returns ​

ChartNavigatorCategoryLayout

Inherited from ​

CartesianChart.navigatorCategoryLayout


off() ​

off<TEvent>(type, handler): void

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

Removes a previously registered handler for the given event type.

Type Parameters ​

Type Parameter
TEvent extends keyof AreaChartEventMap

Parameters ​

ParameterType
typeTEvent
handlerEventHandler<AreaChartEventMap[TEvent]>

Returns ​

void

Inherited from ​

CartesianChart.off


on() ​

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

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

Subscribes a handler to the given event type and returns a disposable for cleanup. Pass EVENT_WILDCARD to receive every event emitted on the bus regardless of type.

Type Parameters ​

Type Parameter
TEvent extends keyof AreaChartEventMap

Parameters ​

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

Returns ​

Disposable

Inherited from ​

CartesianChart.on


once() ​

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

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

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

Type Parameters ​

Type Parameter
TEvent extends keyof AreaChartEventMap

Parameters ​

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

Returns ​

Disposable

Inherited from ​

CartesianChart.once


pointScale() ​

protected pointScale(keys, left, right): Scale<string>

Defined in: charts/src/core/cartesian.ts:1290

Builds an evenly-spaced point scale mapping category keys to x positions across [left, right]. Shared by line and area charts.

Parameters ​

ParameterType
keysstring[]
leftnumber
rightnumber

Returns ​

Scale<string>

Inherited from ​

CartesianChart.pointScale


prepareAxes() ​

protected prepareAxes(): void

Defined in: charts/src/core/cartesian.ts:976

Re-applies the chart's furniture options to the live components and sets the resolved animation on every axis ahead of rendering. Cartesian charts call this at the start of each render pass, so options merged by chart.update(...) (axis scale/ticks/format/title, grid, tooltip, crosshair, theme) take effect without recreating the chart.

Returns ​

void

Inherited from ​

CartesianChart.prepareAxes


registerHighlightGroups() ​

protected registerHighlightGroups(groups, resolveId?): void

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

Registers the groups that highlightSeries dims when a legend entry is hovered. Charts call this each render. By default a group belongs to the legend item whose id equals its group.id (one-to-one). Pass resolveId when a group belongs to a different legend item, or to several, e.g. a cluster legend (many node groups per legend item) or a connector that is incident to two legend items (return an array of owner ids). Replaces any previous set.

Parameters ​

ParameterTypeDescription
groupsGroup<ElementEventMap>[]The element groups eligible for dimming.
resolveId(group) => string | string[]Maps a group to the legend item id(s) it belongs to. Defaults to group.id.

Returns ​

void

Inherited from ​

CartesianChart.registerHighlightGroups


render() ​

render(): Promise<void>

Defined in: charts/src/charts/area.ts:303

Runs a render pass, invoking callback to draw into the scene and marking the chart as rendered. Concrete charts override this and delegate to super.render(async () => { ... }); any error thrown by the callback is caught and the context cleared, so a failed render never leaves a partially-drawn chart.

Returns ​

Promise<void>

Overrides ​

CartesianChart.render


renderAnnotations() ​

protected renderAnnotations(scales, plot): void

Defined in: charts/src/core/cartesian.ts:1150

Renders the chart's CartesianChartOptions.annotations over the plot, resolving each annotation's value(s) through the supplied x/y scales. Call after drawing the series so annotations sit on top. Annotations that cannot map to the given scales are skipped.

Parameters ​

ParameterTypeDescription
scalesAnnotationScalesThe x/y value scales annotations resolve against.
plotChartAreaThe plot rectangle annotations are drawn within.

Returns ​

void

Inherited from ​

CartesianChart.renderAnnotations


renderGrid() ​

protected renderGrid(xTicks, yTicks, area): void

Defined in: charts/src/core/cartesian.ts:1122

Renders the grid within the given plot area at the supplied tick positions.

Parameters ​

ParameterType
xTicksGridTick[]
yTicksGridTick[]
areaChartArea

Returns ​

void

Inherited from ​

CartesianChart.renderGrid


renderNavigator() ​

protected renderNavigator(band, series, valueExtent, stacked?): void

Defined in: charts/src/core/cartesian.ts:743

Renders the overview strip into the reserved band from the given series and value extent, or clears it when the strip is off. Call after the plot rect is known (i.e. after clipPlot). Pass stacked so the strip stacks same-type bar/area series rather than grouping/overlaying them.

Parameters ​

ParameterTypeDefault value
bandChartArea | undefinedundefined
seriesChartNavigatorSeries[]undefined
valueExtent[number, number]undefined
stackedbooleanfalse

Returns ​

void

Inherited from ​

CartesianChart.renderNavigator


reserveLegend() ​

protected reserveLegend(layout, items): void

Defined in: charts/src/core/cartesian.ts:993

Reserves and renders the legend using the chart's legend option.

Parameters ​

ParameterType
layoutChartLayout
itemsLegendItem[]

Returns ​

void

Inherited from ​

CartesianChart.reserveLegend


reserveNavigatorBand() ​

protected reserveNavigatorBand(layout): ChartArea | undefined

Defined in: charts/src/core/cartesian.ts:726

Reserves the strip band from the layout (a bottom band for a category-on-x chart, a right band for a horizontal bar chart). Call after reserveTitle/reserveLegend and before measuring the axes. Returns undefined when the strip is off.

Parameters ​

ParameterType
layoutChartLayout

Returns ​

ChartArea | undefined

Inherited from ​

CartesianChart.reserveNavigatorBand


reserveTitle() ​

protected reserveTitle(layout): void

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

Reserves a band for the chart title (if configured) and renders it. Returns the remaining area unchanged when there is no title. Call this first in a chart's layout pass so the title sits outermost.

Parameters ​

ParameterType
layoutChartLayout

Returns ​

void

Inherited from ​

CartesianChart.reserveTitle


resolveAnimation() ​

protected resolveAnimation(referenceDuration?): ResolvedAnimation

Defined in: charts/src/core/cartesian.ts:962

Resolves the chart's animation options for a given reference duration (duration + easing + enabled).

Parameters ​

ParameterTypeDefault value
referenceDurationnumberANIMATION_REFERENCE.update

Returns ​

ResolvedAnimation

Inherited from ​

CartesianChart.resolveAnimation


resolveCartesianPlot() ​

protected resolveCartesianPlot(area, applyScales, maxPasses?): ChartArea

Defined in: charts/src/core/cartesian.ts:1091

Resolves the plot rectangle outside-in, so the plot's bounds already account for whatever the axes need before any series geometry is derived from them.

The axis bands and the plot are mutually dependent: a band's thickness comes from its tick labels, the surviving ticks depend on the scale's range, and that range is the plot's extent minus the other axis's band. Measuring once therefore sizes the plot from labels that a later rescale invalidates — which is how a chart ended up drawing its first data point off the axis line whenever the longest label changed width. This iterates instead: applyScales is called with the current best guess at the plot, the axes are re-measured, and the plot is recomputed until it stops moving (normally two passes). On settling, the scales the series are built from and the bands the axes draw are derived from the same measurement, so the axis line always lands exactly on the plot edge.

Parameters ​

ParameterTypeDefault valueDescription
areaChartAreaundefinedThe drawable area remaining after the title, legend and navigator are reserved.
applyScales(plot) => voidundefinedAssigns every axis's scale for a candidate plot rectangle. Called once per pass, and once more with the settled plot.
maxPassesnumber4Safety bound on the iteration. Defaults to 4.

Returns ​

ChartArea

The settled plot rectangle.

Inherited from ​

CartesianChart.resolveCartesianPlot


resolveCartesianSetup() ​

protected resolveCartesianSetup(): CartesianSetup

Defined in: charts/src/core/cartesian.ts:522

The CartesianSetup the furniture sync pass reads each render. Defaults to the setup passed to CartesianChart.setupCartesian; charts whose setup depends on a runtime option (e.g. the bar chart's grid direction following its orientation) override this so chart.update(...) re-derives it.

Returns ​

CartesianSetup

Inherited from ​

CartesianChart.resolveCartesianSetup


resolveSeriesAxisIndex() ​

protected resolveSeriesAxisIndex(id?): number

Defined in: charts/src/core/cartesian.ts:1181

Resolves a series yAxis binding (a y-axis id) to an index into CartesianChart.yAxes. Falls back to the primary axis when the series names no axis, or names one that is not configured.

Binding is by id rather than position so that reordering axis.y cannot silently re-point the series bound to it.

Parameters ​

ParameterTypeDescription
id?stringThe series' yAxis option, or undefined for the primary axis.

Returns ​

number

The resolved y-axis index.

Inherited from ​

CartesianChart.resolveSeriesAxisIndex


resolveSeriesColors() ​

protected resolveSeriesColors(series): void

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

Parameters ​

ParameterType
seriesobject[]

Returns ​

void

Inherited from ​

CartesianChart.resolveSeriesColors


retain() ​

protected retain(value, key?): void

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

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

Parameters ​

ParameterTypeDefault value
valueDisposableundefined
keyPropertyKeyDisposer.defaultKey

Returns ​

void

Inherited from ​

CartesianChart.retain


setItemActive() ​

protected setItemActive(id, active): void

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

Shows or hides the series/segment behind a legend item and re-renders, so the existing enter/exit joins animate it out of or back into the chart.

Parameters ​

ParameterType
idstring
activeboolean

Returns ​

void

Inherited from ​

CartesianChart.setItemActive


setupAxisTooltip() ​

protected setupAxisTooltip(plot, resolve): void

Defined in: charts/src/core/cartesian.ts:1246

Wires the shared axis tooltip (tooltip.trigger: 'axis') for the current render: while the pointer is inside the plot, the resolver maps its position to the hovered category and the tooltip shows the title plus one row per active series, anchored at the snapshot point. A no-op (and listener teardown) when the trigger is 'item' or the tooltip is hidden, so charts can call it unconditionally each render and the mode reconfigures at runtime.

Parameters ​

ParameterTypeDescription
plotChartAreaThe plot rectangle pointer positions are tested against.
resolve(plotX, plotY) => AxisTooltipSnapshot | nullMaps a plot position to the tooltip content, or null for no tooltip.

Returns ​

void

Inherited from ​

CartesianChart.setupAxisTooltip


setupCartesian() ​

protected setupCartesian(setup?): void

Defined in: charts/src/core/cartesian.ts:368

Builds the construction-time cartesian skeletons (overview strip, x-axis shell, navigator wiring) and applies the furniture options once via the shared sync pass. Call this from a subclass constructor (after super(...)) and before init(). The furniture options are re-applied on every render (see CartesianChart.prepareAxes), so chart.update(...) reconfigures axes/grid/tooltip/crosshair at runtime.

Parameters ​

ParameterType
setupCartesianSetup

Returns ​

void

Inherited from ​

CartesianChart.setupCartesian


setupCrosshair() ​

protected setupCrosshair(area): void

Defined in: charts/src/core/cartesian.ts:1232

Sets up the crosshair to track within the given plot area.

Parameters ​

ParameterType
areaChartArea

Returns ​

void

Inherited from ​

CartesianChart.setupCrosshair


syncTooltip() ​

protected syncTooltip(tooltip, input?, placement?): Tooltip | undefined

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

Reconciles a hover tooltip against the chart's current tooltip option so it can be reconfigured (or toggled) at runtime. Call once per render with the previous instance and keep the returned one: the tooltip is created when it should be visible and none exists, destroyed (returning undefined) when hidden, and restyled in place otherwise.

Parameters ​

ParameterTypeDescription
tooltipTooltip | undefinedThe chart's current tooltip instance, if any.
input?ChartTooltipInputThe chart's raw tooltip option.
placement?TooltipPlacementWhere the tooltip box sits relative to its anchor (see Tooltip).

Returns ​

Tooltip | undefined

The tooltip to use for this render, or undefined when tooltips are disabled.

Inherited from ​

CartesianChart.syncTooltip


update() ​

update(options): void

Defined in: charts/src/core/cartesian.ts:342

Merges options and re-renders (see Chart.update), additionally creating or destroying the navigator when the navigator or overview option is toggled. The controller is otherwise a construction-time concern, so reconciling here keeps chart.update({ navigator }) / chart.update({ overview }) working at runtime.

Parameters ​

ParameterType
optionsPartial<TOptions>

Returns ​

void

Inherited from ​

CartesianChart.update