Skip to content

Honor fixedrange: false in y-axes anchored to xaxis with range slider #1261

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

Merged
merged 4 commits into from
Jan 17, 2017

Conversation

etpinard
Copy link
Contributor

This should make a bunch of folks on https://community.plot.ly/ happy.

Ever since #1017, there's no reason to hard set fixedrange: true for all y-axes anchored to a x-axis that has a range slider: the range plot draw step can handle y-axis interactions.

To preserve backward compatibility, we must however make sure that y axes anchored to a x-axis with a range slider default to fixedrange: true. With this PR, users can now set back layout.yaxis.fixedrange: false if they prefer having interactive y-axes along with their range slider plots.

- define scoped coerce function once for all axes
- only loop over xaxis list for rangeslider / rangeselector defaults
- replace with 'smart' defaults in cartesian layout defaults
  so that user set `fixedrange: false` will now be honored.
- this was never implemented
- it was in there *just* to make the call to axisDefaults work
- rm now useless yaxis mocks
- add better fixedrange logic test cases
@etpinard etpinard added status: reviewable bug something broken labels Dec 19, 2016
@etpinard
Copy link
Contributor Author

ping range slider author #️⃣1️⃣ @mdtusz

@etpinard etpinard added this to the v1.22.0 milestone Jan 4, 2017
counterAxes: {x: yaList, y: xaList}[axLetter].map(axisIds.name2id),
overlayableAxes: {x: xaList, y: yaList}[axLetter].filter(function(axName2) {
return axName2 !== axName && !(layoutIn[axName2] || {}).overlaying;
}).map(axisIds.name2id)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't suppose you want to use this opportunity to 🔪 these map and filter calls? And the (x|y)alist.forEach calls below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. That would be nice!

I want to clean up a few artefacts from the old axes.js module (which would help out @rreusser for carpets). Namely those annoying ._gd refs and get rid of the circular dependency between axes.js and plots.js. I'll make sure to remove those map / filter in that PR!

@alexcjohnson
Copy link
Collaborator

nonblocking comment only. 💃

@etpinard etpinard merged commit 6f00ec7 into master Jan 17, 2017
@etpinard etpinard deleted the rangeslider-no-fixedrange branch January 17, 2017 22:13
@etpinard etpinard mentioned this pull request Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants