接手项目,学习进步
[ECharts] DEPRECATED: ‘normal’ hierarchy in itemStyle has been removed since 4.0. All style properties are configured in itemStyle directly now
before
itemStyle: {
normal: {
areaColor: '#E6ECFC',
borderColor: '#fff',
borderWidth: 1
}
}
after
itemStyle: {
areaColor: '#E6ECFC',
borderColor: '#fff',
borderWidth: 1
},
There is a chart instance already initialized on the dom.
每次绘图都需要init一下,这是没有必要的
Before
const myChart = echarts.init(document.getElementById('chat'))
After
let myChart = echarts.getInstanceByDom(document.getElementById('chat'))
if (myChart == null) {
myChart = echarts.init(document.getElementById('chat'))
}