Respect for vico! Q:how to disable vico animation for linechart #341
-
I want to plot hundreds of chart more Efficiently,thanks bro! |
Beta Was this translation helpful? Give feedback.
Answered by
patrickmichalik
Aug 8, 2023
Replies: 1 comment 3 replies
-
Hello! Are you referring to the animation that occurs on chart creation? If so, you can turn it off by setting |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Got it, @zch1234qq. The initial animation is a special kind of difference animation. Because of this, disabling standard difference animations will also mean disabling the initial animation. To do so, you can set the
diffAnimationSpec
parameter of theChart
composable function tosnap()
or callBaseChartView#setDiffAnimationDuration
with zero as its argument. At this point, though, yourChartEntryModelProducer
won’t be doing much, so you may prefer to createChartEntryModel
instances yourself. If you’re using Jetpack Compose, you can use state to ensure that your chart is always displaying the latest data.