Interface CrosshairMoveEvent

Emitted on every crosshair move (and null fields on pointer-leave) so a host can render an OHLC legend / tooltip. bar is the hovered bar of the primary price series; point is container-relative media px for positioning a floating tooltip. See subscribeCrosshairMove.

interface CrosshairMoveEvent {
    bar: null | Bar;
    index: null | number;
    modifiers?: PointerModifiers;
    paneIndex?: null | number;
    point: null | { x: number; y: number };
    pointerType?: PointerKind;
    pressed?: boolean;
    pressure?: number;
    price: null | number;
    samples?: PointerSample[];
    time: null | number;
}

Properties

bar: null | Bar

Hovered bar of the primary (first) price series, or null.

index: null | number

Logical index under the cursor, or null.

modifiers?: PointerModifiers

Modifier keys held during the move. Absent on the leave payload.

paneIndex?: null | number

Pane under the cursor, or null on leave.

point: null | { x: number; y: number }

Cursor position in container media px, or null on leave.

pointerType?: PointerKind

Device behind the move. Absent on the leave payload.

pressed?: boolean

True while a pointer is held. Placement mode swallows the pan path, so this is the only way to tell a hover from a drag while it is still happening. Absent on the all-null leave payload.

pressure?: number

Pressure as reported for the move (see PointerSample). Absent on the leave payload.

price: null | number

Price under the cursor on the hovered pane, or null.

samples?: PointerSample[]

Every position the pointer passed through since the last move, in the drag payload's space (container x, pane-local y), present only while pressed. Placement mode never arms a drag, so a freehand stroke reads its coalesced samples here.

time: null | number

UTC seconds of the hovered bar, or null when off the data / pointer left.