shouldAlwaysShow property
Enables or disables the crosshair.
By default, the crosshair will be hidden on touch. To avoid this, set this property to true.
Defaults to false
.
late CrosshairBehavior _crosshairBehavior;
void initState() {
_crosshairBehavior = CrosshairBehavior(
enable: true,
shouldAlwaysShow: true
);
super.initState();
}
Widget build(BuildContext context) {
return SfCartesianChart(
crosshairBehavior: _crosshairBehavior
);
}
Implementation
final bool shouldAlwaysShow;