Is possible to set a chart animation?
You can use https://facebook.github.io/react-native/docs/animated.html to change values supplied to the chart
How exactly would I do that? Can you provide an example? I've tried to do it, but it seems that I can not pass animated values to datasets.
Why is this closed? there's no example in the docs that explains how to do this.
Animated doesn't return numbers that can be used in the data object supplied to charts.
How exactly would I do that? Can you provide an example? I've tried to do it, but it seems that I can not pass animated values to datasets.
@YuriRPGarcia I created an example in https://gist.github.com/MaurilioNovais/666b9e69e123107393c242136dfc62e6
Basically it is necessary to define an initial value for the Animated API and carry out the values transition in a certain time (property "duration" in the function "Animated.timing ()"). That done, just update the value of the chart variable as it is updated.
@tareqdayya You need to listen to the Animated value and update chart value.
it's not aminating the chart, just changing the data
Most helpful comment
How exactly would I do that? Can you provide an example? I've tried to do it, but it seems that I can not pass animated values to datasets.