Configures the crosshair labels.
Crosshair labels appear on the chart axes when a user pauses on a series point. They display the argument and the value of this series point.
There are two crosshair labels on a chart - one for each crosshair line, and the label object described here configures both. If you need to set options individually for each label, use the label object within the crosshair.horizontalLine or crosshair.verticalLine object. Individual settings override common ones.
Because the crosshair labels are hidden by default, assign true to the label.visible field if you need them to be shown.
Paints the background of the crosshair labels.
This option supports the following colors:
- Hexadecimal colors
- RGB colors
- RGBA colors
- Predefined/cross-browser color names
- Predefined SVG colors
Customizes the text displayed by the crosshair labels.
The text for the crosshair label to display.
This option accepts a function that will be called twice on each point - once for the horizontal line, and then for the vertical. To specify an individual function, which will be called for the horizontal or vertical line separately, use the customizeText option within horizontalLine.label or verticalLine.label object.
Formats a point value/argument before it is displayed in the crosshair label.
Use the crosshair.label.format.precision option instead.
Specifies a precision for formatted values.