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 ​
CartesianChart<AreaChartOptions<TData>,TData,AreaChartEventMap>
Type Parameters ​
| Type Parameter | Default type | Description |
|---|---|---|
TData | unknown | The 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 ​
| Parameter | Type |
|---|---|
target | string | HTMLElement | Context<Element, Record<string, unknown>> |
options | AreaChartOptions<TData> |
Returns ​
AreaChart<TData>
Overrides ​
Properties ​
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|---|
animationOptions | protected | ChartAnimationOptions | undefined | - | CartesianChart.animationOptions | charts/src/core/chart.ts:195 |
autoRender | protected | boolean | undefined | - | CartesianChart.autoRender | charts/src/core/chart.ts:194 |
colorGenerator | protected | Generator<string> | undefined | - | CartesianChart.colorGenerator | charts/src/core/chart.ts:208 |
crosshair? | protected | Crosshair | undefined | - | CartesianChart.crosshair | charts/src/core/cartesian.ts:294 |
grid? | protected | Grid | undefined | - | CartesianChart.grid | charts/src/core/cartesian.ts:293 |
legend? | protected | Legend | undefined | - | CartesianChart.legend | charts/src/core/chart.ts:198 |
options | protected | AreaChartOptions | undefined | - | CartesianChart.options | charts/src/core/chart.ts:202 |
parent? | public | EventBus<AreaChartEventMap> | undefined | The parent event bus that emitted events bubble up to, if any. | CartesianChart.parent | core/src/core/event-bus.ts:107 |
renderer | readonly | Renderer | undefined | The renderer driving the chart's animation loop. Exposed for inspection and tooling (e.g. devtools binding). | CartesianChart.renderer | charts/src/core/chart.ts:193 |
scene | readonly | Scene | undefined | The scene the chart renders into. Exposed for inspection and tooling (e.g. devtools binding). | CartesianChart.scene | charts/src/core/chart.ts:191 |
theme | protected | Theme | undefined | The resolved theme (palette + furniture colors) this chart renders with. | CartesianChart.theme | charts/src/core/chart.ts:204 |
title? | protected | ChartTitle | undefined | - | CartesianChart.title | charts/src/core/chart.ts:197 |
titleOptions? | protected | ChartTitleOptions | undefined | - | CartesianChart.titleOptions | charts/src/core/chart.ts:196 |
tooltip? | protected | Tooltip | undefined | - | CartesianChart.tooltip | charts/src/core/cartesian.ts:292 |
tooltipTrigger | protected | ChartTooltipTrigger | 'item' | The resolved tooltip trigger mode ('item' per-mark, 'axis' shared), kept in sync by Chart.syncTooltip. | CartesianChart.tooltipTrigger | charts/src/core/chart.ts:207 |
xAxis | protected | ChartXAxis | undefined | - | CartesianChart.xAxis | charts/src/core/cartesian.ts:282 |
xAxisOptions | protected | ChartAxisItemOptions<TData> | undefined | Resolved x-axis options (scale type, ticks, min/max, format), re-resolved from the chart options each render. | CartesianChart.xAxisOptions | charts/src/core/cartesian.ts:289 |
yAxes | protected | ChartYAxis[] | [] | All y-axes (primary plus any secondary). CartesianChart.yAxis is the primary (yAxes[0]). | CartesianChart.yAxes | charts/src/core/cartesian.ts:285 |
yAxesOptions | protected | ChartYAxisItemOptions<TData>[] | [] | Resolved options for every y-axis, parallel to CartesianChart.yAxes. | CartesianChart.yAxesOptions | charts/src/core/cartesian.ts:287 |
yAxis | protected | ChartYAxis | undefined | - | CartesianChart.yAxis | charts/src/core/cartesian.ts:283 |
yAxisOptions | protected | ChartYAxisItemOptions<TData> | undefined | Resolved y-axis options (scale type, ticks, min/max, format), re-resolved from the chart options each render. | CartesianChart.yAxisOptions | charts/src/core/cartesian.ts:291 |
defaultKey | readonly | typeof defaultKey | undefined | The key under which resources are retained when no explicit key is provided. | CartesianChart.defaultKey | core/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 ​
context ​
Get Signature ​
get context():
Context
Defined in: charts/src/core/chart.ts:217
The rendering context the chart's scene draws into.
Returns ​
Inherited from ​
isNavigating ​
Get Signature ​
get
protectedisNavigating():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 ​
navigator ​
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 ​
Methods ​
addPlotContent() ​
protectedaddPlotContent(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 ​
| Parameter | Type |
|---|---|
elements | OneOrMore<Element<Partial<BaseState>, ElementEventMap>> |
Returns ​
void
Inherited from ​
applyView() ​
protectedapplyView(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 ​
| Parameter | Type |
|---|---|
scale | Scale<number> |
axis | "x" | "y" |
Returns ​
Scale<number>
Inherited from ​
applyViewToScale() ​
protectedapplyViewToScale<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 ​
| Parameter | Type |
|---|---|
scale | TScale |
axis | "x" | "y" |
Returns ​
TScale
Inherited from ​
CartesianChart.applyViewToScale
bandCenterScale() ​
protectedbandCenterScale(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 ​
| Parameter | Type |
|---|---|
band | BandScale<string> |
keys | string[] |
Returns ​
Scale<string>
Inherited from ​
CartesianChart.bandCenterScale
buildOverviewSeries() ​
protectedbuildOverviewSeries<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 Parameter | Description |
|---|---|
TSeries extends object | The chart's series-options type (must carry an id). |
Parameters ​
| Parameter | Type | Description |
|---|---|---|
series | TSeries[] | The series to describe. |
data | TData[] | The dataset each series is sampled over. |
getType | (series) => ChartNavigatorSeriesType | Resolves how a series is drawn in the strip (line/bar/area). |
getValue | (series, item) => number | Resolves a series' numeric value at a data item. |
Returns ​
ChartNavigatorSeries[]
One ChartNavigatorSeries per input series, in order.
Inherited from ​
CartesianChart.buildOverviewSeries
categoryScale() ​
protectedcategoryScale(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 ​
| Parameter | Type |
|---|---|
keys | string[] |
left | number |
right | number |
Returns ​
Scale<string>
Inherited from ​
clipPlot() ​
protectedclipPlot(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 ​
| Parameter | Type |
|---|---|
area | ChartArea |
Returns ​
void
Inherited from ​
continuousXScale() ​
protectedcontinuousXScale(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 ​
| Parameter | Type |
|---|---|
extent | number[] |
left | number |
right | number |
Returns ​
Inherited from ​
CartesianChart.continuousXScale
createLayout() ​
protectedcreateLayout():ChartLayout
Defined in: charts/src/core/chart.ts:328
Creates a fresh layout for the current canvas size and padding.
Returns ​
Inherited from ​
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 ​
dispose() ​
protecteddispose(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 ​
| Parameter | Type |
|---|---|
key? | PropertyKey |
Returns ​
void
Inherited from ​
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 Parameter | Default type |
|---|---|
TEvent extends Event<undefined> | Event<undefined> |
Parameters ​
| Parameter | Type |
|---|---|
event | TEvent |
Returns ​
TEvent
Inherited from ​
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 ​
| Parameter | Type |
|---|---|
type | TEvent |
data | AreaChartEventMap[TEvent] |
Returns ​
Event<AreaChartEventMap[TEvent]>
Inherited from ​
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 ​
Inherited from ​
filterActive() ​
protectedfilterActive<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 ​
| Parameter | Type |
|---|---|
items | T[] |
getId | (item) => string |
Returns ​
T[]
Inherited from ​
getAnimationDuration() ​
protectedgetAnimationDuration(referenceDuration?):number
Defined in: charts/src/core/chart.ts:318
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
referenceDuration | number | 1000 |
Returns ​
number
Inherited from ​
CartesianChart.getAnimationDuration
getChartArea() ​
protectedgetChartArea():ChartArea
Defined in: charts/src/core/chart.ts:520
Returns ​
Inherited from ​
getPadding() ​
protectedgetPadding():ChartPadding
Defined in: charts/src/core/chart.ts:516
Returns ​
Inherited from ​
getSeriesColor() ​
protectedgetSeriesColor(seriesId):string
Defined in: charts/src/core/chart.ts:547
Parameters ​
| Parameter | Type |
|---|---|
seriesId | string |
Returns ​
string
Inherited from ​
gridTicks() ​
protectedgridTicks(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 ​
| Parameter | Type | Description |
|---|---|---|
scale | Scale<any, number> | The scale producing tick values and positions. |
count | number | The target tick count (the axis ticks option). |
Returns ​
GridTick[]
The grid ticks (value + pixel position).
Inherited from ​
groupSeriesByAxis() ​
protectedgroupSeriesByAxis<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 ​
| Parameter | Type | Description |
|---|---|---|
series | TSeries[] | 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 ​
| Parameter | Type |
|---|---|
type | keyof AreaChartEventMap |
Returns ​
boolean
Inherited from ​
hideUnboundAxes() ​
protectedhideUnboundAxes(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 ​
| Parameter | Type | Description |
|---|---|---|
series | object[] | The legend-active series whose bindings decide which axes have something to draw. |
Returns ​
void
Inherited from ​
CartesianChart.hideUnboundAxes
highlightSeries() ​
protectedhighlightSeries(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 ​
| Parameter | Type |
|---|---|
id | string | null |
Returns ​
void
Inherited from ​
CartesianChart.highlightSeries
init() ​
protectedinit():void
Defined in: charts/src/core/chart.ts:243
Returns ​
void
Inherited from ​
isItemActive() ​
protectedisItemActive(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 ​
| Parameter | Type |
|---|---|
id | string |
Returns ​
boolean
Inherited from ​
navigationAxis() ​
protectednavigationAxis():"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 ​
navigatorCategoryLayout() ​
protectednavigatorCategoryLayout():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 ​
| Parameter | Type |
|---|---|
type | TEvent |
handler | EventHandler<AreaChartEventMap[TEvent]> |
Returns ​
void
Inherited from ​
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 ​
| Parameter | Type |
|---|---|
type | TEvent |
handler | EventHandler<AreaChartEventMap[TEvent]> |
options? | EventSubscriptionOptions |
Returns ​
Inherited from ​
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 ​
| Parameter | Type |
|---|---|
type | TEvent |
handler | EventHandler<AreaChartEventMap[TEvent]> |
options? | EventSubscriptionOptions |
Returns ​
Inherited from ​
pointScale() ​
protectedpointScale(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 ​
| Parameter | Type |
|---|---|
keys | string[] |
left | number |
right | number |
Returns ​
Scale<string>
Inherited from ​
prepareAxes() ​
protectedprepareAxes():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 ​
registerHighlightGroups() ​
protectedregisterHighlightGroups(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 ​
| Parameter | Type | Description |
|---|---|---|
groups | Group<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 ​
renderAnnotations() ​
protectedrenderAnnotations(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 ​
| Parameter | Type | Description |
|---|---|---|
scales | AnnotationScales | The x/y value scales annotations resolve against. |
plot | ChartArea | The plot rectangle annotations are drawn within. |
Returns ​
void
Inherited from ​
CartesianChart.renderAnnotations
renderGrid() ​
protectedrenderGrid(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 ​
| Parameter | Type |
|---|---|
xTicks | GridTick[] |
yTicks | GridTick[] |
area | ChartArea |
Returns ​
void
Inherited from ​
renderNavigator() ​
protectedrenderNavigator(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 ​
| Parameter | Type | Default value |
|---|---|---|
band | ChartArea | undefined | undefined |
series | ChartNavigatorSeries[] | undefined |
valueExtent | [number, number] | undefined |
stacked | boolean | false |
Returns ​
void
Inherited from ​
CartesianChart.renderNavigator
reserveLegend() ​
protectedreserveLegend(layout,items):void
Defined in: charts/src/core/cartesian.ts:993
Reserves and renders the legend using the chart's legend option.
Parameters ​
| Parameter | Type |
|---|---|
layout | ChartLayout |
items | LegendItem[] |
Returns ​
void
Inherited from ​
reserveNavigatorBand() ​
protectedreserveNavigatorBand(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 ​
| Parameter | Type |
|---|---|
layout | ChartLayout |
Returns ​
ChartArea | undefined
Inherited from ​
CartesianChart.reserveNavigatorBand
reserveTitle() ​
protectedreserveTitle(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 ​
| Parameter | Type |
|---|---|
layout | ChartLayout |
Returns ​
void
Inherited from ​
resolveAnimation() ​
protectedresolveAnimation(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 ​
| Parameter | Type | Default value |
|---|---|---|
referenceDuration | number | ANIMATION_REFERENCE.update |
Returns ​
Inherited from ​
CartesianChart.resolveAnimation
resolveCartesianPlot() ​
protectedresolveCartesianPlot(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 ​
| Parameter | Type | Default value | Description |
|---|---|---|---|
area | ChartArea | undefined | The drawable area remaining after the title, legend and navigator are reserved. |
applyScales | (plot) => void | undefined | Assigns every axis's scale for a candidate plot rectangle. Called once per pass, and once more with the settled plot. |
maxPasses | number | 4 | Safety bound on the iteration. Defaults to 4. |
Returns ​
The settled plot rectangle.
Inherited from ​
CartesianChart.resolveCartesianPlot
resolveCartesianSetup() ​
protectedresolveCartesianSetup():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 ​
Inherited from ​
CartesianChart.resolveCartesianSetup
resolveSeriesAxisIndex() ​
protectedresolveSeriesAxisIndex(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 ​
| Parameter | Type | Description |
|---|---|---|
id? | string | The series' yAxis option, or undefined for the primary axis. |
Returns ​
number
The resolved y-axis index.
Inherited from ​
CartesianChart.resolveSeriesAxisIndex
resolveSeriesColors() ​
protectedresolveSeriesColors(series):void
Defined in: charts/src/core/chart.ts:532
Parameters ​
| Parameter | Type |
|---|---|
series | object[] |
Returns ​
void
Inherited from ​
CartesianChart.resolveSeriesColors
retain() ​
protectedretain(value,key?):void
Defined in: core/src/core/disposer.ts:14
Registers a disposable resource under an optional key for later cleanup.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
value | Disposable | undefined |
key | PropertyKey | Disposer.defaultKey |
Returns ​
void
Inherited from ​
setItemActive() ​
protectedsetItemActive(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 ​
| Parameter | Type |
|---|---|
id | string |
active | boolean |
Returns ​
void
Inherited from ​
setupAxisTooltip() ​
protectedsetupAxisTooltip(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 ​
| Parameter | Type | Description |
|---|---|---|
plot | ChartArea | The plot rectangle pointer positions are tested against. |
resolve | (plotX, plotY) => AxisTooltipSnapshot | null | Maps a plot position to the tooltip content, or null for no tooltip. |
Returns ​
void
Inherited from ​
CartesianChart.setupAxisTooltip
setupCartesian() ​
protectedsetupCartesian(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 ​
| Parameter | Type |
|---|---|
setup | CartesianSetup |
Returns ​
void
Inherited from ​
setupCrosshair() ​
protectedsetupCrosshair(area):void
Defined in: charts/src/core/cartesian.ts:1232
Sets up the crosshair to track within the given plot area.
Parameters ​
| Parameter | Type |
|---|---|
area | ChartArea |
Returns ​
void
Inherited from ​
syncTooltip() ​
protectedsyncTooltip(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 ​
| Parameter | Type | Description |
|---|---|---|
tooltip | Tooltip | undefined | The chart's current tooltip instance, if any. |
input? | ChartTooltipInput | The chart's raw tooltip option. |
placement? | TooltipPlacement | Where 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 ​
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 ​
| Parameter | Type |
|---|---|
options | Partial<TOptions> |
Returns ​
void