How to link corresponding points across different facets of a ggplot in rshiny?


I am working on an rshiny app, and one of the plots uses facet_wrap with 2 facets. It also uses nearPoints() to show some information when the user clicks on a point, with some Javascript so it appears as a pop-up rather than below the plot. For example:

I was wondering whether it is possible to link the two facets, such that when the user clicks on a point on the left (/right) facet, the corresponding point will be highlighted on the right (/left) facet?

I haven't provided any code snippets or a reprex since this is a very general query - I am new to rshiny and am just interested in whether this is possible at all when using facet_wrap, and if so, what the appropriate function(s) are. However, if this is necessary or helpful I can post one.


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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.