iReport.views.WheelPanel = Ext.extend(Ext.Panel, {
  
    initComponent: function(){
            
      this.chart = new Ext.Panel({
        html: '<div style="margin:30px auto;" id="'+ this.matrix +'-stage"></div><div id="table"><table><tbody></tbody></table></div>'
      })
      
      this.chart.on('afterrender', this.loadData, this);
      this.items = [this.chart]

      iReport.views.WheelPanel.superclass.initComponent.call(this);
    },
    
    loadData: function(){
      var that = this
      that.chart.el.mask('Loading...', 'x-spinner', false);
      
      // set global
      var matrix = that.matrix
      gSelType = matrix
      
      defineHierarchies(function(){
        initWheel(matrix + "-stage");
        wheel.center.layout();
        // selectionMgr.hilite();
        // selectionMgr.displayInfo();
        that.chart.el.unmask()
        //x$("#loading").hide()
      });
      
      
    }
});

Ext.reg('wheelpanel', iReport.views.WheelPanel);

