原文参考:http://www.sencha.com/forum/showthread.php?145316-how-to-add-new-series-in-line-chart
其中chartPanel为(Ext.chart.Chart)类型,下方代码为在chart中添加一条line
chartPanel.series.add({
type: 'line',
highlight: {
size: 7,
radius: 7
},
axis: 'left',
smooth: true,
xField: 'name',
yField: '2009',
markerConfig: {
type: 'circle',
radius: 3
}
});
//refresh the chart
chartPanel.refresh();