Description Usage Arguments Value
View source: R/bar_chart_race.R
Create a bar chart race animation.
1 2 3 4 5 6 7 8 9 10 11 12 13 | bar_chart_race(
df,
cat_col,
val_col,
time_col,
max_bars = 10,
duration = 20,
fps = 10,
width = 1200,
height = 900,
title = "",
renderer = gganimate::gifski_renderer()
)
|
df |
A dataframe containing the data. |
cat_col |
The column containing the categories (for bars). |
val_col |
The column containing the values (for bar heights). |
time_col |
The column containing the time. |
max_bars |
The maximum number of bars to show (defaults to 10). |
duration |
The duration of the animation in seconds (defaults to 20). |
fps |
The smoothness of the animation in frames per second (defaults to 10). |
width |
The width of the animation in pixels (defaults to 1200). |
height |
The height of the animation in pixels (defaults to 900). |
title |
The title of the animation (defaults to blank). |
renderer |
The renderer to use (defaults to gifski_renderer()). |
A bar chart race animation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.