HorizontalLine constructor
HorizontalLine({
- required double y,
- HorizontalLineLabel? label,
- Color? color,
- Gradient? gradient,
- double strokeWidth = 2,
- List<
int> ? dashArray, - Image? image,
- SizedPicture? sizedPicture,
- StrokeCap strokeCap = StrokeCap.butt,
LineChart draws horizontal lines from left to right side of the chart
in the provided y value, and color it using color
.
You can define the thickness using strokeWidth
It draws a label
over it.
You can have a dashed line by filling dashArray with dash size and space respectively.
It draws an image in left side of the chart, use sizedPicture for vectors, or image for any kind of image.
Implementation
HorizontalLine({
required this.y,
HorizontalLineLabel? label,
super.color,
super.gradient,
super.strokeWidth,
super.dashArray,
this.image,
this.sizedPicture,
this.strokeCap = StrokeCap.butt,
}) : label = label ?? HorizontalLineLabel();