selectionBehavior property
Customizes the data points or series on selection.
Widget build(BuildContext context) {
return Container(
child: SfCartesianChart(
series: <BarSeries<SalesData, num>>[
BarSeries<SalesData, num>(
selectionBehavior: SelectionBehavior(
selectedColor: Colors.red,
unselectedColor: Colors.grey,
selectedOpacity : 0.8,
unselectedOpacity: 0.4
),
),
],
));
}
Implementation
@override
final SelectionBehavior selectionBehavior;