Skip to main content
CrosshairOptions
Options for the crosshair display on an axis.
NameTypeDescription
color?stringColor of the crosshair line.
cssClass?stringOptional CSS class to write to the crosshair element.
labelColor?stringColor for the label text. Defaults to the same color as the line.
labelFont?FontSpecFont for the label.
labelFormat?stringFormatter for the label.
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?number | "float" | "int"Standard number format for the value (e.g. 'int', 'float', or a number for decimal places).
showLabel?booleanWhether or not to show the current value on the crosshair. Defaults to true.
width?numberWidth of the crosshair line. Defaults to 1.