activationMode property

ActivationMode activationMode
final

Gesture for activating the crosshair.

Crosshair can be activated in tap, double tap and long press.

Defaults to ActivationMode.longPress.

Also refer ActivationMode.

late CrosshairBehavior _crosshairBehavior;

void initState() {
  _crosshairBehavior = CrosshairBehavior(
    enable: true,
    activationMode: ActivationMode.doubleTap
  );
  super.initState();
}

Widget build(BuildContext context) {
  return SfCartesianChart(
    crosshairBehavior: _crosshairBehavior
  );
}

Implementation

final ActivationMode activationMode;