Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I animate a line chart? #134

Open
apfz opened this issue Jan 3, 2022 · 4 comments
Open

How do I animate a line chart? #134

apfz opened this issue Jan 3, 2022 · 4 comments

Comments

@apfz
Copy link

apfz commented Jan 3, 2022

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?

@apfz apfz changed the title How do I animate a chart? How do I animate a line chart? Jan 3, 2022
@nick-0101
Copy link

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

@apfz
Copy link
Author

apfz commented May 8, 2022

Unfortunately not, I am still wondering how to do it

@nick-0101
Copy link

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

@jeanniton-mnr
Copy link

With so many open issues, I have decided to go with react-native-gifted-charts.
It comes with built-in animation support.
The link below has a gallery of many chart previews:
Gallery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants