1 回答

TA贡献1875条经验 获得超5个赞
设置itemStyle.normal.borderColor和背景色一样就可以了,然后设置itemStyle.normal.borderWidth的宽度,就可以了 具体代码如下:
option = {
legend: {
data:['a', 'b', 'c']
},
tooltip: {
trigger: 'axis',
show: true
},
title: {
text: 'Awesome Chart'
},
xAxis: {
data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
},
yAxis: {},
series: [{
type: 'bar',
name:'a',
stack: 'sum',
itemStyle: {
normal: {
borderColor:'#fff',
borderWidth: 2,
barBorderRadius:[0, 0, 5, 5]
}
},
data:[220, 182, 191, 234, 290, 330, 310]
},{
type: 'bar',
name:'b',
stack: 'sum',
itemStyle: {
normal: {
borderColor:'#fff',
borderWidth: 2
}
},
data:[220, 182, 191, 234, 290, 330, 310]
},{
type: 'bar',
name:'c',
stack: 'sum',
itemStyle: {
normal: {
borderColor:'#fff',
borderWidth: 2,
barBorderRadius: [5, 5, 0, 0]
}
},
data:[220, 182, 191, 234, 290, 330, 310]
}]
};
添加回答
举报