animate | R Documentation |
Animate in G2 is an important part of visualization and can improve the expressiveness of visualization.
animate(enter = NULL, update = NULL, exit = NULL)
enter |
list(type=NULL,duration=NULL,delay=NULL,easing=NULL) |
update |
list(type=NULL,duration=NULL,delay=NULL,easing=NULL) |
exit |
list(type=NULL,duration=NULL,delay=NULL,easing=NULL) |
Animate can be declared at the level of mark.
Mark specifies animation properties through mark.animate, there are three parts of animation that can be specified:
enter- New graphics
update- Updated graphics
exit- deleted graphics Each part of the animation has the following properties:
type
duration
delay
easing
animate types:
fadeIn
fadeOut
growInX
growInY
morphing
pathIn
scaleInX
scaleInY
scaleOutX
scaleOutY
waveIn
zoomIn
zoomOut
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.