echarts这种样式如何实现?-灵析社区

希望奇迹发生_1

针对 0 的数据可以加一个 `shadow`,利用 `shadow` 可以偏移的配置来实现这种样式 series: [ { name: 'test', type: 'bar', barMinHeight: 3, data: [ 10, 20, 30, 40, 50, { value: 0, itemStyle: { color: 'red', shadowColor: 'red', shadowOffsetX: -3 } } ] } ] 效果如下 ![image.png](https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20250103/a81eee13a2374842d819262893a0b45e.png)

阅读量:1

点赞量:0

问AI