Created
June 22, 2013 00:15
-
-
Save jcheng5/5835269 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyServer(function(input, output) { | |
output$myplot <- renderPlot({ plot(cars) }) | |
output$hoverinfo <- renderTable({ | |
if (is.null(input$myplot_hover)) | |
NULL | |
else | |
data.frame(x=input$myplot_hover$x, y=input$myplot_hover$y) | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyUI(basicPage( | |
plotOutput("myplot", hoverId="myplot_hover"), | |
tableOutput("hoverinfo") | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment