fix: improve the logic of ticks for datetime x-axis#386
fix: improve the logic of ticks for datetime x-axis#386
Conversation
|
Preview is ready. |
|
Visual Tests Report is ready. |
...shots__/zoom.visual.test.tsx-snapshots/Zoom-Type-xy-Datetime-x-linear-y-2-chromium-linux.png
Show resolved
Hide resolved
korvin89
left a comment
There was a problem hiding this comment.
I would probably change the name of the PR to something like "fix: improve the logic of counting the number of ticks for datetime x-axis"
| } | ||
|
|
||
| const estimatedLabelWidth = | ||
| labelCharCount * fontHeight * AVG_CHAR_WIDTH_RATIO + padding * 2; |
There was a problem hiding this comment.
Can we use this logic for html labels as well?
There was a problem hiding this comment.
Thanks for mentioning that. I didn't know about them...
I could revert the logic to only look at pixelInterval as it was originally
Or, if html labels are used, the user can add a pixelInterval with the maximum possible width if something doesn't fit (nothing changes here)
What would be better?
There was a problem hiding this comment.
I think we can get the maximum possible width of label (we calculate it before scales handling)
No description provided.