-
Notifications
You must be signed in to change notification settings - Fork 3.6k
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
bug build x axis using getTimezoneOffset #4951
Comments
What happens is that the tick for the 26th is actually placed one hour too early (24h after the last tick), so the date becomes wrong. You see that clearly from this screenshot. Also note that both the tick placement and the point placement is correct, the only problem is that we would expect the tick to be at midnight. |
Now the result is as I was expecting but trying to achieve the same result using only the
|
Good point! The current defination of |
Since it is unrelated to the axis label placement, I added an issue at #4958. |
It's still a little buggy: http://jsfiddle.net/1mtv71bx/ On the xAxis we can see 6. Nov twice: once at 00:00 and later at 23:00. All next daily higherRanks are translated by 1h to the left. |
Internal note We need a separate clause below the day/week clause, that applies to hours and less. If the minDate and max lies in different time zones, we need to compute the time using var crossingDST = getTZOffset(minDate) !== getTZOffset(max);
[...]
// if we're using global time, the interval is not fixed as it jumps
// one hour at the DST crossover
} else if (variableDayLength && (interval === timeUnits.day || interval === timeUnits.week)) {
time = makeTime(minYear, minMonth, minDateDate +
i * count * (interval === timeUnits.day ? 1 : 7));
} else if (variableDayLength && crossingDST) {
time = makeTime(minYear, minMonth, day, hour, minute, second);
} |
When building the x axis, getTimezoneOffset method is called with a strange timestamp, but when building datalabels or tooltips everything seems ok.
example for DST change in 'Europe/Lisbon':
http://jsbin.com/seralet/14/edit?js,console
problem:
x axis has day 25 twice and tooltips and datalabels show the correct datetime
The text was updated successfully, but these errors were encountered: