trackballInfo method

  1. @override
TrackballInfo? trackballInfo(
  1. Offset position
)
override

Implementation

@override
TrackballInfo? trackballInfo(Offset position) {
  if (segmentRect != null) {
    final CartesianChartPoint<D> chartPoint = _chartPoint();
    return ChartTrackballInfo<T, D>(
      position: series.isTransposed
          ? series.yAxis!.isInversed
              ? segmentRect!.outerRect.centerLeft
              : segmentRect!.outerRect.centerRight
          : series.yAxis!.isInversed
              ? segmentRect!.outerRect.bottomCenter
              : segmentRect!.outerRect.topCenter,
      point: chartPoint,
      series: series,
      pointIndex: currentSegmentIndex,
      seriesIndex: series.index,
    );
  }
  return null;
}