var diff = chartReal.series.length - list.length;
if(diff > 0){
for (var i = chartReal.series.length; i > diff; i--){
chartReal.series[i-1].remove(true);
}
} else if (diff < 0){
for (var i = chartReal.series.length; i < list.length; i ++){
chartReal.addSeries({});
}
}
console.log(list);
chartReal.update({
series:list
});
如果已经生成的图表的个数跟修改的个数不一致