patrykandpatrick / vico

A light and extensible chart library for Android.
https://patrykandpatrick.com/vico/wiki
Apache License 2.0
2.15k stars 130 forks source link

Animation from Y = 0 to real value #587

Closed matpascaud closed 8 months ago

matpascaud commented 8 months ago

How to reproduce

Hi, I am using Vico 2.0.0-alpha.8 with Views. I am adding a new value to a cartesian chart and would like to avoid the animation where the added point starts from Y = 0 to the expected value. I have seen diffAnimationSpec but do not see how to use it without using Compose.

Observed behavior

Here is a video of the "bug" when slowing down the number of added points.

https://github.com/patrykandpatrick/vico/assets/534304/2edcf382-8c40-48f9-8c3d-c7f3de4b0a3a If I add points at 10Hz, points are not displayed at the correct position (Y > 30) but displayed below the threshold 20. Screenshot_20240227_173322

Expected behavior

I expect to see the point at the expected coordinate.

Vico version(s)

Latest unstable version

Android version(s)

33

Additional information

No response