Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 53

Thread: [OPEN-197][3.0.0][svn:5208] this.swf.setDataprovider is not a function

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #11
    Sencha User
    Join Date
    Dec 2008
    Location
    Quebec, qc
    Posts
    74

    Thumbs up

    I did include uxvismode.js after Ext JS and added this line to my graphs config
    plugins: [new Ext.ux.plugin.VisibilityMode()],

    My first tab renders with the graphs but nothing is rendered in my other tabs, not even other panels, grids,...

    Do we need to set up other options?
    Here is some code:
    var graph3 = new Ext.Panel({
    <other config>
    items:
    {
    xtype: 'columnchart',
    plugins: [new Ext.ux.plugin.VisibilityMode()],
    ...
    }

    <other config>
    });

    thanks!

  2. #12
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    You need to include the VisibilityMode plugin in the components that are actually hidden.

    In your case this would be the items (tabs) of the tabpanel and not the charts.

  3. #13
    Ext User
    Join Date
    Nov 2009
    Posts
    13

    Default

    In my case, which is working fine, I have a tab panel, which contains a chart, the plugin is associated with the chart. I also found occasional issues with using the plugin in IE, as such usually I only add the plugin for non IE browsers.


    How are you creating the tabs, I have noticed some issues with rendering (and getting blank screens) when you try and add a tab containing a chart to an empty tab panel dynamically.

    Also IIRC the plugin is capabile of working backwards up the dom finding which parts need to be hidden using the alternative hidemode if you add it to a chart component.

  4. #14
    Sencha User
    Join Date
    Dec 2008
    Location
    Quebec, qc
    Posts
    74

    Default

    I'm confused...
    100% of my users are on IE. Should I use this plugin? If not, is there a fix for this issue (graphs not refreshed within tabs) and getting the error...this.swf.setDataprovider is not a function
    Here is how I create the tabs. Should I use the plugin in tabs, sub-tabs, panels, charts...Also an image showing the tabs
    thanks for your help,
    steve

    NOTE:
    graph1, graph2, graph3, graph4 are panels containing a columnchart item
    form1 is a form.combobox

    Code:
    var V = new Ext.ux.plugin.VisibilityMode({hideMode:'nosize' }) ;
    var tabs = new Ext.TabPanel({
      plugins     : V,
            renderTo: 'divgraphcontainer',
      plain: true,
            activeTab: 0,
            frame:false,
            defaults:{autoHeight: true},
      border: false,
      animCollapse:false,
      animFloat:false,
         
            items:
      [
       {
        title: 'Graphiques',
        items:
        [
         {
                 xtype: 'tabpanel',plugins     : V,
           plain: true,
           activeTab: 0,
           deferredRender:false,
           animCollapse:false,
           animFloat:false,
           margins: '0 0 0 0',
           border: false,
           items:
           [
            {
             title: 'Prvalence',
                   items:
             [
              form1, graph4, graph1
             ]
            },
            {
             title: 'Incidence',
                   items:
             [
              graph2
             ]
            },
            {
             title: 'Incidence cumulative',
                   items:
             [
              graph3
             ]
            }
           ]
          }
         
        ]
       }
       ,
       {
        title: 'Tableaux',
        items:
        [
         gridPrevalence, gridIncidence, gridIncidenceCumul
        ]
       }
            ]
        });
    Attached Images Attached Images

  5. #15
    Ext User
    Join Date
    Nov 2009
    Posts
    13

    Default

    I believe the issue where you get an error such as this.swf.setDataprovider is not a function occurs for the reason hendricd mentioned, hence this plugin should help.

    I use the plugin in the following way as an example:

    Code:
    chart = new Ext.chart.StackedColumnChart({
        store: chart_store,
        xField: 'date',
        chartStyle: {
            yAxis: {
                titleRotation: -90
            }
        },
        extraStyle: {
            legend: {
                padding: 5,
                spacing: 5,
                font   : {
                    size: 11
                }
            }
        },
        yAxis: new Ext.chart.NumericAxis({
            stackingEnabled: true,
            title: 'Blah'
        }),
        
        // Use custom plugin to combat dom reflow issues
        plugins: [new Ext.ux.plugin.VisibilityMode()]
    });
    This chart is within a panel which is within a tabpanel when I use it.

    When do you get the error? On initial loading or switching tabs or refreshing the store etc...?

  6. #16
    Sencha User
    Join Date
    Dec 2008
    Location
    Quebec, qc
    Posts
    74

    Default

    When do you get the error? On initial loading or switching tabs or refreshing the store etc...?

    If I don't use any plugin, I get the error when refreshing the store.
    I'm trying to use the plugin, but still don't have the right formula yet. Condor says to put the plugin on the items of the tabPanel, so the Panels containing the charts. Ans you put the plugin inside the chart configuration. Still confused...

    Putting the plugin in the chart or panel's configuration gives the same results right now. All my Tabs are empty, except the default active Tab.

    The structure is
    1- A TabPanel, with 2 tabs (Graphiques and Tableaux as you can see on the image attached to my previous post)
    2- The Tab "Graphiques as one item, another tabpanel with 3 tabs. Each of these 3 tabs contains a chart within a panel.

    Still not clear to me where should I use the plugin
    thanks
    steve

  7. #17
    Ext JS Premium Member
    Join Date
    Oct 2007
    Location
    Herndon, VA
    Posts
    265

    Default

    You used the plugin in the tabPanel where as it should be in the panel that contains the chart. I use the tabPanel definition as:

    Code:
    var newTabPanel = new Ext.TabPanel({
    			activeTab: 0,
    			layoutOnTabChange: true,
    			autoDestroy: false,
    			enableTabScroll: true,
    			margins: '5 5 0 0',
    			defaults: { hideMode: !Ext.isIE && !Ext.isSafari ? 'offsets' : 'display', animCollapse: false },
    			items: [myItems]
    		})
    This seems to work for me without the plugin too. If you notice, I define defaults property which means that all the child Panels of the TabPanel will have the hideMode applied accordingly. I would suggest using that line of defaults on whatever tabPanels you create.

  8. #18
    Sencha User
    Join Date
    Dec 2008
    Location
    Quebec, qc
    Posts
    74

    Default

    Using this defaults: property in the tabPanel without using the plugin still cause this error when I refresh the store.
    "this.swf.setDataProvider is not a function"

    So I guess the plugin is required.
    Also, the issue might be...English. it's not my language and this satement is not clear to me:
    "You used the plugin in the tabPanel where as it should be in the panel that contains the chart" !!!
    Since I don't see the plugin in your tabPanel definition, I guess you suggest to use it in the Panel configuration as Condor suggested. If I do that I got empty tabs.
    If I put the plugin in the chart config as suggested in other posts, I got empty tabs.

    Still don't understand how this plugin works, sorry
    Thank you for your help,
    Steve

  9. #19
    Ext JS Premium Member
    Join Date
    Oct 2007
    Location
    Herndon, VA
    Posts
    265

    Default

    Can you try:
    Code:
    var tabs = new Ext.TabPanel({
    	defaults: { hideMode: !Ext.isIE && !Ext.isSafari ? 'offsets' : 'display', animCollapse: false },
    	renderTo: 'divgraphcontainer',
    	plain: true,
    	activeTab: 0,
    	frame: false,
    	items:
    	[
    		{
    			title: 'Graphiques',
    			xtype: 'tabpanel',
    			defaults: { hideMode: !Ext.isIE && !Ext.isSafari ? 'offsets' : 'display', animCollapse: false },
    			plain: true,
    			activeTab: 0,
    			deferredRender: false,
    			margins: '0 0 0 0',
    			items: [
    				{ title: 'Prvalence', items: [form1, graph4, graph1] },
    				{ title: 'Incidence', items: [graph2] },
    				{ title: 'Incidence cumulative', items: [graph3] }
    			]
    		}, {
       			title: 'Tableaux',
       			items: [gridPrevalence, gridIncidence, gridIncidenceCumul]
    		}
    	]
    });

  10. #20
    Sencha User
    Join Date
    Dec 2008
    Location
    Quebec, qc
    Posts
    74

    Default

    much simpler...
    Still got the error though when I refresh my store.

    Steve

Page 2 of 6 FirstFirst 1234 ... LastLast

Posting Permissions

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