0

I am having the following function:

Mois <-
   "$(function() {
     setTimeout(function(){
       var vals = [0];
   vals.push(12);
   vals.push(18);
   vals.push(24);
   vals.push(36);
   vals.push(60);
   vals.push(120);
       $('#mois').data('ionRangeSlider').update({'values':vals})
     }, 5)})" 

Which I use in Shiny application to control the step of the SliderInput. That gives me:

enter image description here

How can I change the numbers. I am having months and I want to label the scale in years.

Thanks

Olivier Grégoire
  • 33,839
  • 23
  • 96
  • 137
Mily
  • 331
  • 1
  • 3
  • 18
  • Yes sorry, a JavaScript – Mily Apr 20 '17 at 09:49
  • I dont understand how it relates to shiny. Why would you need the code above when you could specify all that within `sliderInput()`? – Tonio Liebrand Apr 20 '17 at 10:12
  • Because I don't want to change the values of the sliderInput. In fact I use them in many functions after that in order to make some estimations – Mily Apr 20 '17 at 10:18
  • I think [this question](http://stackoverflow.com/questions/41891645/ionrangeslider-assign-labels-to-values) does what you are looking for. – NicE Apr 20 '17 at 13:37

0 Answers0