trackball property
Enables and customizes the trackball.
Trackball feature displays the tooltip for the data points that are closer to the point where you touch on the chart area. This feature can be enabled by creating an instance of SparkChartTrackball.
Provides option to customizes the activationMode
, width
, color,
labelStyle
, backgroundColor
, borderColor, borderWidth.
Defaults to null
.
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: SfSparkWinLossChart(
trackball: SparkChartTrackball(borderWidth: 2,
borderColor: Colors.black, activationMode: SparkChartActivationMode.doubleTap),
data: <double>[18, 24, 30, 14, 28],
)),
);
}
Implementation
final SparkChartTrackball? trackball;