library(knitr)
library(svglite)
local({
knit_hooks$set(plot = function(x, options) {
paste(readLines(x), collapse = '\n')
})
opts_chunk$set(
dev = "svglite",
dev.args = list(standalone = FALSE),
fig.ext = ".svg"
)
})
library(ggplot2)
ggplot(economics_long, aes(date, value01, colour = variable)) +
geom_line()
I added this CSS:
polyline {
stroke-dasharray: 50;
animation: dash 10s linear;
}
@keyframes dash {
to {
stroke-dashoffset: 2000;
}
}