yAxisName property

String? yAxisName
final

Specifies the y-axis name to the annotation that should be bound.

Defaults to ‘’.

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           series: <CartesianSeries<SalesData, num>>[
               LineSeries<SalesData, num>(
                   yAxisName: 'Gold'
               ),
             ],
           annotations: <CartesianChartAnnotation>[
               CartesianChartAnnotation(
                   widget: Container(
                   child: const Text('Annotation')),
                   x: 3,
                   y: 60,
                   yAxisName: 'Gold'
             ),
       )
   );
}

Implementation

final String? yAxisName;