paintBar method

  1. @override
void paintBar(
  1. ChartCanvas canvas,
  2. double animationPercent,
  3. Iterable<BarTargetLineRendererElement> barElements
)

Paints a stack of bar elements on the canvas.

Implementation

@override
void paintBar(
  ChartCanvas canvas,
  double animationPercent,
  Iterable<BarTargetLineRendererElement> barElements,
) {
  for (final bar in barElements) {
    // TODO: Combine common line attributes into
    // GraphicsFactory.lineStyle or similar.
    canvas.drawLine(
      clipBounds: drawBounds,
      points: bar.points,
      stroke: bar.color,
      roundEndCaps: bar.roundEndCaps,
      strokeWidthPx: bar.strokeWidthPx,
      dashPattern: bar.dashPattern,
    );
  }
}