I have a plotly heatplot, which on hover triggers the plotting of another line chart. This is fairly time-intensive. This is why I would like to trigger the hover event only if the hover took longer than 2 seconds. Is there a way to do this in shiny/plotly ?
Here's the hover event:
output$distPlot <- renderPlot({
event_data <- event_data("plotly_hover", source = "heatplot")
if (length(event_data)) {
selectedDate <- event_data[["y"]]
#draw Plot
ggplot(myData[date==selectedDate], aes(y=y, x=x)) + geom_line()
}
})