question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vertical slider has tick values the wrong way

See original GitHub issue

Using 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:open
  • Created 9 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Naishavcommented, Jan 10, 2017

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);

0reactions
CrystalSNScommented, Jan 15, 2017

Thank you so much Naishav

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found