showByIndex method
Displays the trackball at the specified point index.
- pointIndex - index of the point for which the trackball must be shown
Implementation
void showByIndex(int pointIndex) {
final SfCartesianChartState chartState = _chartState!;
final TrackballBehaviorRenderer trackballBehaviorRenderer =
chartState._trackballBehaviorRenderer;
if ((trackballBehaviorRenderer._trackballPainter != null ||
builder != null) &&
activationMode != ActivationMode.none) {
if (_validIndex(pointIndex, 0, chartState._chart)) {
trackballBehaviorRenderer._showTrackball(
chartState._chartSeries.visibleSeriesRenderers,
pointIndex,
trackballBehaviorRenderer);
}
if (trackballBehaviorRenderer._trackballPainter != null) {
trackballBehaviorRenderer._trackballPainter!.canResetPath = false;
trackballBehaviorRenderer
._trackballPainter!.chartState._trackballRepaintNotifier.value++;
}
}
}