-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Add bounds and boundmode #3
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
base: master
Are you sure you want to change the base?
Conversation
@MrQubo, this has been referenced in an issue (plotly#1876) which I have been watching and eagerly awaiting. That said, it still sounds abstract compared to the underlying feature request. Could you clarify if this solves the interactive axis scaling? Also, I use plotly.py. will this be ported to that as well? Thanks! |
@mbkupfer I'm not sure what do you mean by "interactive axis scaling". Here I'm trying to implement only part of plotly#1876 which is bounds and boundmode attributes. Regarding porting to plotly.py, I'm not planning to. I think that plotly.py uses plotly.js under the hood so there's no need to do much except for adding new attributes. |
Also fixed keeping bounds when moving
Tested manually for normal, log, category and reversed axes with multiple traces (scatter and bar) and one plot (no subplots). |
Currently, when two axes are constrained then only bounds on the one being dragged will be respected. |
I was referring to making a range selection along the x axis and the y-axis rescaling. An important use case for this are long time-series plots which have had volatile periods. There are some workarounds, but they all require hacky javascript and don't work for all types of axis. |
Here is a community post that most accurately explains the "interactive axis scalling" https://community.plot.ly/t/autorescaling-y-axis-range-when-range-slider-used/12214/4 |
@mbkupfer |
Got it. Well thanks anyways for the contribution to this issue. I wish I knew JS well enough to contribute as well. |
Adds bounds and boundmode axis attributes as suggested in plotly#1876.
Replaced boundmode with boundon. Replaced 'soft' and 'hard' with 'autorange' and 'interaction'.
Based on https://github.com/g-i-o-/plotly.js/pull/1.