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

Improve auto ticks over axes with rangebreaks #4677

Merged
merged 10 commits into from
Mar 25, 2020
Merged

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Mar 23, 2020

Follow up of #4614,
This PR improves ticks over axes with rangebreaks and fixes #4666.
Demos: Before vs After.

@plotly/plotly_js

@archmoj archmoj added bug something broken status: reviewable labels Mar 23, 2020
@archmoj archmoj added this to the v1.53.0 milestone Mar 23, 2020
@alexcjohnson
Copy link
Collaborator

@archmoj huge improvement! I'm just seeing one problem in a few of the mocks: the second line (date part) of the tick label is missing on all but the first label; it should be present whenever the date changes. Somewhere we have code that compares adjacent tick labels and removes the second line when it matches the previous tick label, that's perhaps running too early, before the ticks and their text are fully defined?

Screen Shot 2020-03-24 at 7 56 56 PM

axes_breaks-night_autorange-reversed is in this screenshot, axes_breaks-weekends-weeknights also shows this.

Interestingly, axes_breaks-weekends_autorange-reversed shows a change but I think I prefer the new behavior: the "first" tick of each new day is not the left-most or bottom-most, it's the earliest date. I could see arguments either way, but I think earliest date is better, as it labels the day (or month, or year, whatever) on the closest tick to when that period starts.

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.

Excellent. Thanks for opening #4679 to follow up on the last piece. 💃

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.

gridlines, ticks and ticklabels within rangebreaks
2 participants