Skip to content

Commit 4889032

Browse files
committed
fix: ungroup before plot
1 parent 624bbd7 commit 4889032

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/tm_p_swimlane.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ srv_p_swimlane <- function(id,
239239
dplyr::mutate(
240240
!!as.name(color_var) := factor(!!as.name(color_var), levels = names(colors)),
241241
) %>%
242+
dplyr::group_by(!!as.name(subject_var), !!as.name(time_var)) %>%
242243
dplyr::mutate(
243244
tooltip = {
244245
default_tip <- paste(
@@ -275,6 +276,7 @@ srv_p_swimlane <- function(id,
275276
}
276277
}
277278
) %>%
279+
dplyr::ungroup() %>%
278280
plotly::plot_ly(
279281
source = "swimlane",
280282
colors = colors,

0 commit comments

Comments
 (0)