Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datetime line brush displays wrong 1:00AM instead of midnight #1453

Closed
fracz opened this issue Mar 31, 2020 · 5 comments
Closed

Datetime line brush displays wrong 1:00AM instead of midnight #1453

fracz opened this issue Mar 31, 2020 · 5 comments
Labels
bug Something isn't working verified

Comments

@fracz
Copy link
Contributor

fracz commented Mar 31, 2020

Bug report

Codepen

I have modified the brush chart codepen. The only things I changed are: the interval of the datapoints (from 86400 to 600), the start date is set to 2020-03-31T22:00:00+02:00, and the tooltip format has ben changed to display hours instead of dates.

https://codepen.io/fracz/pen/jOPJLoO

Explanation

When you open the codepen, the midnight date is displayed correctly as a 1 Apr.

image

Then, if you move the brush selection slightly to the right the midnight label is being set to 1:00.

image

If you keep moving the selection and pass the next hour, the label is getting back to 0:00 (but not 1 Apr) in the codepen:

image

The tooltip always shows the correct data even when the x-label are messed up.

image

Not a big deal, hovever in my application the labels are not fixed when moving right, so all of the labels are shifted by one hour, and it is much bigger problem. Could not reproduce such behavior in the codepen, though.

@junedchhipa junedchhipa added the bug Something isn't working label Mar 31, 2020
@junedchhipa
Copy link
Contributor

Yeah, I can see the bug in your modified codepen.
I will take a look soon, thanks for reporting.

@thorleifjacobsen
Copy link

Have you been able to look at this? We also experience this using only 24H time it skips 00:00 when zoomed in. :)

@villeraikko
Copy link

Any progress on this? I'm experiencing this one as well, except that in our code the bug happens everytime on a specific timeframe. Also on the initial load.

Screenshot 2021-11-17 at 21 35 29

.

@schotime
Copy link

Have you been able to look at this? We also experience this using only 24H time it skips 00:00 when zoomed in. :)

Getting this as well. Its skipping 00:00

@schotime
Copy link

schotime commented Nov 29, 2021

I thought it was just the 24H too but it happens for both. Seems to be when the range is selected between 1-2 hours before midnight then midnight seems to get dropped as show in the images below.

@junedchhipa I'm happy to try and submit a PR for this, if you can point me in the right direction for the file to look at.

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified
Projects
None yet
Development

No branches or pull requests

5 participants