This is a migrated thread and some comments may be shown as answers.

Daylight Savings Issue

1 Answer 112 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 12 May 2014, 03:04 AM
Hi,

I have a chart that does not display as expected when the date range includes the date that daylight savings concludes.

I have a JSFiddle that demonstrates the issue:

http://jsfiddle.net/NAf4F/7/

The chart should display the data with a period of "daily". If the last set of data is uncommented to include the daylight savings finishing, then the chart generates hourly data with a series of zero values.

Is this an issue with Kendo UI charts, or is there something else that I should be doing?

Your assistance is appreciated.

Thank you

Rob.

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 12 May 2014, 08:00 AM
Hello,

The Chart has no information regarding the time zone in use and only sees the local dates provided by the browser:
Wed Mar 30 2011 11:00:00 GMT+1100 (EST)
...
Sun Apr 03 2011 10:00:00 GMT+1000 (EST)

The interval between the data points is less than a day and the chart switches to hourly resolution.
One way to get around this is to fix the chart base date unit to days:
categoryAxis: {
    baseUnit: "days"
}


An alternative would be to supply the dates as UTC:
"2011-03-29T13:00:00Z"
...
"2011-04-02T13:00:00Z"
"2011-04-03T14:00:00Z" (not included in the original data, but shown here to illustrate the DST transition)

This assumes that the target browser is in the same time zone. Additional conversion is required if it's not.

We actually include time zone information as part of the Scheduler as it is critical for the operation of the component.
We'll consider our options to make better use of it for the Chart as well.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Rob
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or