[🐛 BUG] Slider labels don't work well with negative and decimal values #2586
Labels
GUI: Front-End
🖰 GUI
Related to GUI
🆘 Help wanted
Open to participation from the community
🟧 Priority: High
Must be addressed as soon
Uh oh!
There was an error while loading. Please reload this page.
🔍 What went wrong?
When using the
slider
visual element, if I use thelabels
parameter to customize the displayed values, it works fine if I use the default step (1) as long as I use positive values. it also works well if I use steps over 1.However, if the
step
is under 1, it groups all the labels at the location of the unit part of the number (not rounded --> 0.1, 0.3, and 0.7 get grouped under 0).If the
min
value specifies a range that goes in the negatives, labels seem to do OK with bounding to the minimum value, but all other negative steps semm to not work (at all, they don't get grouped anywhere).✅ Expected Behavior
The
labels
argument should be able to place labels at negative ticks, as well as decimals.I could imagine problems if someone sets unlikely steps (imagine, 0.65987... but I tried with 1.036 and the steps work good -the labels don't).
🔄 Steps to Reproduce
This code shows several case scerios:
🖼️ Screenshots (Optional)
💻 Runtime Environment
Lubuntu 24.04
🌐 Browser (if applicable)
Brave
🖥️ Operating System
Linux
📦 Taipy Version
4.0.2 and 4.0.3
📋 Additional Context (Optional)
📜 Code of Conduct
✅ Acceptance Criteria
The text was updated successfully, but these errors were encountered: