xanderdeseyn / react-native-responsive-linechart

A customizable and responsive line or area chart for react-native
https://react-native-responsive-linechart.surge.sh
MIT License
202 stars 46 forks source link

How do I animate a line chart? #134

Open apfz opened 2 years ago

apfz commented 2 years ago

After updating the state with new data I would like to animate a line chart.

I tried to do something like this:

data={
    [
      {x: new Animated.Value(0), y: 10},
      {x: new Animated.Value(3), y: 15},
      {x: new Animated.Value(6), y: 9},
    ]
  }

But x is expected to be a number. How can I accomplish this?

nick-0101 commented 2 years ago

Did you manage to find a solution? I'm having the same problem

apfz commented 2 years ago

Unfortunately not, I am still wondering how to do it

nick-0101 commented 2 years ago

I ended up moving to victory native charts. It's a much better project that was animation support and customization.