trackballInfo method

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

Implementation

@override
TrackballInfo? trackballInfo(Offset position) {
  if (segmentRect == null) {
    return null;
  }

  final num left = x + series.sbsInfo.minimum;
  return ChartTrackballInfo<T, D>(
    position: segmentRect!.topCenter,
    point: _chartPoint(),
    series: series,
    pointIndex: currentSegmentIndex,
    seriesIndex: series.index,
    lowYPos: series.pointToPixelY(left, bottom),
    highYPos: series.pointToPixelY(left, top),
    highXPos: series.pointToPixelX(left, top),
  );
}