y property Null safety

dynamic y
final

Specifies the y-values as pixel , point or percentage values based on the coordinateUnit.

Percentage value refers to the overall height of the chart. i.e. 100% is equal to the height of the chart.

Defaults to null

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 dynamic y;