Skip to content

Commit 49215db

Browse files
authored
More careful joining of group columns (#2064)
1 parent df35a7d commit 49215db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/ggplotly.R

+5
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,11 @@ gg2list <- function(p, width = NULL, height = NULL,
423423
x <- reComputeGroup(x, z)
424424
# dplyr issue??? https://github.com/tidyverse/dplyr/issues/2701
425425
attr(y$group, "n") <- NULL
426+
# https://github.com/plotly/plotly.R/issues/2013
427+
if (!identical(class(x$group), class(y$group))) {
428+
x$group <- as.character(x$group)
429+
y$group <- as.character(y$group)
430+
}
426431
suppressMessages(dplyr::left_join(x, y))
427432
}, data, nestedKeys, layers)
428433

0 commit comments

Comments
 (0)