Skip to content

Commit eab261c

Browse files
authored
Merge pull request #593 from alyst/facet_sep_by_br
ggplotly: separate facet columns by <br>
2 parents ae6b073 + e027bf1 commit eab261c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/ggplotly.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ gg2list <- function(p, width = NULL, height = NULL, tooltip = "all", source = "A
485485
if (has_facet(p)) {
486486
col_vars <- ifelse(inherits(p$facet, "wrap"), "facets", "cols")
487487
col_txt <- paste(
488-
p$facet$labeller(lay[names(p$facet[[col_vars]])]), collapse = ", "
488+
p$facet$labeller(lay[names(p$facet[[col_vars]])]), collapse = "<br>"
489489
)
490490
if (is_blank(theme[["strip.text.x"]])) col_txt <- ""
491491
if (inherits(p$facet, "grid") && lay$ROW != 1) col_txt <- ""
@@ -500,7 +500,7 @@ gg2list <- function(p, width = NULL, height = NULL, tooltip = "all", source = "A
500500
gglayout$shapes <- c(gglayout$shapes, strip)
501501
}
502502
row_txt <- paste(
503-
p$facet$labeller(lay[names(p$facet$rows)]), collapse = ", "
503+
p$facet$labeller(lay[names(p$facet$rows)]), collapse = "<br>"
504504
)
505505
if (is_blank(theme[["strip.text.y"]])) row_txt <- ""
506506
if (inherits(p$facet, "grid") && lay$COL != nCols) row_txt <- ""

0 commit comments

Comments
 (0)