enable property

bool enable
final

Toggles the visibility of the crosshair.

Defaults to false.

late CrosshairBehavior _crosshairBehavior;

void initState() {
  _crosshairBehavior = CrosshairBehavior(enable: true);
  super.initState();
}

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

Implementation

final bool enable;