Skip to content

Commit d20c4d6

Browse files
committed
restrict tooltip in demo
1 parent ca1464b commit d20c4d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

demo/highlight-binned-target.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ subplot(p, scatterplot, shareY = TRUE) %>%
3434

3535
tx <- SharedData$new(txhousing, ~city)
3636
p1 <- ggplot(tx, aes(date, median, group = city)) + geom_line() + xlab(NULL)
37+
gg1 <- ggplotly(p1, tooltip = c("city", "date", "median"))
3738
p2 <- plot_ly(tx, x = ~median, color = I("black")) %>%
3839
add_histogram(histnorm = "probability density")
3940

40-
subplot(p1, p2, titleX = TRUE, titleY = TRUE) %>%
41+
subplot(gg1, p2, titleX = TRUE, titleY = TRUE) %>%
4142
layout(barmode = "overlay") %>%
4243
highlight(
4344
dynamic = TRUE, persistent = TRUE,

0 commit comments

Comments
 (0)