PDA

View Full Version : ExtJS chart issue for DST changes



vgreddy43
30 Jan 2014, 1:58 PM
I have posted this on: http://stackoverflow.com/questions/21466905/extjs-chart-issue-for-dst
(http://stackoverflow.com/questions/21466905/extjs-chart-issue-for-dst)
I am using ExtJS charts(4.0.7) where X axis is of type 'Time' (unix epoch).
Chart breaks for 1 hour duration when time changes to DST. (I am in PST, when it changes to PDT graph hangs and browser does not respond).
Here is the data I am supplying.
See last record {"t":"1394359200", "value":"1"}] //PDT MAR-9-2014 03:00:00 AM GMT-7 this record is causing problem.




var myModelArray = [{name:'t',type:'date',dateFormat:'timestamp'},
{name:'value',type:'float'}];


var myModel = Ext.define('Test', {
extend: 'Ext.data.Model',
fields: myModelArray
});

var store = Ext.create('Ext.data.Store', {
model: myModel,
data:[
{"t":"1394355600", "value":"1"}, //PST MAR-9-2014 01:00:00 AM GMT-8 {"t":"1394355900", "value":"1"}, //PST MAR-9-2014 01:05:00 AM GMT-8
{"t":"1394356200", "value":"1"}, //PST MAR-9-2014 01:10:00 AM GMT-8
{"t":"1394356500", "value":"1"}, //PST MAR-9-2014 01:15:00 AM GMT-8
{"t":"1394356800", "value":"1"}, //PST MAR-9-2014 01:20:00 AM GMT-8
{"t":"1394357100", "value":"1"}, //PST MAR-9-2014 01:25:00 AM GMT-8
{"t":"1394357400", "value":"1"}, //PST MAR-9-2014 01:30:00 AM GMT-8
{"t":"1394357700", "value":"1"}, //PST MAR-9-2014 01:35:00 AM GMT-8
{"t":"1394358000", "value":"1"}, //PST MAR-9-2014 01:40:00 AM GMT-8
{"t":"1394358300", "value":"1"}, //PST MAR-9-2014 01:45:00 AM GMT-8
{"t":"1394358600", "value":"1"}, //PST MAR-9-2014 01:50:00 AM GMT-8
{"t":"1394358900", "value":"1"}, //PST MAR-9-2014 01:55:00 AM GMT-8
{"t":"1394359200", "value":"1"}] //PDT MAR-9-2014 03:00:00 AM GMT-7
});



Chart time axis is:

{ type: 'Time',
position: 'bottom',
fields: ['t'],
title: 'Time',
step: [Ext.Date.MINUTE, 10],
label: {
renderer: function(unixTime){
var time = Ext.Date.format(new Date(unixTime), 'H:i');
return time;
}
},
}