backgroundImage property
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(
series: <PieSeries<ChartData, String>>[
PieSeries<ChartData, String>(
initialSelectedDataIndexes: <int>[2,0],
selectionSettings: SelectionSettings(
selectedColor: Colors.red.withOpacity(0.8),
unselectedColor: Colors.grey.withOpacity(0.5)
),
),
],
));
}
Background image for chart.
Defaults to null
.
Widget build(BuildContext context) {
return Container(
child: SfCircularChart(
backgroundImage: const AssetImage('image.png'),
));
}
Implementation
///Background image for chart.
///
///Defaults to `null`.
///
///```dart
///Widget build(BuildContext context) {
/// return Container(
/// child: SfCircularChart(
/// backgroundImage: const AssetImage('image.png'),
/// ));
///}
///```
final ImageProvider? backgroundImage;