antvis/G2




The issue has been closed
5.1.15: animate: type is undefined does not disable animation #6162
sspilleman posted onGitHub
Problem
Take a simple barchart
chart
.interval()
.animate({ enter: { type: undefined } }) <------------
.data(data)
.encode('x', 'genre')
.encode('y', 'sold');
It still animates. In order to prevent the animation, you also need to add "duration: 0" like so:
chart
.interval()
.animate({ enter: { type: undefined, duration: 0 } }) <------------
.data(data)
.encode('x', 'genre')
.encode('y', 'sold');
Which I believe is not correct. I suspect the animation is still enabled, just not visible any longer. It should not be anabled at all
Software macOS, Chrome