Skip to content

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Nov 23, 2023

Fixes #6765.
@plotly/plotly_js

@archmoj archmoj added bug something broken status: reviewable labels Nov 23, 2023
@@ -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);
Copy link
Collaborator

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?

Copy link
Contributor Author

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

@archmoj archmoj requested a review from alexcjohnson November 24, 2023 16:47
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Looks great!

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.

'Something went wrong with axis scaling' error when using minallowed or maxallowed go outside range defaults
2 participants