coinjar / react-native-wagmi-charts

A sweet & simple chart library for React Native that will make us feel like We're All Gonna Make It.
MIT License
575 stars 114 forks source link

Animation temperamental & diagonal lines. #49

Open JordanBrannan opened 2 years ago

JordanBrannan commented 2 years ago

Hey guys, firstly I wanted to say that this library is awesome! 😁

I've been working with Rainbow's chart lib but had a bunch of issues with inaccuracies in the charts and as it doesn't look like it's being properly maintained we're looking at alternatives to switch to. I did however notice a couple of issues (React Native 0.64.2):

Issue 1 - Temperamental animation When changing the chart data sometimes the animation happens and sometimes it doesn't. I'm not sure if this is caused from lag but I've tried changing the animation timing, memoizing the component and installing a few different versions of reanimated and that doesn't seem to help unfortunately.

https://user-images.githubusercontent.com/26070218/142477576-065442bf-8c34-4807-a784-48470883158f.mov

Issue 2 - Curved diagonal lines As seen in the video above as well as this screenshot, when using data that should generate diagonal lines it seems to create a wavey effect, I assume this is something to do with how it's being interpolated. Screenshot 2021-11-18 at 18 35 48

I'll also be looking to contribute but if anyone could look into these issues that would be amazing!

JordanBrannan commented 2 years ago

Referring to issue 1: It looks like our GraphQL query was causing infinite re-rendering which explains the lag for the animation. Now I've fixed the re-rendering, the animation does work correctly.

nandorojo commented 2 years ago

If you re-render the same data with a new reference midway through an animation, it will prevent the animation since there will be no difference in the paths

honeybadger26 commented 4 months ago

Hi @JordanBrannan. Are you still getting the second issue? If so would you be able to provide some example data that reproduces the issue?