horizontalLineAnnotation function

Widget horizontalLineAnnotation({
  1. Key? key,
  2. required dynamic scale,
  3. required dynamic value,
  4. required double width,
  5. required double height,
  6. Color color = const Color(0xFF666666),
  7. double strokeWidth = 1,
  8. List<double>? dashPattern,
  9. String? label,
  10. TextStyle? labelStyle,
})

Creates a horizontal line annotation.

Implementation

Widget horizontalLineAnnotation({
  Key? key,
  required dynamic scale,
  required dynamic value,
  required double width,
  required double height,
  Color color = const Color(0xFF666666),
  double strokeWidth = 1,
  List<double>? dashPattern,
  String? label,
  TextStyle? labelStyle,
}) {
  return LineAnnotation(
    key: key,
    scale: scale,
    value: value,
    width: width,
    height: height,
    config: LineAnnotationConfig(
      color: color,
      strokeWidth: strokeWidth,
      dashPattern: dashPattern,
      orientation: AnnotationOrientation.horizontal,
    ),
    label: label,
    labelStyle: labelStyle,
  );
}