解决echarts报There is a chart instance already initialized on the dom.错误
当echarts实例存在时,从柱状图切换到饼图或其他一些图时,会出错。
所以要先销毁这个实例
然后再重新创建
echarts.init(document.getElementById("echartsTest5")).dispose();//解决echarts dom已经加载的报错
myChart = echarts.init(document.getElementById("echartsTest5"));
直接使用mycharts.dispose()无效