dataSource property

  1. @override
List<T>? dataSource
finalinherited

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),
               ],
             )
          ],
       )
   );
}

Implementation

@override
final List<T>? dataSource;