Slider labels not showing when keys are float
See original GitHub issueWhen I create my slider marks like this:
marks={ 10.0: '10.00%', 25.0: '25.00%', 50.0: '50.00%', 75.0: '75.00%', 100.0: '100.00%' }
the slider labels will not show up. I just get a slider with marks but no labels. The marks still work as expected and will filter the chart according to the keys.
Using this:
marks={ 10: '10.00%', 25: '25.00%', 50: '50.00%', 75: '75.00%', 100: '100.00%' }
results in a slider with the proper labels underneath. This slider also works as expected (because my values all have .0 as the decimal value, I suppose).
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:8
Top Results From Across the Web
Range Slider Labels Not Showing - Dash Python
I am having trouble labeling the marks on a range slider component. ... Slider labels not showing when keys are float.
Read more >Tkinter Scale slider with float values doesn't work with locale ...
Here's a slightly clunky workaround for this bug, using some ideas & code from Bryan Oakley's answer to Dynamically reformat tkinter scale ...
Read more >PROBLEM with slider with text on both ends and randomization.
questionId+"-"+i+"-label"); var txt = label.textContent; label.innerHTML += "<span style='float: right'>" ...
Read more >st.slider - Streamlit Docs
Multiple widgets of the same type may not share the same key. help (str). An optional tooltip that gets displayed next to the...
Read more >How to Use Sliders (The Java™ Tutorials > Creating a GUI ...
The example program provides labels for its slider in this way. But you are not constrained to using only these labels. Customizing Labels...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m also having this issue. When the keys are not divisible by 1, it works for the keys to be floats, but when the keys are divisible by 1, marks only appear if the keys used are ints. Because I’m dynamically generating the marks, I’m having to use:
marks={int(i) if i % 1 == 0 else i: '{}'.format(i) for i in points_to_mark}
@Arpafaucon workaround is good but seriously how is this still a bug? Just had problems with it today, this thread is 4 and a half years old