onCrosshairPositionChanging property

ChartCrosshairCallback? onCrosshairPositionChanging
final

Occurs when tapping the axis label. Here, you can get the appropriate axis that is tapped and the axis label text.

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           crosshairBehavior: CrosshairBehavior(enable: true),
           onCrosshairPositionChanging: (CrosshairRenderArgs args) => crosshair(args)
       ));
}
void crosshair(CrosshairRenderArgs args) {
   args.text = 'crosshair';
}

Implementation

final ChartCrosshairCallback? onCrosshairPositionChanging;