Skip to content

Missing time on date time X-axis under certain conditions #3483

@sadsunshower

Description

@sadsunshower

Description

Hello :)

Under some conditions (mostly related to the width of the chart), the times on the X-axis will be off by one hour. For example, instead of being 23:00, 00:00, 01:00, 02:00 or 23:00, (date), 01:00, 02:00, the X axis labels will be 23:00, 01:00, 02:00, 03:00. The tooltips on the data points still give the correct time.

This may be related to #3466 and #1607.

Steps to Reproduce

Create a time series chart with a date time formatted X axis and a time series spanning ~ 1 day, and adjust the width until the X axis bug appears

Code sandbox with a fixed width where this bug occurs (tested in Chrome): https://codesandbox.io/s/thirsty-ives-ezmmob?file=/src/App.tsx

Expected Behavior

The X axis shows the correct time on labels

Actual Behavior

After a certain point, the X axis is off by approximately one hour

Screenshots

Screenshot of bug

Reproduction Link

https://codepen.io/sadsunshower/pen/QWxpzpd - To see the behaviour, hovering over the point marked 02:00 on the X axis will instead show 01:00 in the tooltip, which is the expected time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions