我想动态创建散点图并通过从商店中获取数据来加载系列。有什么方法可以做到吗?我做了以下事情:
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();
我无法看到带有动态添加的图表的图表。
任何帮助将不胜感激!
谢谢!