Skip to main content

CrosshairOptions

Options for the crosshair display on an axis.

Properties

color?

optional color: string

Color of the crosshair line.


cssClass?

optional cssClass: string

Optional CSS class to write to the crosshair element.


labelColor?

optional labelColor: string

Color for the label text. Defaults to the same color as the line.


labelFont?

optional labelFont: FontSpec

Font for the label.


labelFormat?

optional labelFormat: string

Formatter for the label.


labelPosition?

optional labelPosition: "end" | "start"

Position of the label on the crosshair. For a horizontal line, 'start' means 'left' and 'end' means 'right'. For a vertical line, 'start' means 'bottom' and 'end' means 'top'.


labelValueFormat?

optional labelValueFormat: number | "float" | "int"

Standard number format for the value (e.g. 'int', 'float', or a number for decimal places).


showLabel?

optional showLabel: boolean

Whether or not to show the current value on the crosshair. Defaults to true.


width?

optional width: number

Width of the crosshair line. Defaults to 1.