SolutionThere is a chart instance already initialized on the dom warning

  echarts console warning does not affect use, but affects the look and feel. The clearing method is as follows:

//存在Dom节点:获取已有的echarts实例的Dom节点
var averageChart = echarts.getInstanceByDom(document.getElementById('average-chart'))
//不存在:进行初始化
if (averageChart == null) {
    averageChart = echarts.init(document.getElementById('average-chart'))
    }

Guess you like

Origin blog.csdn.net/qq_54089372/article/details/126504089