Skip to main content

Interface: LinkCursorOptions

Defined in: packages/sdvplot/src/interact/cursor.ts:44

How linkCursor follows and emits the store's cursor.

Properties​

dot?​

readonly optional dot?: (value) => number | null

Defined in: packages/sdvplot/src/interact/cursor.ts:58

A dot on the cursor at this OTHER-axis data value (a curve's value there); null hides it. Needs cross.

Parameters​

value​

number

Returns​

number | null


emit?​

readonly optional emit?: boolean

Defined in: packages/sdvplot/src/interact/cursor.ts:50

Write the value under the pointer to the store. Default true for "x" / "y"; a ring never emits.


field​

readonly field: string

Defined in: packages/sdvplot/src/interact/cursor.ts:46

The cursor field this figure draws and emits, such as "shot_distance"; a cursor naming another field hides it.


flipAt?​

readonly optional flipAt?: number

Defined in: packages/sdvplot/src/interact/cursor.ts:56

Past this fraction of the axis' pixel range (0, 1] the readout flips to the cursor's left. Default 30 / 35.


label?​

readonly optional label?: (value) => readonly string[]

Defined in: packages/sdvplot/src/interact/cursor.ts:54

A readout beside an "x" cursor, one line per string.

Parameters​

value​

number

Returns​

readonly string[]


shape​

readonly shape: CursorShape

Defined in: packages/sdvplot/src/interact/cursor.ts:48

What to draw, through which scale.


snap?​

readonly optional snap?: (value) => number

Defined in: packages/sdvplot/src/interact/cursor.ts:52

Snap an emitted value on a linear scale, such as (v) => Math.floor(v) + 0.5 for 1 ft bins. Default: none.

Parameters​

value​

number

Returns​

number