Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Add trace without rendering the whole plot

Hi, I have a coupe of plots with thousands of points (with the same data but from different perspectives). I would like to show on other plots (on additional trace) which point is being hovered on a “active” plot - pretty easy in Shiny with events (event_data and sources)… but it takes almost forever as it needs to re-render all the plots from scratch. Is there any solution which allows not render the main trace every time?

output$plot <- renderPlotly({
plot_ly(source = “plot”) %>%
main_trace(data) %>%
dynamic_trace(data, sth)
})

Looking at above, I’d like to render main_trace once and dynamic_trace on every event.