Last updated
PieChart(
...
data: PieSeries(
...
interactionEvents: PieInteractionEvents(
isEnabled: true,
onTap: (result) {
...
},
onDrag: (result) {
// Update the data and call setState so that the chart
// will re-render based on new data.
setState(() {
_interactionIndex = result.sliceDataIndex;
});
}),
...
)
);