1. Echarts case website (since https://www.makeapie.com/ is closed, I found some alternatives)
1、http://chartlib.datains.cn/echarts
2、http://ppchart.com/#/
3、https://www.makeapie.cn/echarts
4、https://www.isqqw.com/
5、https://madeapie.com/#/
2. Solve the warning:There is a chart instance already initialized on the dom.
const dom = document.getElementById('barChart') as HTMLCanvasElement
letmyChart = echarts.getInstanceByDom(dom)!
// 如果不存在,就进行初始化
if (myChart == null) {
myChart = echarts.init(dom)
}
myChart.setOption(option)