Skip to content

Documentation / @finchart/core / index / PlotEvents

Interface: PlotEvents ​

Defined in: packages/core/src/plot/events.ts:55

Properties ​

click ​

click: CrosshairPayload

Defined in: packages/core/src/plot/events.ts:99

Click set — the payload is the same shape as crosshair.


contextmenu ​

contextmenu: CrosshairPayload

Defined in: packages/core/src/plot/events.ts:101


crosshair ​

crosshair: CrosshairPayload | null

Defined in: packages/core/src/plot/events.ts:97

The cursor over the chart — and null once, when it leaves. A tooltip, a legend or a synced sibling holding the last value after the pointer left would show a value that is no longer under anything; on a live chart that reads as the current price. null is the cursor being nowhere, which is different from a payload with pane: null — that one is the cursor over a margin or a gap, still at a position.


dblclick ​

dblclick: CrosshairPayload

Defined in: packages/core/src/plot/events.ts:100


panesChange ​

panesChange: Record<string, never>

Defined in: packages/core/src/plot/events.ts:76

The pane layout or a pane's value-axis mode changed. No payload: read plot.panes and the panes themselves.

  • Layout: a pane added, removed or reordered, maximized or given back (maximizePane), a pane's flex (a divider drag rewrites every pane's) or minHeight.
  • Mode: autoScale, invert, the scale (setYScale with a different instance), or a value range set by hand (setValueDomain, an axis drag).

Doesn't ring for the x window (that's xDomainChange), data, valuePadding or axis (how a pane draws, not where it sits or how its axis follows), a fit to the data (fitValueDomain, a manual range that setData or a scale swap refits — the swap itself rings once), an automatic value axis following the view, or a value restated as it is.

Synchronous. A divider drag (once per pointermove), fitDomains() and a maximize ring at most once for the whole change; separate pane.applyOptions calls ring once each.


render ​

render: Record<string, never>

Defined in: packages/core/src/plot/events.ts:88

A frame finished drawing. No payload.

It used to carry { dataPoints }, but that value was the source's visible point count, so it didn't count what derived series drew — stacking on four indicators gave the same number. Fixing it would mean the drawing path counts, and the only place that wants the count is benchmarks — and a benchmark can count more accurately by wrapping the renderer (the commands actually issued). The core has no reason to count every frame.


xDomainChange ​

xDomainChange: XDomainChangePayload

Defined in: packages/core/src/plot/events.ts:102