Skip to content
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

do not accept domain ranges where end is not greater than start #4304

Merged
merged 2 commits into from
Oct 25, 2019

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Oct 25, 2019

Fix #4300

Before
After

@plotly/plotly_js

@archmoj archmoj added bug something broken status: reviewable labels Oct 25, 2019
var y = coerce('domain.y', dfltY);

// don't accept bad input data
if(!(x[0] < x[1])) containerOut.domain.x = dfltX;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would dfltX.slice() here. I'm sure it ever happens for traces calling plots/domain.js, but we do mutate the domain sometimes (e.g. when applying scaleanchor constraints), so I would keep things on the safe side.

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. Done in 74773fb

@etpinard
Copy link
Contributor

Thanks very much 💃

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.

pie - problem with reversed domain ranges
2 participants