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,
) {
  barElements.forEach((_BarTargetLineRendererElement bar) {
    // 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);
  });
}