圆角borderRadius
不生效
改为barBorderRadius
series: [
{
name: '计量',
type: 'bar',
barWidth: 6,
showBackground: true, // 背景
backgroundStyle: {
color: '#fff', // 背景色
borderColor: '#EDEDED', // 描边
borderWidth: 1,
barBorderRadius: 5, // 统一设置四个角的圆角大小
},
itemStyle: {
normal: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 1, 0, [{
offset: 0,
color: '#9BBAFF',
}, {
offset: 1,
color: '#6997FD',
}]),
barBorderRadius: [5, 0, 0, 5]
},
},
emphasis: {
focus: 'series',
},
data,
},
],
参考: