thekeenant / fcharts

:bar_chart: Create beautiful, responsive, animated charts using a simple and intuitive API.
https://pub.dartlang.org/packages/fcharts
MIT License
326 stars 46 forks source link

Control of chart animation #27

Closed rubberbird closed 5 years ago

rubberbird commented 5 years ago

It would be great to have the ability to control the animation of the data being written to the charts. For example a line graph that would draw temperature in realtime while the use is watching it.

thekeenant commented 5 years ago

If you are using a stateful flutter widget, you should be able to maintain the data in your state and update it inside flutter's setState. The chart should animate to the new values you provide. Is this what you mean?

Nazacheres commented 3 years ago

Hello, @thekeenant, first of all, thank you for your work! Probably not what the author meant, but let me elaborate on this issue: is there a way to control animation duration? Let's say I use LineChart, and I feed new data every second. I want the animation to go slow, and smooth so it doesn't seem like it stops between states, for that I would need to control animation time.

Nazacheres commented 3 years ago

@thekeenant Just to clarify, I mean animation which happens on changing DoubleSpan.