Skip to content

Commit 19141eb

Browse files
committed
Merge branch 'master' of github.com:ropensci/plotly
2 parents b5094c5 + 85128db commit 19141eb

File tree

1 file changed

+2
-2
lines changed
  • inst/examples/plotlyLinkedClick

1 file changed

+2
-2
lines changed

inst/examples/plotlyLinkedClick/app.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ui <- fluidPage(
1919
server <- function(input, output, session) {
2020
output$heat <- renderPlotly({
2121
plot_ly(x = nms, y = nms, z = correlation,
22-
key = correlation, type = "heatmap") %>%
22+
key = correlation, type = "heatmap", source = "heatplot") %>%
2323
layout(xaxis = list(title = ""),
2424
yaxis = list(title = ""))
2525
})
@@ -35,7 +35,7 @@ server <- function(input, output, session) {
3535
})
3636

3737
output$scatterplot <- renderPlotly({
38-
s <- event_data("plotly_click")
38+
s <- event_data("plotly_click", source = "heatplot")
3939
if (length(s)) {
4040
vars <- c(s[["x"]], s[["y"]])
4141
d <- setNames(mtcars[vars], c("x", "y"))

0 commit comments

Comments
 (0)