paint method

  1. @override
void paint(
  1. ChartCanvas canvas,
  2. double animationPercent
)
override

Renders the series data on the canvas, using the data generated during the update call.

Implementation

@override
void paint(ChartCanvas canvas, double animationPercent) {
  super.paint(canvas, animationPercent);

  // Use the domain axis of the attached chart to render the separator lines
  // to keep the same overall style.
  if ((config as SymbolAnnotationRendererConfig).showSeparatorLines) {
    seriesPointMap.forEach((key, points) {
      final seriesInfo = _seriesInfo[key]!;

      final y = componentBounds.top + seriesInfo.rowStart;

      final domainAxis = _chart.domainAxis!;
      final bounds = Rectangle<int>(
        componentBounds.left,
        y.round(),
        componentBounds.width,
        0,
      );
      domainAxis.tickDrawStrategy!
          .drawAxisLine(canvas, domainAxis.axisOrientation!, bounds);
    });
  }
}