低版本echarts的升级到新版5.4.0的echarts浏览器预警和报错信息

2023-12-13 09:24:18

新版5.4.0的echarts浏览器预警和报错信息

[ECharts] DEPRECATED: ‘normal’ hierarchy in itemStyle has been removed since 4.0. All style properties are configured in itemStyle directly now.

在这里插入图片描述

因为normal层被移除,问题代码如下图所示

itemStyle: {
   normal: {color:'rgba(3,134,226,0.36)'}      
},
                
//改成
itemStyle: {
   color:'rgba(3,134,226,0.36)'
},

二、[ECharts] DEPRECATED: barBorderRadius is deprecated, use borderRadius instead.

barBorderRadius: [2, 2, 0, 0],
    //改成
borderRadius: [2, 2, 0, 0],

三、[ECharts] DEPRECATED: label.emphasis has been changed to emphasis.label since 4.0

label: {
     show: false
     // normal: {show: false},
     // emphasis: {show: false}
},

四、hoverAnimation is deprecated, use emphasis.scale instead.

// hoverAnimation: false,
emphasis:{
    scale:false
},

五、[ECharts] DEPRECATED: textStyle hierarchy in axisLabel has been removed since 4.0. All textStyle properties are configured in axisLabel directly now.

自4.0以来,axisLabel中的textStyle层次结构已被删除。现在所有的textStyle属性都直接在axisLabel中配置了。

axisLabel: {
            show: true,
            textStyle: { color: '#fff' }
          },
 //改成
     axisLabel: {
            show: true,
            color: '#fff',
          },         

其实只要去翻译下,就大概知道了这些警告是什么意思了

文章来源:https://blog.csdn.net/lu6545311/article/details/134947544
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。