d3-simple-slider
d3-simple-slider copied to clipboard
Enable the difference between the current value and a specified value to be highlighted
slider.showDiff()
See details on the corresponding entry in README.md.
Thanks for the PR! I'm on holiday right now and will review next week 👍
Hi! As with the other PR I'm interested to get a feel for how common a use-case this is.
It reminds me of the originFromZero
option in Microsoft's Fluent slider component. Your PR is in some sense a more general version of that (placing the origin at an arbitrary point rather than just 0).
I can see why showing the user the distance from zero might be useful but I'd like to understand better the use-case around seeing the difference from a different point.
Thanks again!
We created this feature for a use case where the user can preview the difference between the two states of parameter settings (current vs. history). See a video preview of our paper at 4:39. Our situation is view-only. We haven't tested dragging on the slider while the preview is shown.
I could imagine it could be used in the situation that the focus of the adjustment is a deviation from a baseline value. (Instead of adjusting the value itself.) For example, in statistics software, when the focus is on adjusting "mean difference" between two datasets.