PDA

View Full Version : Sencha Touch Charts integration with TabPanel error



vikramiyer
30 Nov 2012, 6:10 AM
Hi,

I am getting TypeError: 'undefined' is not a function (evaluating 'item.getDocked()') in Container.js file which is weird where I am trying to integrate a chart into a TabPanel


Below is the code



Ext.define('Namespace.view.Home', {
extend: 'Ext.TabPanel',
requires: ['Ext.TitleBar'],
xtype: 'homepage',


config: {
id: 'homePanel',
tabBarPosition: 'bottom',
setStyleHtmlContent: 'true',
items: [
{
xtype : 'item1'
},
{
xtype: 'item2'
}
]
}
}
});


Ext.define('Namespace.view.API', {
extend: 'Ext.carousel.Carousel',
requires: ['Ext.chart.series.Bar', 'Ext.chart.axis.Numeric', 'Ext.chart.axis.Category','Ext.MessageBox','Ext.chart.interactions.Reset','Ext.chart.interactions.ItemInfo','Ext.chart.Chart', 'Ext.chart.interactions.PanZoom','Ext.picker.Picker'],
xtype: 'item2',


config: {
id: 'item2',
title: 'Item2',
iconCls: 'organize',
items: [
{
xtype: 'picker',
id: 'itemPicker',
slots: [
{
xtype: 'pickerslot',
store: 'SlotStore'
},
{
xtype: 'pickerslot',
store: 'SlotStore'
}
]
},
{
xtype: 'item2panel'
}
]
}
});


Ext.define('Namespace.view.ItemView',{
extend: 'Ext.chart.series.StackedCartesian',
requires: ['Ext.chart.Chart', 'Ext.chart.interactions.PanZoom',
'Ext.chart.series.Bar', 'Ext.chart.axis.Numeric', 'Ext.chart.axis.Category','Ext.MessageBox','Ext.chart.interactions.Reset'],
xtype : 'item2panel',

config: {
items: [
{
xtype: 'chart',
store: 'ItemStore',
interactions: [
{
type: 'reset'
},
{
type: 'iteminfo'
}
],
series: [
{
type: 'bar',
xField: 'Key',
yField: ['Value'],
labelField: 'Value',


highlightCfg: {
strokeStyle: 'red'
},


style: {
stroke: 'rgb(40,40,40)',
shadowColor: 'black',
shadowOffsetX: 3,
shadowOffsetY: 3,
minGapWidth: 1,
maxBarWidth: 60
}
}
],
axes: [
{
type: 'numeric',
position: 'left',
fields: ['Value'],
grid: {
odd: {
fill: '#e8e8e8'
}
}
},
{
type: 'category',
position: 'bottom',
fields: ['Key'],
title: 'Panel'
}
]
}
]
}
});

mitchellsimoens
2 Dec 2012, 7:55 AM
If you remove some items one at a time to see which is throwing the error, which is it?