Class: Crosshair

Crosshair

The crosshair is a plugin that responds to interaction State and displays a DOM crosshair on the screen at the cursor. Optionally there is a spyglass that will show a magnified view of what's directly under the cursor. This is useful for touch devices, where that area is obscured by the user's finger. Crosshair is a plugin. To use it, you must add "crosshair" to the InteractionConfig plugins array.

Since:
  • 9.4.0

Type Definitions


CrosshairConfig

UI crosshair configuration. Configures the crosshair plugin that displays a crosshair at the cursor location, and a "spyglass" when long-pressing.

Type:
Properties:
Name Type Argument Description
export string <optional>

Name of the exported class, usually "Crosshair".

offDelay string <optional>

Set to allow delay in transitioning crosshair off after release of long-press. e.g., "5s".

spyglass boolean <optional>

Set to true to enable spyglass feature when long-pressing on the chart.

color string <optional>

Crosshair line color.

width string <optional>

Crosshair line width.

pattern string <optional>

Crosshair line pattern.

Since:
  • 9.4.0