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!
If I understand the question correctly you can add a label to the slider thumb by setting labelsVisible to true:
<SPAN class="keyword token">const</SPAN> populationSlider <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Slider</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN> container<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"population-slider"</SPAN><SPAN class="punctuation token">,</SPAN> min<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> max<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">1000000</SPAN><SPAN class="punctuation token">,</SPAN> values<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN>selectedPopulation<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> labelsVisible<SPAN class="punctuation token">:</SPAN><SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN> steps<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">10000</SPAN><SPAN class="punctuation token">,</SPAN> snapOnClickEnabled<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">false</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Thanks Kelly! I must have overlooked the labelsVisible setting.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.