View source: R/scatterPlotMatrix.R
changeMouseMode | R Documentation |
Three types of mouse interactions are available (tooltip
, filter
or zoom
).
changeMouseMode(id, interactionType)
id |
Output variable to read from (id which references the requested plot). |
interactionType |
Type of mouse interaction. |
No return value, called from shiny applications for side effects.
if(interactive() && require(shiny)) {
library(shiny)
library(scatterPlotMatrix)
ui <- fluidPage(
selectInput(
"mouseMode",
"Mouse Interactions:",
c("Tooltip" = "tooltip", "Filter" = "filter", "Zoom" = "zoom")
),
p("Selector controls type of mouse interactions with the scatterPlotMatrix"),
scatterPlotMatrixOutput("spMatrix")
)
server <- function(input, output, session) {
output$spMatrix <- renderScatterPlotMatrix({
scatterPlotMatrix(iris)
})
observe({
scatterPlotMatrix::changeMouseMode("spMatrix", input$mouseMode)
})
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.