trackballInfo method
TrackballInfo?
trackballInfo(
- Offset position,
- int pointIndex
)
override
Implementation
@override
TrackballInfo? trackballInfo(Offset position, int pointIndex) {
final CartesianChartPoint<D> chartPoint = _chartPoint(pointIndex);
if (pointIndex == -1 ||
points.isEmpty ||
(chartPoint.y != null && chartPoint.y!.isNaN)) {
return null;
}
return ChartTrackballInfo<T, D>(
position: points[0],
point: chartPoint,
series: series,
seriesIndex: series.index,
segmentIndex: currentSegmentIndex,
pointIndex: pointIndex,
text: series.trackballText(chartPoint, series.name),
header: series.tooltipHeaderText(chartPoint),
color: fillPaint.color,
);
}