easy way of tying minallowed/maxallowed to the computed range
Out of curiosity: is there an easy way of tying minallowed/maxallowed to the computed range? Basically to let Plotly.js compute the autorange and set min/max allowed to that automatically, thereby implementing "zoom in but not out" without having to separately compute ranges outside of Plotly.js?
Originally posted by @nicolaskruchten in https://github.com/plotly/plotly.js/issues/887#issuecomment-1802654077
What is the status of this one? I am able to limit zoom/pan only by minallowed, maxallowed is not working.
“maxallowed is not working” would be a separate bug, are you able to reproduce this in a codepen? Thanks!
@alexcjohnson actually it's not working in the official example https://plotly.com/python/axes/#setting-a-maximum-and-minimum-allowed-axis-value, change mode to pan and move to the right. I will try to create codepen later
@sirpeas that example looks to me like it's behaving correctly: there's only a minallowed on the x axis (so you can pan as far to the right as you want, but you're limited on the left) and only a maxallowed on the y axis (so you can pan as far down as you want but not up).
Ok I figured it out https://codesandbox.io/p/sandbox/plotly-forked-d7my6
For others who will have the same issue, for category charts maxallowed and mixallowed are related to index from the feed array.
Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson