Documentation / @finchart/core / index / Pane
Interface: Pane
Defined in: packages/core/src/plot/pane.ts:127
The pane as seen from outside. This is the name that's public (index.ts exports it as Pane).
Writing it by subtraction, like Omit<Pane, …>, would mean every new method on the class gets published with no decision behind it, so this is written by addition instead. Pane implements PaneApi lets the compiler keep the two in sync.
What's not here is wiring the chart uses every frame — planting the vertical slot (setValueRange, setArea), drawing (draw), collecting badges (collectAxisBadges), and handing x to the bar-index mapping (xValuesPerSeries). Calling these from outside gets overwritten by the next frame, or leaks a command outside a commit.
What an extension should require is not this whole type, but the pieces below — SeriesHost, PaneDecorationHost, ValueCoordinates, DataProbe (→ capabilities.ts). An indicator only needs SeriesHost.
Extends
Properties
area
readonlyarea:PlotArea
Defined in: packages/core/src/plot/capabilities.ts:250
The space allotted to this pane. The basis for a hit test's "is this inside" question.
Inherited from
autoScale
readonlyautoScale:boolean
Defined in: packages/core/src/plot/pane.ts:135
Whether the value axis follows the visible range.
axis
readonlyaxis:Readonly<AxisOptions>
Defined in: packages/core/src/plot/pane.ts:141
This pane's value axis settings. Change it with applyOptions({ axis }).
flex
readonlyflex:number
Defined in: packages/core/src/plot/pane.ts:137
Share of the leftover vertical space this pane takes. Updates when a divider is dragged.
invert
readonlyinvert:boolean
Defined in: packages/core/src/plot/pane.ts:143
Whether the value axis is inverted → PaneOptions.invert
minHeight
readonlyminHeight:number
Defined in: packages/core/src/plot/pane.ts:139
Never shrinks below this (px).
yScale
readonlyyScale:Scale
Defined in: packages/core/src/plot/pane.ts:145
The value axis. Can be swapped out — the log/linear toggle arrives via setYScale.
Methods
addDecoration()
addDecoration(
decoration,options?): () =>void
Defined in: packages/core/src/plot/capabilities.ts:283
Parameters
decoration
options?
Returns
() => void
Inherited from
PaneDecorationHost.addDecoration
addSeries()
addSeries<
TSource,TPoint>(registration):SeriesHandle<TSource,TPoint>
Defined in: packages/core/src/plot/capabilities.ts:267
Type Parameters
TSource
TSource extends BaseDataPoint
TPoint
TPoint extends BaseDataPoint = TSource
Parameters
registration
SeriesRegistration<TSource, TPoint> | Series<TSource>
Returns
SeriesHandle<TSource, TPoint>
Inherited from
applyOptions()
applyOptions(
options):void
Defined in: packages/core/src/plot/pane.ts:160
Changes only what's given. Omitting means "leave as is."
Parameters
options
Returns
void
clearSeries()
clearSeries():
void
Defined in: packages/core/src/plot/pane.ts:157
Returns
void
fitValueDomain()
fitValueDomain(
visible?):void
Defined in: packages/core/src/plot/pane.ts:166
Fits this pane's value axis so every series in it is visible.
Parameters
visible?
Viewport | null
Returns
void
formatValue()
formatValue(
value):string
Defined in: packages/core/src/plot/capabilities.ts:171
Parameters
value
number
Returns
string
Inherited from
getSeries()
getSeries(): readonly
unknown[]
Defined in: packages/core/src/plot/pane.ts:158
Returns
readonly unknown[]
pixelAtValue()
pixelAtValue(
value):number
Defined in: packages/core/src/plot/capabilities.ts:254
The screen y (px) where a value lands.
Parameters
value
number
Returns
number
Inherited from
probe()
probe(
x):SeriesSample[]
Defined in: packages/core/src/plot/capabilities.ts:299
Parameters
x
number
Returns
Inherited from
resetValueAxis()
resetValueAxis():
void
Defined in: packages/core/src/plot/pane.ts:172
Hands the value axis back to autoScale — the named form of applyOptions({ autoScale: true }). The next render fits it to the visible range; a y-axis double-click lands here.
Returns
void
setSeries()
setSeries<
TSource,TPoint>(registration):SeriesHandle<TSource,TPoint>
Defined in: packages/core/src/plot/pane.ts:154
Discards everything mounted and leaves just one.
Type Parameters
TSource
TSource extends BaseDataPoint
TPoint
TPoint extends BaseDataPoint = TSource
Parameters
registration
SeriesRegistration<TSource, TPoint> | Series<TSource>
Returns
SeriesHandle<TSource, TPoint>
setValueDomain()
setValueDomain(
min,max):void
Defined in: packages/core/src/plot/pane.ts:164
Sets the value range directly. Turns off autoScale.
Parameters
min
number
max
number
Returns
void
setYScale()
setYScale(
next):void
Defined in: packages/core/src/plot/pane.ts:148
Swaps out the value axis. Replants the current value range onto the new scale.
Parameters
next
Returns
void
subscribe()
subscribe(
listener): () =>void
Defined in: packages/core/src/plot/pane.ts:150
Notifies you when a series or option changes. Returns an unsubscribe function.
Parameters
listener
(change) => void
Returns
() => void
syncSeries()
syncSeries(
specs):void
Defined in: packages/core/src/plot/pane.ts:152
Fits the series list to what the array says. Owns the whole list.
Parameters
specs
readonly SeriesSpec<BaseDataPoint>[]
Returns
void
use()
use<
Api>(plugin):Api
Defined in: packages/core/src/plot/capabilities.ts:310
Type Parameters
Api
Api extends PluginApi
Parameters
plugin
Plugin<PaneApi, Api>
Returns
Api
Inherited from
valueAt()
valueAt(
pixel):number
Defined in: packages/core/src/plot/capabilities.ts:252
The value at screen y (px).
Parameters
pixel
number
Returns
number
Inherited from
valueExtent()
valueExtent(
visible?):Range|null
Defined in: packages/core/src/plot/pane.ts:162
The value range spanning every series in this pane. null if there's nothing to measure.
Parameters
visible?
Viewport | null
Returns
Range | null
xRange()
xRange():
Range|null
Defined in: packages/core/src/plot/capabilities.ts:301
The x range of the points being drawn. null if empty — legend's "last value" uses this.
Returns
Range | null