enablePinching property

bool enablePinching
final

Enables or disables the pinch zooming.

Pinching can be performed by moving two fingers over the chart. You can zoom the chart through pinch gesture in touch enabled devices.

Defaults to false.

late ZoomPanBehavior zoomPanBehavior;

void initState() {
  zoomPanBehavior = ZoomPanBehavior(
    enablePinching: true
  );
  super.initState();
}

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

Implementation

final bool enablePinching;