Vertical slider has tick values the wrong way
See original GitHub issueUsing the slider vertically you have the min-Value at the bottom and the max-Value at the top, however using an axis, even a custom one, results in the lowest tickValue at the top and highest tick-Value at the bottom, thus not corresponding to the data.
For my individual project I could fix this with changing to
axisScale = scale.copy().range([sliderLength, 0]);
but maybe this can be solved more universally to make that great slider even more awesome.
Issue Analytics
- State:
- Created 9 years ago
- Comments:5
Top Results From Across the Web
Vertical slider with labels on the ticker - wpf - Stack Overflow
I tried to apply a rotation to the DrawingContext of MyTicker but that rotates the entire ticker, instead of the labels with the...
Read more >Numeric Slider and Ticks - Grasshopper 3D
I found here and here, where you talk about the tick, saying tickCount gives the number of possible values that allows the slider...
Read more >A Sliding Nightmare: Understanding the Range Input
Using other units, the actual range input expands or shrinks vertically such that the track perfectly fits inside. The computed value we get...
Read more >FLTK FLTK 2.0: fltk::Slider Class Reference
Draw tick marks. These lines cross the passed rectangle perpendicular to the slider direction. In the direction parallel to the slider direction the...
Read more >Sliders - Selection and input - Human Interface Guidelines
In a linear slider without tick marks, the thumb is round, and the portion of track between the minimum value and the thumb...
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 Free
Top 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

If condition to handle both horizontal & vertical sliders
if(orientation ==="vertical") // Copy slider scale to move from percentages to pixels axisScale = scale.ticks ? scale.copy().range([sliderLength, 0]) : scale.copy().rangePoints([0,sliderLength], 0.5); else axisScale = scale.ticks ? scale.copy().range([0, sliderLength]) : scale.copy().rangePoints([0,sliderLength], 0.5);Thank you so much Naishav