annotations property

List<CartesianChartAnnotation>? annotations
final

Customizes the annotations. Annotations are used to mark the specific area of interest in the plot area with texts, shapes, or images.

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

Implementation

final List<CartesianChartAnnotation>? annotations;