daattali / timevis

📅 Create interactive timeline visualizations in R
http://daattali.com/shiny/timevis-demo/
Other
650 stars 157 forks source link

Error using `{crosstalk}` with `timevis()` #145

Closed jack-davison closed 8 months ago

jack-davison commented 8 months ago

Good afternoon,

I'm using crosstalk 1.2.0 and timevis 2.1.0 and I can't seem to get them to talk to one another. I've tried running the example in your README but it appears to be failing with error "'data' must be a data.frame. Can you assist?

Cheers, Jack


library(timevis)
df <- data.frame(start = c(Sys.Date(), Sys.Date() - 1, Sys.Date() - 2), content = 1:3)
shared_df <- crosstalk::SharedData$new(df)
crosstalk::bscols(
    timevis(shared_df, options = list(multiselect = TRUE), showZoom = FALSE, width = "100%"),
    DT::datatable(shared_df)
)
#> Error: timevis: 'data' must be a data.frame

Created on 2023-10-11 with reprex v2.0.2

jack-davison commented 8 months ago

Never mind, I've seen this: https://github.com/daattali/timevis/issues/142