-
-
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
Fix range defaults to take into account minallowed
and maxallowed
values
#6796
Conversation
src/plots/cartesian/set_convert.js
Outdated
@@ -447,6 +447,11 @@ module.exports = function setConvert(ax, fullLayout) { | |||
|
|||
if(minallowed !== undefined && rng[0] < bounds[0]) range[axrev ? 1 : 0] = minallowed; | |||
if(maxallowed !== undefined && rng[1] > bounds[1]) range[axrev ? 0 : 1] = maxallowed; | |||
|
|||
if(range[0] === range[1]) { | |||
if(minallowed !== undefined) range[axrev ? 1 : 0] = ax.l2r(minallowed + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if maxallowed-minallowed<1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call.
Addressed in aadbd54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃 Looks great!
Fixes #6765.
@plotly/plotly_js