这是js fiddle highchart stacked bar stacked label issue
Highcharts.chart('container', {
chart: {
type: 'bar'
},
title: {
text: 'Stacked bar chart'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
min: 0,
title: {
text: 'Total fruit consumption'
},
stackLabels: {
enabled: true,
align: 'right',
style: {
color: '#838383',
fontSize:"12px",
fontWeight:"normal",
width:'60px'
}
}
},
legend: {
reversed: true
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series: [{
name: 'John',
data: [5555555555555, 3, 4, 7, 2]
}, {
name: 'Jane',
data: [2, 2, 3, 2, 1]
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5]
}]
});
是否有设置最大条形长度以便yAxis标签不隐藏?或者我如何显示完整的标签?如果它的价值很大,目前它会隐藏标签的某些部分。