selectedOpacity property
Opacity of the selected series or data point.
Default to 1.0
.
late SelectionBehavior selectionBehavior;
void initState() {
selectionBehavior = SelectionBehavior(
enable: true,
selectedOpacity: 0.5
);
super.initState();
}
Widget build(BuildContext context) {
return SfCartesianChart(
series: <BarSeries<SalesData, num>>[
BarSeries<SalesData, num>(
selectionBehavior: selectionBehavior
),
],
);
}
Implementation
final double selectedOpacity;