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

Time scale - points and bars not lining up with gridlines #5918

Closed
jasperdunn opened this issue Dec 16, 2018 · 9 comments
Closed

Time scale - points and bars not lining up with gridlines #5918

jasperdunn opened this issue Dec 16, 2018 · 9 comments

Comments

@jasperdunn
Copy link

jasperdunn commented Dec 16, 2018

version 2.7.3

For quick reference
https://www.chartjs.org/samples/latest/scales/time/line.html

I have tried offset: true and offsetGridLines: true
neither help get the bars or points to line up when using time scale.

@kurkle
Copy link
Member

kurkle commented Dec 16, 2018

Have you tried offsetGridLines: false?

@jasperdunn
Copy link
Author

Yes I have, but offsetGridLines: false is the default value. Doesn't make a difference on the chart.

@simonbrunel
Copy link
Member

@jasperdunn the "quick reference" doesn't help, can you share a jsfiddle that reproduces your issue?

@jasperdunn
Copy link
Author

jasperdunn commented Dec 16, 2018

https://jsfiddle.net/wo8310qj/2/
As you can see the line chart points are slightly off center from between the gridLines, however they should actually be on the gridLines.

@simonbrunel
Copy link
Member

Seems an issue with the timezone, because if you remove the trailing 'z' (UTC), points are aligned on grid.

@jasperdunn
Copy link
Author

jasperdunn commented Dec 17, 2018

weird, so it's plotting the points by local time but displaying the UTC "original" labels and gridlines?

@simonbrunel
Copy link
Member

I think so, timezone support tracked in #5186

@kurkle
Copy link
Member

kurkle commented Nov 13, 2019

The displayed labels were fixed by #6576 (in master): https://jsfiddle.net/u4qsn20p/

image

@kurkle
Copy link
Member

kurkle commented Jan 2, 2020

Closing as resolved

@kurkle kurkle closed this as completed Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants