You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encountered what I believe to be a bug/issue during my most recent project. Let me know if you have any questions about it.
Expected Behavior
When creating a chart with a min & max time specified but without setting unit, the unit should be inferred correctly in the same way as when min & max are not set.
Current Behavior
When creating a chart with a min & max time but no unit on either the x or y scale, no labels are being drawn. After looking through the code, it seems that the determineUnitForAutoTicks is returning an unreasonably large Unit "Month" in my case rather than something reasonable for my use case such as day.
@gkemp94 sorry read your question wrong.
The cause for the month unit selection in determineUnitForAutoTicks is the result of getLabelCapacity, which uses the milliseconds format to compute the capacity.
As a workaround you could add the option displayFormats: {millisecond: 'YYYY'} to increase the computed capacity.
benmccann
changed the title
When setting min & max for time scales labels will not display correctly until a unit is specified
Time scales labels not displayed if min & max are specified unless a unit is specified
Aug 13, 2018
Encountered what I believe to be a bug/issue during my most recent project. Let me know if you have any questions about it.
Expected Behavior
When creating a chart with a min & max time specified but without setting unit, the unit should be inferred correctly in the same way as when min & max are not set.
Current Behavior
When creating a chart with a min & max time but no unit on either the x or y scale, no labels are being drawn. After looking through the code, it seems that the
determineUnitForAutoTicks
is returning an unreasonably large Unit "Month" in my case rather than something reasonable for my use case such as day.Steps to Reproduce (for bugs)
Demo
https://codepen.io/gkemp94/pen/rpypLR?editors=1111
The text was updated successfully, but these errors were encountered: