-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix positioning monthly tickformat when initial auto dtick is weekly #5208
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
Conversation
src/plots/cartesian/axes.js
Outdated
|
||
if(prevDtick !== ax.dtick) { | ||
// move tick0 back | ||
ax.tick0 = axes.tickIncrement(ax.tick0, prevDtick, !axrev, ax.calendar); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems problematic - if you set a specific tick0
it won't be honored? In any event I don't think we can be pushing a different value back into ax
at this point, but if tickFirst
needs a different effective start point perhaps we could make it an option to tickFirst
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Addressed in a4cb02b.
I don't really understand what's going on here, but strange things happen when I start interacting with this graph - a tiny drag and the ticks jump back to the incorrect "before" position. I think we need to resolve this at an earlier stage in the process. |
Good catch. In fact it was previous commit a4cb02b that contributed in this bug. |
@alexcjohnson please note that the Then commit 77a51d3 was enough to fixe the bug. And c42358c as well as b78a80b basically moved most of the |
Much cleaner! But there's still one issue here, because the auto Seems to me like either |
Good eye. |
…weaks on monthly dticks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃 🎯
Fixes #5207.
Demo: Before vs After
@plotly/plotly_js