After access to the data highlighted by default does not work echarts

After access to the data highlighted by default does not work echarts

// 数据更新 -> 图表重新渲染 -> 默认高亮
      // 重新渲染需要时间
      this.$nextTick(() => { const chart = this.$refs["chartContainer"].chart; if (chart) { chart.dispatchAction({ type: "highlight", seriesIndex: 0, dataIndex: 0 }); } }); 

Here the most important thing is to increase this. $ NextTick, because it takes time to load data, the icon will take time to re-render.

Guess you like

Origin www.cnblogs.com/sinceForever/p/12146222.html