When both axes are enabled for the selectZoom, it's quite inconvenient to zoom along only one axis. Making the zoom adaptive allows only one axis to be zoomed when the selection along the other axis is below a certain threshold. As an example, see the plot "X or Y (adaptive + omni)" here https://leeoniya.github.io/uPlot/demos/zoom-variations.html.
This merge request implements an adaptive select zoom that can be configured with the options thresholdX and thresholdY. By default both thresholds are zero which recovers the regular select zoom. When both thresholds are set to a finite value, the zoom selection will ignore the axis with the smaller selection if it is below its respective threshold.
When both axes are enabled for the selectZoom, it's quite inconvenient to zoom along only one axis. Making the zoom adaptive allows only one axis to be zoomed when the selection along the other axis is below a certain threshold. As an example, see the plot "X or Y (adaptive + omni)" here https://leeoniya.github.io/uPlot/demos/zoom-variations.html.
This merge request implements an adaptive select zoom that can be configured with the options
thresholdX
andthresholdY
. By default both thresholds are zero which recovers the regular select zoom. When both thresholds are set to a finite value, the zoom selection will ignore the axis with the smaller selection if it is below its respective threshold.