Skip to content

Time scales labels not displayed if min & max are specified unless a unit is specified #5093

Description

@gkemp94

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)

  1. Create Line Chart with time on either axis
  2. Set min & max for that axis

Demo

https://codepen.io/gkemp94/pen/rpypLR?editors=1111

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions