I have taken an example from here which shows plot brush capabilities on ggplot
with facets and changed it to see hover behavior. Any reason why hover does not work with facets?
library(shiny)
library(ggplot2)
runApp(shinyApp(
ui <- basicPage(
plotOutput("plot1", hover = "plot_hover", height = 250),
verbatimTextOutput("info")
),
server = function(input, output) {
output$plot1 <- renderPlot({
ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() +
facet_grid(. ~ cyl) +
theme_bw()
})
output$info <- renderPrint({
input$plot_hover
})
}
))