tooltipInfo method
TooltipInfo?
tooltipInfo(
{ - Offset? position,
- int? pointIndex,
})
override
Implementation
@override
TooltipInfo? tooltipInfo({Offset? position, int? pointIndex}) {
if (segmentRect != null) {
pointIndex ??= currentSegmentIndex;
final CartesianChartPoint<D> chartPoint = _chartPoint();
return ChartTooltipInfo<T, D>(
primaryPosition: series.localToGlobal(segmentRect!.topCenter),
secondaryPosition: series.localToGlobal(segmentRect!.bottomCenter),
text: series.tooltipText(chartPoint),
header: series.parent!.tooltipBehavior!.shared
? series.tooltipHeaderText(chartPoint)
: series.name,
data: series.dataSource![pointIndex],
point: chartPoint,
series: series.widget,
renderer: series,
seriesIndex: series.index,
segmentIndex: currentSegmentIndex,
pointIndex: pointIndex,
markerColors: <Color?>[fillPaint.color],
markerType: series.markerAt(pointIndex).type,
);
}
return null;
}