hafen / trelliscopejs

TrelliscopeJS R Package
https://hafen.github.io/trelliscopejs
Other
263 stars 37 forks source link

Warning in facet_trelliscope() from breaking change to tidyr::nest() #83

Closed billster45 closed 5 years ago

billster45 commented 5 years ago

Hi, awesome package thanks.

Minor issue where the new breaking change to tidyr::nest() results in a warning from tidyr appearing when using facet_trelliscope()

Tidyr change to nest() ... https://github.com/tidyverse/tidyr/blob/master/NEWS.md#tidyr-100

This is the warning..

1: cols is now required. Please use cols = c(data)

Some code that created the warning..

library(tidyverse)
library(trelliscopejs)

ggplot2::txhousing %>% 
  dplyr::mutate(date = lubridate::make_date(year = year, month = month, day = 1)) %>% 
  ggplot2::ggplot() +
  ggplot2::aes(x = date,
               y = volume) +
  ggplot2::geom_line() + 
  trelliscopejs::facet_trelliscope(~city, 
                                   scales = "free",
                                   nrow = 3, 
                                   ncol = 5, 
                                   self_contained = FALSE,
                                   as_plotly = TRUE,
                                   plotly_cfg = list(displayModeBar = FALSE))
hafen commented 5 years ago

Thanks for reporting. I will look into this.

hafen commented 5 years ago

I have fixed this in the dev branch. Please feel free to test it. There are many other changes there, mostly on the JS side, under the hood, so if you do test, let me know if you notice any issues.a

billster45 commented 5 years ago

Just tested dev branch. Warning gone. All works great from playing around with all the features. Thanks