0

I wanted to add multiple charts in the same div

Eg:

<div id="chartcontainer1">
  <div id="chart1"></div>
  <div id="grid1"></div>
</div>
<div id="chartcontainer2">
  <div id="chart2"></div>
  <div id="grid2"></div>
</div>

How can i achieve this in rally ? i tried using renderTo but no luck :(

4

1 回答 1

2

尝试这个:

items : [{
    xtype  : 'container',
    id     : 'chartcontainer1',
    layout : 'vbox'
}],

launch : function() {
    this.down('#chartcontainer1').add([{
        xtype : 'rallychart',
        id    : 'chart1'
    },{
        xtype : 'rallygrid',
        id    : 'grid1'
    }]);
}

或者,直接在初始配置中添加项目:

items : [{
    xtype  : 'container',
    id     : 'chartcontainer1',
    layout : 'vbox',
    items  : [{
        xtype : 'rallychart',
        id    : 'chart1'
    },{
        xtype : 'rallygrid',
        id    : 'grid1'
    }]
}]

您可以将“chartcontainer1”的配置设置为“hbox”以水平显示,或“vbox”以垂直显示。希望这可以帮助 :)

于 2013-10-08T19:04:45.003 回答