Warning plotly_selected event tied

I get the following warning and I cannot understand why:

Warning: The 'plotly_selected' event tied a source ID of 'subset' is not registered. In order to obtain this event data, please add `event_register(p, 'plotly_selected')` to the plot (`p`) that you wish to obtain event data from.

I am using

brushedPs <- plotly::event_data("plotly_selected", source = "subset")

which is creating the message I believe. Without the source argument, I don't get my points back.

The plot is rendered using:

plotly::renderPlotly({
...
plotly::plot_ly(data = subsetData, source = "subset") %>%
...
})

It seems to be working like that, but I am afraid I am missing something...

Any idea on how to avoid this message?

Thx,
Bernd

PS. the sources are quite large and it is quite difficult to get a reproducible example. So, I am hoping this might be already enough info :wink: Pls let me otherwise...

Are you using return() within renderPlotly()? I'm keeping track of this issue here, please comment there if you have anything else to add! https://github.com/ropensci/plotly/issues/1528

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.