How I can customize the date format on echarts4r?

Viewed 76

Hi and thanks for reading me I am trying to make a time series chart with Echarts4r but I would like to change the customization of the axis with the dates. My current code is as follows:

library(echarts4r)
library(lubridate)
df <- data.frame(
  date = seq.Date(from = as.Date("2019-01-01"), to = as.Date("2021-05-01"),
                  by = "month"),
  val = rnorm(29, mean = 100, sd = 50)
)
df |> 
  e_charts(date) |> 
  e_line(val)

Currently the graph looks like this:

enter image description here

But I would like it to look like this:

enter image description here

Over the years located in another row. So far I have not found a way to do it, does anyone know if it is possible somehow?

Again, thanks for the help

0 Answers
Related