In noUiSliderInput()
the numbers are shown as decimal by default like: 5.00
To change to integer like: 5
we can use the argument format
: format = list(wNumbFormat(decimals = 0, thousand = ",", prefix = "$"))
This only works partially like here:
library( shiny )
library( shinyWidgets )
ui <- fluidPage(
div(style = 'position: absolute;left: 150px; top:270px; width:950px;margin:auto',
noUiSliderInput(
inputId = "noui2", label = "Slider vertical:",
min = 0, max = 45, step = 1,
value = c(15, 20), margin = 10,
orientation = "vertical",
width = "100px", height = "300px",
format = list(wNumbFormat(decimals = 0, thousand = ",", prefix = "$"))
),
verbatimTextOutput(outputId = "res2")
)
)
server <- function(input, output, session) {
output$res2 <- renderPrint(input$noui2)
}
shinyApp(ui, server)
What is the reason for this behavior?