I would like to be able to use event_data() in plots that are combined and be able to process clicks on a sub plot. As I understand, combining plotly plots is solely possible with subplot. However, it seems that the source command isn't supported by subplot, which is needed to direct event_data().
source: a character string of length 1. Match the value of this string with the source argument in event_data() to retrieve the event data corresponding to a specific plot (shiny apps can have multiple plots).
e.g. this doesn't work
subplot(ggplotly(p1, source="source_rp"), p2 , nrows = 2, margin = 0.09, heights = c(0.8, 0.2))
this also doesn't work
subplot(p1, p2 , nrows = 2, margin = 0.09, heights = c(0.8, 0.2), source="source_rp")
Is there a way around this? or is this not yet implemented?
the error that I am getting is: Warning: Can only have one: source