Skip to content

charton API


charton API / @chart-on/core / index / CrosshairOptions

Interface: CrosshairOptions ​

Defined in: packages/core/src/chart.ts:218

Look and behaviour of the crosshair; see the crosshair chart option.

Properties ​

cursor ​

cursor: "cross" | "pointer"

Defined in: packages/core/src/chart.ts:237

Whether the crosshair lines follow the pointer over the plot: 'cross' draws them, 'pointer' leaves the platform's own pointer with no lines but keeps the axis labels. These are the two choices because the lines are the only thing that changes what the user sees; the pointer's shape stays the platform's, so its size and contrast settings keep working. While a drawing tool is armed the lines show. Default 'cross'.


horizontal ​

horizontal: CrosshairLineOptions

Defined in: packages/core/src/chart.ts:222


horizontalInAllPanes ​

horizontalInAllPanes: boolean

Defined in: packages/core/src/chart.ts:224

Draw the horizontal line, and its price labels, at the same price in every pane that shows it.


labels ​

labels: object

Defined in: packages/core/src/chart.ts:226

The price labels on the price axes and the time label.

price ​

price: boolean

time ​

time: boolean


mode ​

mode: CrosshairMode

Defined in: packages/core/src/chart.ts:220

How the crosshair follows the pointer; snapping applies in the main series' pane.


timeLabelPosition ​

timeLabelPosition: "top" | "bottom"

Defined in: packages/core/src/chart.ts:228

Time label on the time axis ('bottom') or at the top of the plot.


vertical ​

vertical: CrosshairLineOptions

Defined in: packages/core/src/chart.ts:221