higtcharts 生成图表个数问题

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
});

 

 

如果已经生成的图表的个数跟修改的个数不一致

posted @ 2018-08-16 17:51  噼里啪啦哒哒哒  阅读(96)  评论(0编辑  收藏  举报