ReferenceArea.horizontalBand constructor

ReferenceArea.horizontalBand({
  1. required double yMin,
  2. required double yMax,
  3. required double xStart,
  4. required double xEnd,
  5. Color color = Colors.blue,
  6. double opacity = 0.2,
  7. Color? borderColor,
  8. double borderWidth = 1,
  9. String? label,
  10. TextStyle? labelStyle,
})

Creates a horizontal band area.

Implementation

factory ReferenceArea.horizontalBand({
  required double yMin,
  required double yMax,
  required double xStart,
  required double xEnd,
  Color color = Colors.blue,
  double opacity = 0.2,
  Color? borderColor,
  double borderWidth = 1,
  String? label,
  TextStyle? labelStyle,
}) {
  return ReferenceArea(
    topLeft: Offset(xStart, yMin),
    bottomRight: Offset(xEnd, yMax),
    color: color,
    opacity: opacity,
    borderColor: borderColor,
    borderWidth: borderWidth,
    showLabel: label != null,
    label: label,
    labelStyle: labelStyle,
  );
}