JohnCoene / echarts4r

🐳 ECharts 5 for R
http://echarts4r.john-coene.com/
Other
585 stars 82 forks source link

POSIXct does not work with echarts4r #550

Closed NilsToft closed 1 year ago

NilsToft commented 1 year ago

After upgrading to latest Version of R (4.3.0) and echarts4r (0.4.4) POSIXct formatted time does not work:

library(tidyverse) library(echarts4r) td <- tibble(time=seq(from=as.POSIXct("2023-06-01 00:00:00"),by="day",length.out=24),val=runif(24),day=as.Date(time))

This produce a plot as expected: td |> e_chart(x=day) |> e_line(val)

This does not work: td |> e_chart(x=time) |> e_line(val)

It gives the Error message: Error in cl == "character" || cl == "factor" : 'length = 2' in coercion to 'logical(1)'

JohnCoene commented 1 year ago

You need the latest GitHub version. It will be on CRAN soon

munoztd0 commented 1 year ago

closed with #548 , new version on CRAN