label

Configures the label that belongs to the vertical crosshair line.

Type:

Object

Crosshair labels can be configured using the following objects.

  • crosshair.horizontalLine.label
    Configures the label of the horizontal crosshair line only.

  • crosshair.verticalLine.label
    Configures the label of the vertical crosshair line only.

  • crosshair.label
    Configures both the labels.

These objects have identical structure, but the label settings declared in the horizontalLine or verticalLine object override the label settings declared directly in the crosshair object.

See Also
  • crosshair.horizontalLine.label - configures the label that belongs to the horizontal crosshair line.

backgroundColor

Paints the background of the label that belongs to the vertical crosshair line.

Type:

String

Default Value: '#f05b41'

This option supports the following colors.

customizeText

Customizes the text displayed by the label that belongs to the vertical crosshair line.

Type:

function

Function parameters:
info:

Object

Information about the point a user paused on.

Object structure:
value:

Date

|

Number

|

String

The raw argument value.

valueText:

String

The formatted value converted to a string.

point:

Point

The Point object.

Return Value:

String

The text to be displayed in the label that belongs to the vertical crosshair line.

Cannot be used in themes.
NOTE
The parameter of the customizeText function is mirrored by the this object.

font

Specifies font options for the label of the vertical crosshair line.

Type:

Object

format

Formats the point argument before it is displayed in the crosshair label.

Type:

Format

Default Value: undefined

See the format section for details on accepted values.

See Also

precision

Deprecated

Use the crosshair.verticalLine.label.format.precision option instead.

Specifies a precision for formatted values.

Type:

Number

Default Value: undefined

visible

Makes the label of the vertical crosshair line visible. Applies only if the crosshair feature is enabled and the vertical line is visible.

Type:

Boolean

Default Value: false