updateXYpadInput {shinyXYpad} | R Documentation |
Change a XY pad input on the client
Description
Changes a XY pad input on the client.
Usage
updateXYpadInput(
session,
inputId,
label = NULL,
value = NULL,
xmin = NULL,
xmax = NULL,
ymin = NULL,
ymax = NULL,
ndecimals = NULL,
bgColor = NULL,
pointColor = NULL,
pointRadius = NULL
)
Arguments
session |
session object passed to the Shiny server function |
inputId |
id of the XY pad input |
label |
new label, or |
value |
new value, or |
xmin |
new |
xmax |
new |
ymin |
new |
ymax |
new |
ndecimals |
new |
bgColor |
new |
pointColor |
new |
pointRadius |
new |
Value
No value is returned, called for side-effect.
Examples
library(shiny)
library(shinyXYpad)
ui <- fluidPage(
fluidRow(
column(6, XYpadInput("xy", onMove = TRUE, label = "XY pad")),
column(6, verbatimTextOutput("xyvalue"))
),
br(),
actionButton("update", "Update")
)
server <- function(input, output, session){
output[["xyvalue"]] <- renderPrint({ input[["xy"]] })
observeEvent(input[["update"]], {
updateXYpadInput(session, "xy", value = list(x = 25, y = 25),
bgColor = "chartreuse", pointColor = "yellow",
pointRadius = 10, ndecimals = 3)
})
}
if(interactive()){
shinyApp(ui, server)
}
[Package shinyXYpad version 0.2.0 Index]