Hi,
I am trying to create a bar chart using Ext.chart.Chart for an application I've just inherited, but I am consistently getting an error when trying to build the chart initially.
Code:
Uncaught TypeError: Cannot read property 'length' of undefined
This error specifically is thrown when I am trying to create my axes or series; if I do not define the axes or series (ie, do not draw the chart) and only bind a store, it seems to load correctly. Since not even one axis can be configured without throwing the error, I'm facing a blank in how to approach the error, especially as the trace seems to call hasLockedColumns in Ext.panel.Table, which I am not using at all.
Here is my code:
Code:
comp.add({ region: 'center',
cls:'mainbg',
xtype: 'panel',
items: [{
xtype: 'chart',
store: {
type: 'barchartstore',
autoLoad: true,
listeners: {
load: function(){
console.log("loading store");
}
}
},
axes: [{
type: 'Numeric',
fields: ['Percentage'],
position: 'left'
}
]
}]
I am receiving this error regardless of if I am building it dynamically, in its own component file, or directly in the viewport. Data in the store is automatically loaded by an proxy in JSON format, and a console.log shows it to be loaded in the store during the chart's beforerender listener.
Thanks for the help!