Allow fixedrange axes to scaleanchor with constrain:domain
#3460
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Compare
where the first one has
fixedrange:true
on both x and y axes, and the second does not. This was first reported in https://community.plot.ly/t/axis-constraints-without-zoom-use-scaleanchor-with-fixedrange/18354Now, the scaleanchor logic is skipped for
fixedrange:true
. This makes sense when constraining by range (from #1522), but does it also make sense when constraining by domain (from #1767)?Commit dee136d was added in the first scaleanchor PR #1522, to:
plotly.js/src/plots/cartesian/constraint_defaults.js
Lines 58 to 61 in e4e1149
I can't imagine a scenario where
constrain:'domain'
would lead to an infinite loop.@alexcjohnson @plotly/plotly_js can you think any?