FormidableLabs / victory-native-xl

A charting library for React Native with a focus on performance and customization.
https://commerce.nearform.com/open-source/victory-native
571 stars 35 forks source link

Add more precisions on animations in the documentation #217

Closed ivan-robert closed 4 months ago

ivan-robert commented 4 months ago

Description

I am currently trying to make an animated bar chart. It should be dead simple, but it is almost impossible due to total absence of documentation.

Following doc, the "animate" prop should do everything for me and animate on data change. However what does data change mean ? My data comes from the backend, it is not supposed to change. If I change it via a state, it triggers a re-render hence nothing is animated. Victory takes care of all the conversion with "points" prop, so I tried linking every point to a sharedValue, useless the only value taken by the points are the first value of the shared value.

I think there is a whole section lacking on how to reproduce simple examples such as the moving bar chart used to "demonstrate performance". Because it is nott normal that while having used victory before, it is still impossible to do a simple animation with victory xl

Proposal

Could you explain me please how I can animate my barchart ? I am struggling. The best would be to add some more code in the documentation

zibs commented 4 months ago

Hey @ivan-robert -- have you taken a look at the example app inside the repo? There are plenty of example animations in there. We could maybe draw more attention to that in the docs? Feel free to make a PR if you find anything helpful!