region property Null safety

AnnotationRegion region
final

Annotations can be placed with respect to either plotArea or chart.

Defaults to AnnotationRegion.chart

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           annotations: <CartesianChartAnnotation>[
               CartesianChartAnnotation(
                   child: Container(
                   child: const Text('Empty data')),
                   coordinateUnit: CoordinateUnit.point,
                   region: AnnotationRegion.chartArea,
                   x: 3.5,
                   y: 60
              ),
            ],
       ));
}

Implementation

final AnnotationRegion region;