animation_config {g6R} | R Documentation |
Create Animation Configuration for G6 Graphs
Description
Configures animation settings for G6 graph elements. These settings control how graph elements animate when changes occur.
Usage
animation_config(
delay = NULL,
direction = c("forward", "alternate", "alternate-reverse", "normal", "reverse"),
duration = NULL,
easing = NULL,
fill = c("none", "auto", "backwards", "both", "forwards"),
iterations = NULL
)
Arguments
delay |
Animation delay time in milliseconds. The time to wait before the animation begins. Must be a non-negative numeric value. |
direction |
Animation playback direction. Options:
|
duration |
Animation duration in milliseconds. The length of time the animation will take to complete one cycle. Must be a non-negative numeric value. |
easing |
Animation easing function. Controls the rate of change during the animation. Common values include "linear", "ease", "ease-in", "ease-out", "ease-in-out", or cubic-bezier values. |
fill |
Fill mode after animation ends. Options:
|
iterations |
Number of times the animation should repeat. A value of
|
Details
Animation configuration allows fine-tuning the timing and behavior of animations in G6 graphs. This includes controlling the duration, delay, easing function, direction, and other aspects of how graph elements animate.
Value
A list containing animation configuration that can be passed to g6_options()
.
Examples
# Basic animation with duration
config <- animation_config(
duration = 500
)
# Complex animation configuration
config <- animation_config(
delay = 100,
duration = 800,
easing = "ease-in-out",
direction = "alternate",
fill = "forwards",
iterations = 2
)
# Infinite animation
config <- animation_config(
duration = 1000,
easing = "linear",
iterations = Inf
)