升级echarts到5.x遇到的几个问题解决 2024-08-0

2024-08-01  本文已影响0人  齐格Insight

当升级到echarts后报如下warning:

image.png

LineChart.vue:61 [ECharts] DEPRECATED: itemStyle.normal.lineStyle is deprecated, use lineStyle instead.
LineChart.vue:61 [ECharts] DEPRECATED: 'normal' hierarchy in itemStyle has been removed since 4.0. All style properties are configured in itemStyle directly now.
LineChart.vue:61 [ECharts] DEPRECATED: 'normal' hierarchy in lineStyle has been removed since 4.0. All style properties are configured in lineStyle directly now.
LineChart.vue:61 [ECharts] DEPRECATED: itemStyle.normal.areaStyle is deprecated, use areaStyle instead.
[ECharts] DEPRECATED: 'normal' hierarchy in areaStyle has been removed since 4.0. All style properties are configured in areaStyle directly now.

RaddarChart.vue:49 [ECharts] The ticks may be not readable when set min: 0, max: 10000 and alignTicks: true
RaddarChart.vue:49 [ECharts] The ticks may be not readable when set min: 0, max: 20000 and alignTicks: true

解决LineChart的几个问题

按照提示将 lineStyle 提到与 itemStyle 平级,将normal那级去掉。

image.png

解决RaddarChart的问题

将indicator里的max属性去掉

image.png
参考:
https://github.com/apache/echarts/issues/17763
上一篇下一篇

猜你喜欢

热点阅读