-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Axis boundaries #887
Comments
Yes, that would be a great addition to the library. We already partly have this concept for ternary plots using the axis So, maybe for consistency, we should add |
|
Why would we need |
Currently, with |
Oh I see. I guees a Can you think of other bounds mode besides In the case where there are only two possible modes, I'd vote for calling adding a boolean attribute e.g. |
BUMP, any chance this feature could be added? Thanks! |
PING! Would LOVE the ability to limit zoom-out and pan so the user can't move beyond available data. |
+1 |
This would be great, not being able to prevent infinite zoom/pan is a pain! |
Seriously, how is this not a feature? I'd expect something basic like limiting axis bounds to be implemented. |
I've made some work towards implementing this feature here: MrQubo#3 |
When can we expect this feature? |
Bump: This would be an extremely useful feature to have. |
We'd be happy to work with someone from the community to implement this feature, but it's not on our roadmap at this time. |
My code from Nov 4, 2019 was working for my use-case (column and sparse plots). MrQubo#3 |
This issue has been tagged with A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort. What Sponsorship includes:
Please include the link to this issue when contacting us to discuss. |
That type of feature would be really awesome! |
BUMP This feature would be super useful! |
Ah, this feature was actually released just recently as |
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? |
Oh that's an interesting idea, but no I don't believe it's possible currently. |
@nicolaskruchten Good idea. Simply tracked in #6779. Thank you! |
Is this new feature limited to Plotly express? Is it going to be merged to Plotly eventually? |
Hi, I just recently started using your plotting library (which is awesome by the way) to do some heatmap plots. One of the main complaints I've received have been the ability to pan outside the plot's boundaries (just click and drag the plot outside the viewport and suddenly the axis range point to some non-data containing area). While this can be mitigated with the
fixedrange
attribute, you end up losing the pan and zoom features for that axis.So, I was thinking that maybe adding axis boundaries could be a thing? Maybe two more properties could be added to the axes:
bounds
andboundsmode
.bounds
gets checked in the panning and zooming logic and, if set, it constrains the range to the specified bounds.boundsmode
allows the bounds to be computed automatically from the plot (likeautorange
). That way users can zoom and pan al around the plot, but cannot get outside the plot bounds.As proof of concept I have created this pull request g-i-o-/plotly.js#1 on my fork and was thinking maybe you guys could check it out comment on how to improve and, if you like it, add it or something like that.
The text was updated successfully, but these errors were encountered: