makeBarRendererElement method

  1. @override
BarTargetLineRendererElement makeBarRendererElement({
  1. required BarTargetLineRendererElement 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 BarTargetLineRendererElement to represent the rendering data for one bar target line on the chart.

Implementation

@override
BarTargetLineRendererElement makeBarRendererElement({
  required BarTargetLineRendererElement 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,
}) =>
    BarTargetLineRendererElement(roundEndCaps: details.roundEndCaps)
      ..color = color
      ..dashPattern = dashPattern
      ..fillColor = fillColor
      ..fillPattern = fillPattern
      ..measureAxisPosition = measureAxisPosition
      ..strokeWidthPx = strokeWidthPx
      ..measureIsNull = measureIsNull
      ..measureIsNegative = measureIsNegative
      ..points = _getTargetLinePoints(
        domainValue,
        domainAxis,
        domainWidth,
        config.maxBarWidthPx,
        measureValue,
        measureOffsetValue,
        measureAxis,
        barGroupIndex,
        previousBarGroupWeight,
        barGroupWeight,
        allBarGroupWeights,
        numBarGroups,
      );