Open leeoniya opened 3 months ago
We just bumped into this exact same issue. Should the range function be called regardless of auto
or not when we're resetting the zoom with double click?
I also just ran into this issue. I'm assuming I need to "remember" my statically set range (already doing this), and reapply it on the resetting zoom event?
(followup to #914)
the problem here is a tricky, either we have to disallow y-zoom-in when the y scale range is statically defined, which would be odd / feel broken ux. or we have to return true from sc.auto() when the scale is static but we're viaAutoScaleX = true, which is weird (it means all static scales will scan the data but then pass through the ranging function which will throw the found min/max away). another reason why current
auto
needs to be split intoscan
andauto
callbacks.https://github.com/leeoniya/uPlot/blob/4b9b92788627724c13667228fab411ac9f638f4a/src/uPlot.js#L1289-L1290
https://github.com/leeoniya/uPlot/assets/43234/0fd393cf-f36a-403b-afd6-76fbdc9d609f
https://jsfiddle.net/vmy4hfq8/