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
});
如果已经生成的图表的个数跟修改的个数不一致
原文地址:https://www.cnblogs.com/930115586qq/p/9488818.html
时间: 2024-11-29 09:46:10