trackballInfo method
TrackballInfo?
trackballInfo(
- Offset position,
- int pointIndex
)
override
Implementation
@override
TrackballInfo? trackballInfo(Offset position, int pointIndex) {
if (pointIndex != -1 && points.isNotEmpty) {
final Offset preferredPos =
Offset(series.pointToPixelX(x, high), series.pointToPixelY(x, high));
final CartesianChartPoint<D> chartPoint = _chartPoint();
return ChartTrackballInfo<T, D>(
position: preferredPos,
highXPos: preferredPos.dx,
highYPos: preferredPos.dy,
lowYPos: series.pointToPixelY(x, low),
point: chartPoint,
series: series,
seriesIndex: series.index,
segmentIndex: currentSegmentIndex,
pointIndex: pointIndex,
text: series.trackballText(chartPoint, series.name),
header: series.tooltipHeaderText(chartPoint),
color: fillPaint.color,
);
}
return null;
}