第一种方法:
let myChart = echarts.init(document.getElementById("myChart")); myChart.clear();
第二种方法:
let myChart = echarts.init(document.getElementById('main')); myChart.setOption(option,true);