-
Notifications
You must be signed in to change notification settings - Fork 592
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: avoid repetitive labels for integer/year/yearmonth axes #8868
Conversation
eb9c73f
to
1fdae12
Compare
ce7682d
to
28ebcb0
Compare
return minOfDefaultTickCountAndSpan(scaleName, defaultSignal, val => `year(${val})`); | ||
} else if (unit === 'yearmonth') { | ||
return minOfDefaultTickCountAndSpan(scaleName, defaultSignal, val => `(year(${val}) * 12 + month(${val}))`); | ||
} |
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.
nit: Since we are doing this for month
, why not also do it for quarter
?
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.
LGTM. Two nit comments
- About
quarter
- The new behavior seems not captured in any of the test PNGs
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 feels complicated. We should instead use tickMinStep as suggested in vega/vega#1503. Ideally this was fixed at the Vega level.
I'll look a bit but if it's too complicated, I don't think we should block this PR on that. |
Replaced with #8872 |
Fixes #8867
avoid repetitive labels for integer/year/yearmonth axes