slideInput is not working on negative numbers.

...Hi there,

library(shiny)

ui <- fluidPage("<h1>Hello World!</h1><br>Rao Mohsin very good",
                
                
                sliderInput(inputId = "num",
                            label = "Choose a number",
                            value = -25, min = 10, max = 1000)

)
server <- function(input, output) {}
   
shinyApp(ui = ui, server = server)

The slideInput is not working on negative number. for example I want to start slide from -25. this is not working.

And I also want step size. so user can select only
5, 10, 15,20
if we set step size 5.

many thanks,
Rao

Your min value should include the value you specify, otherwise it can't be selected:

library(shiny)

ui <- fluidPage(HTML("<h1>Hello World!</h1><br>Rao Mohsin should read the output of: <b>?sliderInput</b>"),
                sliderInput(inputId = "num",
                            label = "Choose a number",
                            value = -25, min = -25, max = 1000, step = 5)
)
server <- function(input, output) {}

shinyApp(ui = ui, server = server)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.