onPaint method
void
onPaint(
- PaintingContext context,
- Offset offset,
- SfChartThemeData chartThemeData,
- ThemeData themeData,
Override this method to customize the crosshair tooltips & line rendering.
Implementation
@override
void onPaint(PaintingContext context, Offset offset,
SfChartThemeData chartThemeData, ThemeData themeData) {
final RenderBehaviorArea? parent = parentBox as RenderBehaviorArea?;
if (_position == null || parent == null) {
return;
}
if (parent.paintBounds.contains(_position!)) {
_drawCrosshairLines(context, _position!, parent, chartThemeData);
_drawCrosshairTooltip(context, parent);
}
}