showByIndex method

void showByIndex(
  1. int pointIndex
)

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 RenderBehaviorArea? parent = parentBox as RenderBehaviorArea?;
  final CartesianSeriesRenderer? child =
      parent!.plotArea!.firstChild! as CartesianSeriesRenderer?;
  if (child != null) {
    final List<num> visibleIndexes = child.visibleIndexes;
    if (visibleIndexes.first <= pointIndex &&
        pointIndex <= visibleIndexes.last) {
      show(child.xRawValues[pointIndex], 0);
    }
  }
}