Documentation / @finchart/core / index / CrosshairPayload
Interface: CrosshairPayload
Defined in: packages/core/src/plot/events.ts:17
Where on the chart the cursor is pointing.
x is shared by every pane, but the value differs per pane, so you need to know which pane the cursor is over before a tooltip can show the right number.
Properties
pane
pane:
Pane|null
Defined in: packages/core/src/plot/events.ts:29
The pane the cursor is over. null if it's over padding or a pane gap.
position
position:
Point
Defined in: packages/core/src/plot/events.ts:19
Screen coordinates.
value
value:
number|null
Defined in: packages/core/src/plot/events.ts:31
That pane's value. null if pane is null.
x
x:
number
Defined in: packages/core/src/plot/events.ts:27
The data x under the cursor. Same regardless of pane.
Even in bar-index coordinates this is x, not an index — what a subscriber (a tooltip) should show is time, not a bar number. Between bars this is a linear interpolation between the neighboring bars' x.