library(echarts4r)
## Warning: le package 'echarts4r' a été compilé avec la version R 4.2.3
<- mtcars |>
mtcars2 head() |>
::rownames_to_column("model")
tibble
<- mtcars2 |>
e1 e_charts(model) |>
e_bar(
carb, universalTransition = TRUE,
animationDurationUpdate = 1000L
)
<- mtcars2 |>
e2 e_charts(model) |>
e_pie(
carb, universalTransition = TRUE,
animationDurationUpdate = 1000L
)
<- "() => {
cb let x = 0;
setInterval(() => {
x++
chart.setOption(opts[x % 2], true);
}, 3000);
}"
Goal: Learn about data visualization and familiarize yourself with some of the basic functions of the {echarts4r}.
{echarts4r} is back! And with version 4.5 the new features from version 5 of echarts.js are available now. Moreover, the morphing capabilities of echart.js have been ported to echarts4r as we will show in this post.
You can morph between plot like this:
e_morph(e1, e2, callback = cb)
## Warning in e_morph(e1, e2, callback = cb): This is experimental
Morph between graphs.