makeBarRendererElement method

  1. @override
BarRendererElement<D> makeBarRendererElement({
  1. required BarRendererElement<D> details,
  2. required ImmutableAxis<D> domainAxis,
  3. required int domainWidth,
  4. required num measureOffsetValue,
  5. required ImmutableAxis<num> measureAxis,
  6. required int barGroupIndex,
  7. required int numBarGroups,
  8. Color? color,
  9. List<int>? dashPattern,
  10. D? domainValue,
  11. num? measureValue,
  12. double? measureAxisPosition,
  13. Color? fillColor,
  14. FillPatternType? fillPattern,
  15. double? strokeWidthPx,
  16. double? previousBarGroupWeight,
  17. double? barGroupWeight,
  18. List<double>? allBarGroupWeights,
  19. bool? measureIsNull,
  20. bool? measureIsNegative,
})

Generates a BarRendererElement to represent the rendering data for one bar on the chart.

Implementation

@override
BarRendererElement<D> makeBarRendererElement({
  required BarRendererElement<D> details,
  required ImmutableAxis<D> domainAxis,
  required int domainWidth,
  required num measureOffsetValue,
  required ImmutableAxis<num> measureAxis,
  required int barGroupIndex,
  required int numBarGroups,
  Color? color,
  List<int>? dashPattern,
  D? domainValue,
  num? measureValue,
  double? measureAxisPosition,
  Color? fillColor,
  FillPatternType? fillPattern,
  double? strokeWidthPx,
  double? previousBarGroupWeight,
  double? barGroupWeight,
  List<double>? allBarGroupWeights,
  bool? measureIsNull,
  bool? measureIsNegative,
}) =>
    BarRendererElement<D>()
      ..color = color
      ..dashPattern = dashPattern
      ..fillColor = fillColor
      ..fillPattern = fillPattern
      ..measureAxisPosition = measureAxisPosition
      ..roundPx = details.roundPx
      ..strokeWidthPx = strokeWidthPx
      ..measureIsNull = measureIsNull
      ..measureIsNegative = measureIsNegative
      ..bounds = _getBarBounds(
        domainValue,
        domainAxis,
        domainWidth,
        config.maxBarWidthPx,
        measureValue,
        measureOffsetValue,
        measureAxis,
        barGroupIndex,
        previousBarGroupWeight,
        barGroupWeight,
        allBarGroupWeights,
        numBarGroups,
      );