changeMouseMode {scatterPlotMatrix} | R Documentation |
This function allows to set the type of interaction; three types of mouse interactions are available ('tooltip', 'filter' or 'zoom').
Description
This function allows to set the type of interaction; three types of mouse interactions are available ('tooltip', 'filter' or 'zoom').
Usage
changeMouseMode(id, interactionType)
Arguments
id |
Output variable to read from (id which references the requested plot). |
interactionType |
Type of mouse interaction. |
Value
No return value, called from shiny applications for side effects.
Examples
if(interactive()) {
library(shiny)
library(scatterPlotMatrix)
ui <- fluidPage(
selectInput(
"mouseMode",
"Mouse Interactions:",
c("Tooltip" = "tooltip", "Filter" = "filter", "Zoom" = "zoom")
),
p("The selector controls the 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)
}
[Package scatterPlotMatrix version 0.2.0 Index]