Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Touch Premium Member
    Join Date
    Jan 2011
    Posts
    37
    Vote Rating
    0
    gp40 is on a distinguished road

      0  

    Default Unanswered: Chart won't render in proper panel

    Unanswered: Chart won't render in proper panel


    I'm trying to get a chart to render in a particular panel. In the example below I have a 'hbox' with two panels. Regardless of what I do the chart always seems to render in the first panel. I'm sure it has something to do with absolute vs relative positioning but I haven't had any luck thus far. Any ideas? Much thanks!!! /Greg

    Code:
    Ext.setup({    onReady: function() {
            
    	Ext.regModel('Fruit',{
    		fields: [
    			{ name: 'type', type: 'string'},
    			{ name: 'num', type: 'number'} ]
    	});
    	   
          var store2 = new Ext.data.JsonStore({
    		  model: 'Fruit',
                data: [{type: 'Apple', num: 5},
    			    {type: 'Pear', num: 2}]
          });
    
    
    
    
    	 var p = new Ext.chart.Chart ({
                   cls: 'pie1',
    			title: 'something',
    		     style: 'position:relative',
                   width: 200,
    			height : 200,
                   store: store2,
                    series: [{
                        type: 'pie',
                        field: 'num',
                        label: {
                            field: 'type'
                        }
                    }]
                });
                
    	 new Ext.Panel({
    		fullscreen: true,
    		dockedItems: [{
                dock : 'top',
                xtype: 'toolbar',
                title: 'TEST'
    		}],
    		layout: { type: 'hbox', align: 'stretch' },
    		defaults: {	flex: 1, type: 'panel'},
    		// items: [ { html: 'Left' } , { html: 'Right' } ]  // works
    		items: [ { html: 'Left' } , p ]  // works
    	 });
    	}
    })

  2. #2
    Sencha User
    Join Date
    May 2011
    Posts
    1
    Vote Rating
    0
    sla is on a distinguished road

      0  

    Question


    I have the exact same problem. Has anyone found a solution?

  3. #3
    Sencha User
    Join Date
    Oct 2008
    Posts
    36
    Vote Rating
    5
    kholy is on a distinguished road

      0  

    Default


    I also have the same issue, any update on this?

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    26
    Vote Rating
    1
    hundare is on a distinguished road

      0  

    Default


    any solution on this????

  5. #5
    Sencha User
    Join Date
    Jul 2009
    Posts
    15
    Answers
    1
    Vote Rating
    1
    shydreamz is on a distinguished road

      0  

    Default


    the solution to this is
    just remove the cls:'pie1' property from the chart declaration as this breaks the css styling of charts
    as cls config cause the predefined css class of panel to replace by pie1
    so if u want to use 'pie1' css use it in baseCls config option.

    it will work