Vertical time scale generates too few ticks#6258
Conversation
benmccann
left a comment
There was a problem hiding this comment.
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