dataSource property

  1. @override
List<T>? dataSource

A collection of data required for rendering the series. If no data source is specified, empty chart will be rendered without series.

Defaults to null.

Widget build(BuildContext context) {
   return Container(
       child: SfPyramidChart(
           series: PyramidSeries<ChartData, String>(
               dataSource: <ChartData>[
                  ChartData('USA', 10),
                  ChartData('China', 11),
                  ChartData('Russia', 9),
                  ChartData('Germany', 10),


final List<T>? dataSource;