Results 1 to 2 of 2

Thread: Sencha Touch Charts integration with TabPanel error

  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    57
    Vote Rating
    0
      0  

    Default Sencha Touch Charts integration with TabPanel error

    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

    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'
                        }
                    ]
                }
            ]
        }
     });

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Vote Rating
    1297
      0  

    Default

    If you remove some items one at a time to see which is throwing the error, which is it?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •