import F2 from '@antv/f2'
, then it has included Animation
by default. But if you want a better package size optimization, you can register manually:chart.render()
chart.changeData(data)
chart.changeData(data)
chart.changeData(data)
chart.animate(false)
chart.<geomType>().animate(config)
config
: Object / false. config
's value is false, means close the animation for the geometry. config
is an object, the properties can configure include:appear
appear
is false, means close the appear animation for the geometry.enter
enter
is false, means close the enter animation for the geometry.update
update
is false, means close the update animation for the geometry.leave
leave
is false, means close the leave animation for the geometry.appear
, enter
, update
and leave
are as follows:animation
easing
delay
duration
animation
callbackeasing
linear
quadraticIn
quadraticOut
quadraticInOut
cubicIn
cubicOut
cubicInOut
elasticIn
elasticOut
elasticInOut
backIn
backOut
backInOut
bounceIn
bounceOut
bounceInOut
easing
callbackeasing
can also be a callback.delay
callbackshape.animate()
animate
for Shape instance to act the specific animation. See below for usage: