fl_chart icon indicating copy to clipboard operation
fl_chart copied to clipboard

Animate Pie Chart on startup

Open sylvestrevgen opened this issue 2 years ago • 4 comments

Hello. Is PieChart can animate on startup like "clockwise" circle animation? If not, it would be great if you implement it.

sylvestrevgen avatar Nov 18 '21 12:11 sylvestrevgen

I'm really interested in this.

Has anyone managed to animate charts or got an example code using StaggeredAnimation?

KhalidWar avatar Sep 08 '22 04:09 KhalidWar

any updates?

millie-molly avatar May 04 '23 09:05 millie-molly

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,
         ),
      ],
   ),
),

mpg-kyosuke-takayama avatar Dec 08 '23 01:12 mpg-kyosuke-takayama

Related to #406

imaNNeo avatar Dec 15 '23 21:12 imaNNeo