plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

[FEATURE]: Make auto-zoom when panning out of range optional

Open BarnT opened this issue 9 months ago • 4 comments

Description

Currently if e.g. a scatter plot chart has a range set, and the user uses the panning option over the range, the panning becomes a zooming too. This behavior could be optional, set by configuration.

Why should this feature be added?

In some charts it can be unclear what is happening when panning around the edge. Especially if the zoom level is so high that not a single datapoint is visible at the moment. In this case the panning could become an infinite task if the user is not aware of what is actually happening. Also in some cases it could be a more clear indication of the fact the there is a range set.

BarnT avatar Feb 08 '26 12:02 BarnT

I could actually see us making this behavior the ONLY thing that happens on panning beyond a constraint, which would also solve #7703

alexcjohnson avatar Feb 08 '26 18:02 alexcjohnson

Thanks for the feature request! Could you please supply a video or config that we can try locally to demonstrate the behavior that you'd like to change?

camdecoster avatar Feb 11 '26 16:02 camdecoster

Thanks for the feature request! Could you please supply a video or config that we can try locally to demonstrate the behavior that you'd like to change?

You can check the video and the jsfiddle in #7703 . Start panning farther than the range limit and the the chart will start zooming. LEt me know if this is not enough and I'll find the time to make another video

BarnT avatar Feb 11 '26 19:02 BarnT

Ha! I guess I should click some links next time. This is fine.

camdecoster avatar Feb 11 '26 19:02 camdecoster