When you try to create a simple diagram, the following error appears. I am having similar problems in my application, and I am trying to narrow the problem, so I created a small shortcut, and I canβt understand for my whole life what I'm doing wrong. Can someone take a look at what I have and see if you can identify any problems?
When I run the code below, I get the following error
An indefinite matrix of values ββ(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 is 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 use Firefox, but Chrome doesn't work either), Once the page is loaded, close the example window and you can copy the paste of the above code into the firebug console. You should see that nothing is drawn and an error has occurred.