yAxisName property

String? yAxisName
final

Name of the y-axis to bind the series.

Defaults to ‘’

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
            axes: <ChartAxis>[
                       NumericAxis(
                           plotOffset: 0,
                           majorGridLines: MajorGridLines(color: Colors.transparent),
                           opposedPosition: true,
                           name: 'yAxis1',
                           axisTitle: AxisTitle(
                               text: 'China - Population '))
                     ],
           series: <BubbleSeries<BubbleColors, num>>[
                  BubbleSeries<BubbleColors, num>(
                      dataSource: chartData,
                      yAxisName: 'yAxis1',
                 ),
            ],
       ));
}
final List<BubbleColors> chartData = <BubbleColors>[
   BubbleColors(92.2, 7.8, 1.347, const Color.fromRGBO(0, 0, 255, 1)),
   BubbleColors(74, 6.5, 1.241, const Color.fromRGBO(255, 0, 0, 1)),
   BubbleColors(90.4, 6.0, 0.238, const Color.fromRGBO(255, 100, 102, 1)),
   BubbleColors(99.4, 2.2, 0.197, const Color.fromRGBO(122, 100, 255, 1)),
];

Implementation

final String? yAxisName;