xAxisName property

String? xAxisName
final

Specifies the x-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>(
                   xAxisName: 'Gold'
               ),
             ],
           annotations: <CartesianChartAnnotation>[
               CartesianChartAnnotation(
                   widget: Container(
                   child: const Text('Annotation')),
                   x: 3,
                   y: 60,
                   xAxisName: 'Gold'
                ),
            ],
       )
   );
}

Implementation

final String? xAxisName;