Crosshairs

The Chart crosshairs are lines which are perpendicular to the axes and enable the user to see the exact value at the current cursor position.

To enable the crosshair for an axis, either:

  • Add the corresponding crosshair component, or
  • Set the crosshair.visible option to true.

The following example demonstrates how to enable the crosshairs.

Example
View Source
Change Theme:

Current Cursor Values

To get the current hovered values, use the onPlotAreaHover event.

The following example demonstrates how to get the hovered values.

Example
View Source
Change Theme:

In this article

Not finding the help you need?