makeBarRendererElement method

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