fl_chart
fl_chart copied to clipboard
Animate Pie Chart on startup
Hello. Is PieChart can animate on startup like "clockwise" circle animation? If not, it would be great if you implement it.
I'm really interested in this.
Has anyone managed to animate charts or got an example code using StaggeredAnimation?
any updates?
How about this?
https://github.com/imaNNeo/fl_chart/assets/130967175/6719cc10-9784-49b5-ac9d-9c3b5276018b
PieChart(
swapAnimationDuration: const Duration(milliseconds: 500),
PieChartData(
startDegreeOffset: 270,
centerSpaceRadius: 50.0.r,
sectionsSpace: 0,
sections: [
PieChartSectionData(
radius: 25.r,
showTitle: false,
value: viewModel.didAnimation ? 100 : 0.01,
color: ColorName.accent,
),
PieChartSectionData(
radius: 25.r,
showTitle: false,
value: viewModel.didAnimation ? 0.01 : 100,
color: ColorName.line,
),
],
),
),
Related to #406