(Vue中)cehart在同一个dom上画图,切换时饼图有折线图的坐标系

网上都是别人转载的,下面是转载的代码,在Vue中根本不适用

var echartrunningstate = null;

if (echartrunningstate && echartrunningstate.dispose) {
echartrunningstate.dispose();
}
echartrunningstate = echarts.init(document.getElementById("main"));
echartrunningstate一直是undefined,需要将echartrunningstate放在外层才能找到
 

 

 

posted @ 2021-03-12 10:54  何以平天下  阅读(137)  评论(0编辑  收藏  举报