Skip to content

[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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

[WIP] Add bounds and boundmode #3

wants to merge 6 commits into from

Conversation

MrQubo
Copy link
Owner

@MrQubo MrQubo commented Oct 31, 2019

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.

@mbkupfer
Copy link

@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!

@MrQubo MrQubo changed the title Add bounds and boundmode [WIP] Add bounds and boundmode Oct 31, 2019
@MrQubo
Copy link
Owner Author

MrQubo commented Oct 31, 2019

@mbkupfer
It's Work in Progress, not yet fully working.

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.

@MrQubo
Copy link
Owner Author

MrQubo commented Nov 4, 2019

Tested manually for normal, log, category and reversed axes with multiple traces (scatter and bar) and one plot (no subplots).

@MrQubo
Copy link
Owner Author

MrQubo commented Nov 4, 2019

Currently, when two axes are constrained then only bounds on the one being dragged will be respected.

@mbkupfer
Copy link

mbkupfer commented Nov 4, 2019

I'm not sure what do you mean by "interactive axis scaling".

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.

@mbkupfer
Copy link

mbkupfer commented Nov 4, 2019

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

@MrQubo
Copy link
Owner Author

MrQubo commented Nov 4, 2019

@mbkupfer
I see now. Sorry, but this is a different feature. plotly#1876 is a combo of multiple features and I referenced it because here I'm trying to implement one of those features.

@mbkupfer
Copy link

mbkupfer commented Nov 4, 2019

Got it. Well thanks anyways for the contribution to this issue. I wish I knew JS well enough to contribute as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants