X Tutup
The Wayback Machine - https://web.archive.org/web/20220519235039/https://github.com/plotly/plotly.js/pull/4939
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

@justin-sleep justin-sleep commented Jun 22, 2020

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

@archmoj
Copy link
Contributor

@archmoj 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?

src/plots/cartesian/axes.js Outdated Show resolved Hide resolved
@justin-sleep
Copy link
Contributor Author

@justin-sleep justin-sleep commented Jun 22, 2020

Sure, those changes have been made.

@archmoj
Copy link
Contributor

@archmoj archmoj commented Jun 22, 2020

Sure, those changes have been made.

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

@archmoj
Copy link
Contributor

@archmoj 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 archmoj commented Jun 23, 2020

We need to figure out why few tests are failing.

@archmoj
Copy link
Contributor

@archmoj 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
Contributor

@alexcjohnson alexcjohnson left a comment

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 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
Contributor

@alexcjohnson alexcjohnson left a comment

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
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
X Tutup