trackball property

SparkChartTrackball? trackball
final

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: SfSparkAreaChart(
     trackball:
         SparkChartTrackball(activationMode: SparkChartActivationMode.tap)
      )
    ),
 );
}

Implementation

final SparkChartTrackball? trackball;