-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
RangeBar Displays Wrong Time Values on X-Axis #1607
Comments
working with UTC will solve it ! data : ... formatter: function (x)
|
@junedchhipa for him to see the progress. Yes, thank you @aswincoolsaet that is progress! I updated the code pen to have a third chart that uses the UTC formatter. Now at least the axis is agreeing with the data, but a new issue is now the axis ticks are irregular and displaying poorly (the last one is cut off). I guess that is a side product of using manual formatter? I have tried to tweak the formatter settings but can't seem to improve it. |
ah I understand. |
Can you try to use Date.UTC(2019, 2, 7, 10, 20, 0) instead of new Date( ... ) ? |
Yes, I used that function at first but found that the outcomes were equivalent in the example case I currently have in the code pen. |
&&& xaxis: { does it for me in your codepen. |
YES is see what you mean. It looks like using Date.UTC() create function and xaxis.labels.datetimeUTC : false is the secret sauce. The formatter function is not necessary and was causing those display issues. I'm still curious on what was going wrong :/ I bet it has something to do with daylight savings time conversions (since the difference was typically 1 hour). Regardless it's GREAT to have this workaround in the meantime. |
I have the same issue. It seems that it has to do with the day change in combination of non-UTC. The missing piece is the x-axis label for the new day, which might not consider timezones correctly - it is missing and so the x-axis is delayed by one element from that. Here I'm at UTC+2:00 (at summer time, Europe/Berlin). The problem occurs only when i select a start date between 22:01 and 22:59, then the x-axis item for day is missing. When starting <= 22:00 or >= 23:00 it is working fine. |
Thanks for your work on this library :) Keep up the good work!
Bug report
RangeBar Displays Wrong Time Values on X-Axis
Codepen
https://codepen.io/GariSincere/pen/ZEbMKPJ
Explanation
What is the behavior you expect?
The x-axis should line up with the tooltip and the JSON of the datapoints
What is happening instead?
The x-axis is intermittently off by 1 hour and disagrees with the tooltip (which is lining up with actual data points)
The issue seems to be related to the plot range. As you can see from the code pen, after one of the series is hidden the plot range changes, and the axis labels are then correct. Sometimes adding data points that extend the plot range will also set it back on track.
It might be related to #1601 and is distinct from #1485 since it is not reflective of timezones and is consistently off in safari vs non-safari.
Currently, I can't find any way to work around this issue :/ If manual tick options were added as suggested in #1590 I could work around this issue until it is solved.
The text was updated successfully, but these errors were encountered: