HorizontalRangeAnnotation constructor

HorizontalRangeAnnotation({
  1. required double y1,
  2. required double y2,
  3. Color? color,
  4. Gradient? gradient,
})

Annotates a horizontal region from most left to most right point of the chart, and from y1 to y2, and fills the area with color or gradient.

Implementation

HorizontalRangeAnnotation({
  required this.y1,
  required this.y2,
  Color? color,
  this.gradient,
}) : color = color ??
          ((color == null && gradient == null) ? Colors.white : null);