Skip to content

Documentation / @finchart/core / index / CrosshairLineOptions

Interface: CrosshairLineOptions ​

Defined in: packages/core/src/extensions/crosshair.ts:21

Properties ​

badges? ​

optional badges?: boolean

Defined in: packages/core/src/extensions/crosshair.ts:33

Shows the cursor's value as a box on the axis. Defaults to true — an axis with its line off gets no badge either. On an axis with no mounted labels there's nowhere to put it, so it's dropped either way.


format? ​

optional format?: object

Defined in: packages/core/src/extensions/crosshair.ts:47

Badge label format. Give it the same format as the axis ticks and the badge speaks the ticks' language. Defaults to a rounded integer for x, two decimals for y.

x? ​

optional x?: (x) => string

Parameters ​
x ​

number

Returns ​

string

y? ​

optional y?: (value) => string

Parameters ​
value ​

number

Returns ​

string


horizontal? ​

optional horizontal?: boolean

Defined in: packages/core/src/extensions/crosshair.ts:25

The horizontal line. Defaults to true.


magnet? ​

optional magnet?: boolean

Defined in: packages/core/src/extensions/crosshair.ts:41

Snaps the vertical line and x badge to the actual x of the bar beneath the cursor. Defaults to false. When the cursor sits in the empty space between bars, this makes the crosshair point at where data actually is instead of an interpolated spot — the decision goes by the first registration (Pane.probe) on whichever pane the cursor is over.


style? ​

optional style?: Partial<LineStyle>

Defined in: packages/core/src/extensions/crosshair.ts:27

Overrides on top of the CSS variables and defaults.


vertical? ​

optional vertical?: boolean

Defined in: packages/core/src/extensions/crosshair.ts:23

The vertical line. Defaults to true.