Closed
Description
Using event_data("plotly_hover", source="mysource")
seems to trigger the following warning with the newest plotly version:
Warning: The 'plotly_hover' event tied a source ID of 'mysource' is not registered. In order to obtain this event data, please add event_register(p, 'plotly_hover') to the plot (p) that you wish to obtain event data from.
library(shiny)
library(plotly)
ui <- fluidPage(
plotlyOutput("myplot"),
verbatimTextOutput("hovered")
)
server <- function(input, output, session) {
output$myplot <- renderPlotly({
p <- plot_ly(faithful, x=~eruptions, y=~waiting, source="mysource")
return(p)
})
output$hovered <- renderPrint({
event_data("plotly_hover", source="mysource")
})
}
shinyApp(ui = ui, server = server)
Metadata
Metadata
Assignees
Labels
No labels