摘要: 很多时候需要销毁实例,再次重新创建 比如:地图动态lines线条的时候,再次去加载会留下上次线条的痕迹。加个dispose()方法 // 在创建之前销毁 echarts.init(document.getElementById(‘main’)).dispose(); // 销毁实例 var myCh 阅读全文
posted @ 2022-06-09 17:45 赵辉Coder 阅读(851) 评论(0) 推荐(0) 编辑
摘要: this.chart = echarts.init(document.getElementById('main'), null, { renderer: 'svg' }) this.chart.setOption(option) window.onresize = this.chart.resize 阅读全文
posted @ 2022-06-09 17:43 赵辉Coder 阅读(262) 评论(0) 推荐(0) 编辑