Skip to content

Documentation / @finchart/core / index / syncCrosshair

Function: syncCrosshair() ​

syncCrosshair(a, b, ...more): () => void

Defined in: packages/core/src/extensions/sync.ts:82

Links the cursor time across charts — hovering one chart raises a time-ghost cursor (timeCursor: a vertical line + x badge) on the rest.

The only thing carried over is the data x: y has no meaning since each chart has its own scale, and magnet snapping is a drawing concern, so the raw x is sent — the receiving chart speaks in its own bar grid and its own wording (pointing at the same moment even across different timeframes).

The ghost never emits anything, so there's no feedback problem — it doesn't even need the flag syncX uses. Everything clears once the cursor leaves a chart (pane is null).

ts
const release = syncCrosshair(btcPlot, ethPlot, xrpPlot);

Parameters ​

a ​

CursorSync

b ​

CursorSync

more ​

...CursorSync[]

Returns ​

() => void