onPaint method

  1. @override
void onPaint(
  1. Canvas canvas,
  2. Size size
)
override

Implementation

@override
void onPaint(Canvas canvas, Size size) {
  super.onPaint(canvas, size);
  if (xAxis!.enabled) {
    _xAxisRenderer.computeAxis(
        xAxis!.axisMinimum ?? 0, xAxis!.axisMaximum ?? 0, false);
  }

  _xAxisRenderer.renderAxisLabels(canvas);

  if (_drawWeb) renderer!.drawExtras(canvas);

  if (_yAxis!.enabled && _yAxis!.drawLimitLineBehindData) {
    _yAxisRenderer.renderLimitLines(canvas);
  }

  renderer!.drawData(canvas);

  if (valuesToHighlight()) {
    renderer!.drawHighlighted(canvas, indicesToHighlight);
  }

  if (_yAxis!.enabled && !_yAxis!.drawLimitLineBehindData) {
    _yAxisRenderer.renderLimitLines(canvas);
  }

  _yAxisRenderer.renderAxisLabels(canvas);

  renderer!.drawValues(canvas);

  legendRenderer!.renderLegend(canvas);

  drawDescription(canvas, size);

  drawMarkers(canvas);
}