VerticalLine constructor

VerticalLine({
  1. required double x,
  2. VerticalLineLabel? label,
  3. Color? color,
  4. Gradient? gradient,
  5. double strokeWidth = 2,
  6. List<int>? dashArray,
  7. Image? image,
  8. SizedPicture? sizedPicture,
  9. StrokeCap strokeCap = StrokeCap.butt,
})

LineChart draws vertical lines from bottom to top side of the chart in the provided x 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 bottom side of the chart, use sizedPicture for vectors, or image for any kind of image.

Implementation

VerticalLine({
  required this.x,
  VerticalLineLabel? label,
  super.color,
  super.gradient,
  super.strokeWidth,
  super.dashArray,
  this.image,
  this.sizedPicture,
  this.strokeCap = StrokeCap.butt,
}) : label = label ?? VerticalLineLabel();