I'm getting the following error when trying to create a simple chart. I'm getting similar problems within my app and I have been trying to narrow down the problem so I created a small reduction and I can't for the life of me figure out what I'm doing wrong. Could somebody take a look at what I have and see if you can spot any problems?
When I run the code below, I get the following error
Unexpected value matrix(NaN,NaN,NaN,NaN,NaN,-Infinity) parsing transform attribute. (function(){var e=this,a=Object.protot...ate("Ext.XTemplate",j,g)}return j}}); ext-all.js (line 15)
Here's the code I'm running:
Ext.require('Ext.chart.*');
Ext.require(['Ext.Window', 'Ext.layout.container.Fit']);
Ext.onReady(function () {
var store = new Ext.data.ArrayStore({
fields: [
//timestamp means UNIX timestamp
{name: 'datetime', type: 'date', dateFormat: 'timestamp'},
{name: 'data', type: 'float'}
],
data: [
[1311844196,47],
[1311846214,68],
[1311848214,90]
]
});
Ext.create('Ext.Window', {
width: 800,
height: 600,
title: 'Test Chart',
renderTo: Ext.getBody(),
layout: 'fit',
items: {
xtype: 'chart',
store: store,
axes: [{
type: 'Numeric',
position: 'left',
fields: ['data']
},{
type: 'Time',
position: 'bottom',
fields: ['datetime'],
dateFormat: 'Md,H:i'
}],
series: [{
type: 'line',
axis: 'left',
xField: 'datetime',
yField: 'data',
tips: {
width: "6em",
renderer: function(storeItem, item) {
this.setTitle(storeItem.get('data') + '@' + Ext.Date.format(storeItem.get('datetime'), 'H:i'));
}
}
}]
}
}).show();
});
An easy way to reproduce the problem is to go to http://dev.sencha.com/deploy/ext-4.0.2a/examples/charts/Line.html (I'm using Firefox but Chrome doesn't work either). Once the page is loaded, close the example window and can copy paste the above code into firebug's console. You should see that nothing gets charted and an error occurs.