dataSource property
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: SfCircularChart(
series: <PieSeries<ChartData, String>>[
PieSeries<ChartData, String>(
dataSource: <ChartData>[
ChartData('USA', 10),
ChartData('China', 11),
ChartData('Russia', 9),
ChartData('Germany', 10),
],
),
],
)
);
}
Implementation
@override
final List<T>? dataSource;