verticalAlignment property

ChartAlignment verticalAlignment
final

Aligns the annotations vertically.

Alignment can be set to ChartAlignment.near, ChartAlignment.far, or ChartAlignment.center.

Defaults to ChartAlignment.center.

Also refer ChartAlignment.

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           annotations: <CartesianChartAnnotation>[
               CartesianChartAnnotation(
                   widget: Container(
                   child: const Text('Annotation')),
                   x: 3,
                   y: 60,
                   verticalAlignment: ChartAlignment.near
                )
            ],
        )
    );
}

Implementation

final ChartAlignment verticalAlignment;