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

Fix divider placement on reversed axes #4939

Merged
merged 5 commits into from
Jun 23, 2020
Merged

Fix divider placement on reversed axes #4939

merged 5 commits into from
Jun 23, 2020

Conversation

justin-sleep
Copy link
Contributor

Fixes #4927. The divider placement algorithm now uses the correct boundary when the axis is reversed.

@archmoj archmoj added status: in progress bug something broken labels Jun 22, 2020
@archmoj
Copy link
Contributor

archmoj commented Jun 22, 2020

@justin-sleep thanks very much for the PR.
Good catch!
Could you please add a mock for image test here: https://github.com/plotly/plotly.js/tree/master/test/image/mocks?

@justin-sleep
Copy link
Contributor Author

Sure, those changes have been made.

@archmoj
Copy link
Contributor

archmoj commented Jun 22, 2020

Sure, those changes have been made.

Awesome. Let's see the test results...

@archmoj archmoj added the community community contribution label Jun 22, 2020
@archmoj
Copy link
Contributor

archmoj commented Jun 22, 2020

Would you mind replacing the new baseline with the one below which is created in a docker?
reversed-axis-dividers
Thank you!

@archmoj
Copy link
Contributor

archmoj commented Jun 23, 2020

We need to figure out why few tests are failing.

@archmoj
Copy link
Contributor

archmoj commented Jun 23, 2020

🎉 Great! LGTM.
Now that the CI as well as no_ci tests passed (on my machne), let me request a review from @alexcjohnson.

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.

This fix in getDividerVals looks great. There's similar code in getBoundaryVals, does it need similar reversed-range handling or does it already work correctly? I've lost track of the distinction between these functions.

@archmoj
Copy link
Contributor

archmoj commented Jun 23, 2020

This fix in getDividerVals looks great. There's similar code in getBoundaryVals, does it need similar reversed-range handling or does it already work correctly? I've lost track of the distinction between these functions.

It seems to me that a similar logic may be needed in getBoundaryVals.

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.

If you can find a broken case with getBoundaryVals then sure - otherwise this PR looks great - thanks @justin-sleep ! 💃

@archmoj archmoj merged commit cc2c8df into plotly:master Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken community community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multicategory axis dividers are misaligned when autorange is reversed
3 participants