View Full Version : [FIXED-EXTJSIV-2508][4.0.2]Ext.chart.Chart: config is 'undefined'

13 Jun 2011, 7:52 PM
Ext.define('MyChart', {
extend: 'Ext.chart.Chart',

initComponent: function () {
this.store = Ext.create('Ext.data.ArrayStore', {
model: 'MyModel'


axes: [{
type: 'Numeric',
position: 'left',
fields: ['Count'],
minimum: 0,
hidden: true
}, {
type: 'Category',
position: 'bottom',
fields: ['DT'],
label: {
renderer: function (v) {
return Ext.String.ellipsis(v, 15, false);
font: '9px Arial',
rotate: {
degrees: 270
series: [{
type: 'column',
axis: 'left',
highlight: true,
style: {
fill: '#456d9f'
highlightCfg: {
fill: '#a2b5ca'
label: {
contrast: true,
display: 'insideEnd',
field: 'Count',
color: '#000',
orientation: 'vertical',
'text-anchor': 'middle'
xField: 'DT',
yField: ['Count']

Please check the chart definition above, if I called:

var chart = Ext.create('MyChart');
it gave an error saying about 'the config is undefined', if I changed the code to:

var chart = Ext.create('MyChart',{}) then it works like normal, can anyone tell it's a bug or I've missed something in the chart class definition?

Many thanks
SiteEx: www.1000kk.cn (http://www.1000kk.cn)

14 Jun 2011, 3:05 AM
Thanks for the report, this will be fixed in 4.0.4, it will explicitly check for a config before using it. For now, just be sure to pass in an empty config when creating it.

23 Sep 2011, 2:11 AM
Thanks, it's work with

var chart = Ext.create('MyChart',{})