Skip to content

Improve auto ticks over axes with rangebreaks - #4677

Merged
archmoj merged 10 commits into
masterfrom
rangebreaks-autotick
Mar 25, 2020
Merged

Improve auto ticks over axes with rangebreaks#4677
archmoj merged 10 commits into
masterfrom
rangebreaks-autotick

Conversation

@archmoj

Copy link
Copy Markdown
Contributor

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

@plotly/plotly_js

@archmojarchmoj added this to the v1.53.0 milestone Mar 23, 2020
Comment threadsrc/plots/cartesian/axes.js Outdated
Comment threadsrc/plots/cartesian/axes.js Outdated
Comment threadsrc/plots/cartesian/axes.js Outdated
Comment threadsrc/plots/cartesian/axes.js Outdated
@alexcjohnson

Copy link
Copy Markdown
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.

@alexcjohnsonalexcjohnson left a comment

Copy link
Copy Markdown
Collaborator

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugsomething broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gridlines, ticks and ticklabels within rangebreaks

2 participants

@archmoj@alexcjohnson