在stack:'total'的情况下设置barWidth无法调整列的宽度,那要怎么样才能调整列的宽度
配置项如下
option = {
legend: {
y: 'bottom',
data: ['表扬', '咨询查询', '意见', '建议', '投诉', '举报']
},
color: ["#F79646", "#4BACC6", "#8064A2", "#9BBB59", "#C0504D", "#4F81BD"],
xAxis: [{
axisLine: {
show: false
},
type: 'category',
splitLine: {
show: false
},
data: ['2017/5/12', '2017/5/12', '2017/5/12', '2017/5/12', '2017/5/12', '2017/5/12', '2017/5/12']
}],
tooltip: {
formatter: "{b}: <br/>{a}: {c}",
trigger: "item"
},
yAxis: [{
axisLine: {
show: false
},
type: 'value'
}],
series: [{
name: '表扬',
type: 'bar',
stack: 'total',
barWidth: 40,
data: [80, 180, 280, 380, 480, 580, 680]
}, {
name: '咨询查询',
type: 'bar',
stack: 'total',
data: [80, 180, 280, 380, 480, 580, 680]
}, {
name: '意见',
type: 'bar',
stack: 'total',
data: [80, 180, 280, 380, 480, 580, 680]
}, {
name: '建议',
type: 'bar',
stack: 'total',
data: [80, 180, 280, 380, 480, 580, 680]
}, {
name: '投诉',
type: 'bar',
stack: 'total',
data: [80, 180, 280, 380, 480, 580, 680]
}, {
name: '举报',
type: 'bar',
stack: 'total',
data: [80, 180, 280, 380, 480, 580, 680]
}]
};