| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
getLabelWidth is marked @private so I would be okay renaming it to _getLabelSize
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
Though, good point from @kurkle that the returned value isn't anymore the label width for vertical scales. Introducing _getLabelSize (private) returning {w, h} and have getLabelWidth deprecated and be return _getLabelSize().w instead seems a good alternative? |
Sorry, something went wrong.
|
I want to know how @kurkle got time travel abilities :-) |
Sorry, something went wrong.
|
Another thing noticed here is that offset is not accounted for in chartArea. Box size is calculated from chartArea in that example, that's why it looks so wrong in master. |
Sorry, something went wrong.
|
For 2.8.0 this can be worked around by setting maxRotation: 90 on vertical time scale. |
Sorry, something went wrong.
|
If we take into account offset, the code would look like this? var capacity = Math.floor(me.isHorizontal() ? me.width / size.w : me.height / size.h);
if (me.options.offset) {
capacity--;
}
return capacity > 0 ? capacity : 1; |
Sorry, something went wrong.
|
@nagix I think you are right. I'll test that when I have a chance. |
Sorry, something went wrong.
|
Made @nagix suggestion and then realized its not strictly correct either. If min/max is defined, offset is ignored at that end. Doesn't make a huge difference though. |
Sorry, something went wrong.
|
Ok, this is related to #5618. If everyone agrees that offset should work even when min or max is set, it should be fixed separately. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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