共计 335 个字符,预计需要花费 1 分钟才能阅读完成。
1、There is a chart instance already initialized on the dom.
解决办法:重绘图表时,我们要把之前已经渲染好的 图表清空。
const getEcharts = () => {
let myChart = echarts.getInstanceByDom(document.getElementById("chart")
);
if (myChart == null) {myChart = echarts.init(document.getElementById("chart"));
}
myChart.setOption(option);
}
原文地址: 【Echarts】报错 There is a chart instance already initialized on the dom.
正文完