Shiny Slider Customized Values

前端 未结 4 1705
一向
一向 2020-12-19 12:53

I am trying to set custom values for shiny slider (1,5,10,15,20,25 and 30). I tried step but then the results either (0,5,10,15,20,25,30) or (1,6,11,16,21,26,31

4条回答
  •  别那么骄傲
    2020-12-19 13:43

    The shinyWidgets package now solves this for you with a slider that allows custom values. Updated code for your third slider would look like this:

    shinyWidgets::sliderTextInput(inputId = "decade", 
      label = "Time (decade):", 
      choices = c(1,5,10,15,20,25,30))
    

提交回复
热议问题