1
我想動態創建散點圖並通過從商店獲取數據加載系列。有沒有辦法做到這一點?我做了以下操作:Sencha觸摸圖表2:從商店動態創建圖表和加載系列?
var myChart = Ext.create('Ext.chart.Chart',{
id:'myChart',
renderTo:'myPanel',
axes:[], // blank because i need to add axes from store
series:[] // blank because i need to add series from store
:
:
});
for(conditions){
myChart.config.axes[0].fields.push(record[cnt].data.fieldName);
var series = {
type:'scatter',
axis:['right', 'bottom'],
xField:'myXfield',
yField:record[cnt].data.yfieldVal
}
myChart.config.series.push(series);
}//for loop ends
myChart.redraw();
Iam無法看到具有動態添加圖的圖表。
任何幫助將appriciated!
謝謝!