Skip to content

Crosshair action

Use this action with change({ id: 'Crosshair', context }).

Context

  • id?: Get | Update (Update is assumed if omitted)
  • crosshair: vertical | horizontal | both | none
  • horizontal: { color, dashStyle } (optional styling)
  • vertical: { color, dashStyle } (optional styling)
  • haloTracking: true | false (maps to plot-hover halo behavior)

Behavior

Crosshair supports:

  • Get: returns current crosshair settings in the same shape as Update context.
  • Update: enables/disables one or both crosshair lines and optionally styles them.

You can style horizontal and vertical lines independently.