-
Is it possible to disable the animation when adding a new entry in the view system? I'm not using compose. Or would it be possible to animate my line chart from the previous y to the new entry's y, rather then animate from 0? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @bthaler1, you can disable difference animations by setting their duration to |
Beta Was this translation helpful? Give feedback.
-
Thanks @Gowsky. Regarding the second question, let me rephrase. I don't want to update a y-axis value at an existing x-axis value. I'm adding a new x-axis value. For example, say currently my max x-axis value is 10 (furthest right on the chart), and the corresponding y-axis value is 100. I then add another entry with an x-axis value of 11 and a y-axis value of 70. The chart animates the addition of the new entry from 0 to 70. What I would like to be able to do is animate from 100 to 70, if that makes sense. I am not recreating the ChartEntryModelProducer. Also I am using Vico 1. Thanks for the help! |
Beta Was this translation helpful? Give feedback.
-
Perfect, thanks. I will work on implementing this! |
Beta Was this translation helpful? Give feedback.
Hi @bthaler1, you can disable difference animations by setting their duration to
0
. In Vico 1 you can do so by callingChartView#setDiffAnimationDuration(0L)
(orComposedChartView#setDiffAnimationDuration(0L)
). In Vico 2 you can do so by callingCartesianChartView#setDiffAnimationDuration(0L)
.Regarding animating an updated y-axis value for a given x-axis value, that's the default behavior you can see in the sample app. Please make sure that you're not recreating your
ChartEntryModelProducer
,ComposedChartEntryModelProducer
(in Vico 1), orCartesianChartModelProducer
(in Vico 2) in between data updates.If it's still not working for you, please share your code with us and we'll try to hel…