initialSelectedDataIndexes property
final
Data points or series can be selected while performing interaction on the chart. It can also be selected at the initial rendering using this property.
Defaults to []
Widget build(BuildContext context) {
return Container(
child: SfCircularChart(
initialSelectedDataIndexes: <IndexesModel>[IndexesModel(2,0)],
series: <PieSeries<ChartData, String>>[
PieSeries<ChartData, String>(
selectionSettings: SelectionSettings(
selectedColor: Colors.red.withOpacity(0.8),
unselectedColor: Colors.grey.withOpacity(0.5)
),
),
],
));
}
Implementation
final List<IndexesModel> initialSelectedDataIndexes