Interactive labels in ggplot

Hi! I am working on a Shiny dashboard but I have a problem...
I need to do a scatterplot with ggplot, however I need that if I click one point it shows me the label with specific information about this point. I tried including "click" on the plotOutput but it only gives me the x and y coordenates.

Is this posible to fix??

You can use plotly::ggplotly() see the examples in this page:

1 Like

Hi Andres!

At first time I thought that plotly will solve my problem, but this graph is a filter of another graph and ggplot it's the only package that allows me to do that. In other words, I have another scatterplot that changes wen I click on the first, thats why I need the labels in ggplot.

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one for a shiny app

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