-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Vertical time scale generates too few ticks #6258
Conversation
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.
getLabelWidth
is marked @private
so I would be okay renaming it to _getLabelSize
It's marked private but not since the beginning (introduced in v2.6 and made private in v2.7) so not sure it's a good idea to rename it since it doesn't add any benefit. |
Though, good point from @kurkle that the returned value isn't anymore the label width for vertical scales. Introducing |
I want to know how @kurkle got time travel abilities :-) |
Another thing noticed here is that |
For 2.8.0 this can be worked around by setting |
If we take into account var capacity = Math.floor(me.isHorizontal() ? me.width / size.w : me.height / size.h);
if (me.options.offset) {
capacity--;
}
return capacity > 0 ? capacity : 1; |
@nagix I think you are right. I'll test that when I have a chance. |
Made @nagix suggestion and then realized its not strictly correct either. If min/max is defined, |
Ok, this is related to #5618. If everyone agrees that |
Vertical time scale generates too few ticks, due to considering tick length in capacity calculation.
This might not be a correct fix however, because the function is called
getLabelWidth
.Master: Pen
PR: Pen
With offset: Pen