decorate method

  1. @override
void decorate(
  1. Iterable<ImmutableBarRendererElement<D>> barElements,
  2. ChartCanvas canvas,
  3. GraphicsFactory graphicsFactory, {
  4. required Rectangle<int> drawBounds,
  5. required double animationPercent,
  6. required bool renderingVertically,
  7. bool rtl = false,
})

Implementation

@override
void decorate(Iterable<ImmutableBarRendererElement<D>> barElements,
    ChartCanvas canvas, GraphicsFactory graphicsFactory,
    {required Rectangle<int> drawBounds,
    required double animationPercent,
    required bool renderingVertically,
    bool rtl = false}) {
  // Only decorate the bars when animation is at 100%.
  if (animationPercent != 1.0) {
    return;
  }

  if (renderingVertically) {
    _decorateVerticalBars(
        barElements, canvas, graphicsFactory, drawBounds, rtl);
  } else {
    _decorateHorizontalBars(
        barElements, canvas, graphicsFactory, drawBounds, rtl);
  }
}