Skip to content

Documentation / @finchart/react / ChartApi

Interface: ChartApi<T> ​

Defined in: react/src/components/chart-context.ts:22

Type Parameters ​

T ​

T extends BaseDataPoint = BaseDataPoint

Properties ​

plot ​

plot: Plot

Defined in: react/src/components/chart-context.ts:23

Methods ​

acquirePane() ​

acquirePane(options): PaneApi

Defined in: react/src/components/chart-context.ts:24

Parameters ​

options ​

PaneAcquisition

Returns ​

PaneApi


rankPane() ​

rankPane(pane, rank): void

Defined in: react/src/components/chart-context.ts:46

Where a <ChartPane> sits in the JSX. Recorded only; stackPanes moves the chart's panes to follow, so a pane inserted above others, or keyed panes reordered, land where the tree puts them.

Parameters ​

pane ​

PaneApi

rank ​

readonly number[]

Returns ​

void


releasePane() ​

releasePane(pane): void

Defined in: react/src/components/chart-context.ts:25

Parameters ​

pane ​

PaneApi

Returns ​

void


seriesCollector() ​

seriesCollector(pane): SeriesCollector<T>

Defined in: react/src/components/chart-context.ts:40

The owner of that pane's series list. One per pane, so the container holds it.

If <ChartPane> takes over mainPane, it ends up sharing the same collector as a <ChartSeries> outside any pane — that's fine, since it's the same collector and neither clears the other's list.

Parameters ​

pane ​

PaneApi

Returns ​

SeriesCollector<T>


stackPanes() ​

stackPanes(): void

Defined in: react/src/components/chart-context.ts:48

Restacks the panes if a rank moved since the last time, and only then.

Returns ​

void


swapPaneScale() ​

swapPaneScale(pane, yScale): void

Defined in: react/src/components/chart-context.ts:31

A yScale kind that changed after acquisition: its scale is installed; undefined puts back the default — on the main pane, the instance the prop replaced.

Parameters ​

pane ​

PaneApi

yScale ​

Scale | undefined

Returns ​

void