Labeling a Slider Thumb

223
2
Jump to solution
10-03-2019 02:12 PM
michael_vetter
Occasional Contributor

I've created a slider (not a time slider) within my application and was wondering if it was possible to label the thumb. I used this Esri sandbox example to create the slider. In the Esri example, I would want to label the thumb with the selected population number. Is this even possible?

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

If I understand the question correctly you can add a label to the slider thumb by setting labelsVisible to true: 

     const populationSlider = new Slider({
          container: "population-slider",
          min: 0,
          max: 1000000,
          values: [selectedPopulation],
          labelsVisible:true,
          steps: 10000,
          snapOnClickEnabled: false
        });

View solution in original post

2 Replies
KellyHutchins
Esri Frequent Contributor

If I understand the question correctly you can add a label to the slider thumb by setting labelsVisible to true: 

     const populationSlider = new Slider({
          container: "population-slider",
          min: 0,
          max: 1000000,
          values: [selectedPopulation],
          labelsVisible:true,
          steps: 10000,
          snapOnClickEnabled: false
        });
michael_vetter
Occasional Contributor

Thanks Kelly! I must have overlooked the labelsVisible setting.

0 Kudos