knobInput(
inputId,
label,
value,
min = 0,
max = 100,
step = 1,
angleOffset = 0,
angleArc = 360,
cursor = FALSE,
thickness = NULL,
lineCap = c("default", "round"),
displayInput = TRUE,
displayPrevious = FALSE,
rotation = c("clockwise", "anticlockwise"),
fgColor = NULL,
inputColor = NULL,
bgColor = NULL,
pre = NULL,
post = NULL,
fontSize = NULL,
readOnly = FALSE,
skin = NULL,
width = NULL,
height = NULL,
immediate = TRUE
)The input slot that will be used to access the value.
Display label for the control, or NULL for no label.
Initial value.
Minimum allowed value, default to 0.
Maximum allowed value, default to 100.
Specifies the interval between each selectable value, default to 1.
Starting angle in degrees, default to 0.
Arc size in degrees, default to 360.
Display mode "cursor", don't work properly if width is not set in pixel, (TRUE or FALSE).
Gauge thickness, numeric value.
Gauge stroke endings, 'default' or 'round'.
Hide input in the middle of the knob (TRUE or FALSE).
Display the previous value with transparency (TRUE or FALSE).
Direction of progression, 'clockwise' or 'anticlockwise'.
Foreground color.
Input value (number) color.
Background color.
A prefix string to put in front of the value.
A suffix string to put after the value.
Font size, must be a valid CSS unit.
Disable knob (TRUE or FALSE).
Change Knob skin, only one option available : 'tron'.
The width and height of the input, e.g. 400px, or 100%.
A value a pixel is recommended, otherwise the knob won't be able to initialize itself in some case
(if hidden at start for example).
If TRUE (default), server-side value is updated each time value change,
if FALSE value is updated when user release the widget.
Numeric value server-side.
updateKnobInput for updating the value server-side.
if (interactive()) {
library("shiny")
library("shinyWidgets")
ui <- fluidPage(
knobInput(
inputId = "myKnob",
label = "Display previous:",
value = 50,
min = -100,
displayPrevious = TRUE,
fgColor = "#428BCA",
inputColor = "#428BCA"
),
verbatimTextOutput(outputId = "res")
)
server <- function(input, output, session) {
output$res <- renderPrint(input$myKnob)
}
shinyApp(ui = ui, server = server)
}