echarts通用
draw_chart(id) { let myCharts = this.$echarts.getInstanceByDom(document.getElementById(id)) if (myCharts == null) { myCharts = this.$echarts.init(document.getElementById(id)) } let charts = new Object() switch (id) { case 'anomaly_state': charts = JSON.parse(JSON.stringify(this.charts_data)) break } let option = curveOption(charts) myCharts.setOption(option, true) window.addEventListener('resize', () => { myCharts.resize() }) }