我想在YAxes中为图形“百分比”设置左边的填充。在酒吧后面我需要一个空间。请看下面的代码。
'chart =新列({Highcharts.Chart:{ renderTo:‘容器’,inverted: true,类型:‘列’},
title: {
text: 'Indicatores por Sexo'
},
xAxis: {
categories: [
'Jan',
'Fev',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dez'
],
title: {
text: 'Meses'
},
},
yAxis: {
endOnTick: false,
maxPadding: 5,
allowDecimals: false,
min: 0,
title: {
text: 'Quantidade de Consultas'
},
stackLabels: {
style: {
color: 'black'
},
enabled: true,
formatter: function() {
return "Product A";
}
}
},
tooltip: {
formatter: function() {
return '<b>'+ this.x +'</b><br/>'+
this.series.name +': '+ this.y +'<br/>'+
'Total: '+ this.point.stackTotal;
}
},
plotOptions: {
column: {
stacking: 'percent'
},
series : {
pointWidth: 10,
minPointLength: 3,
}
},
series: [{
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], //inclusoesExclusoesChequeFeminino[0]
color: '#FF0000',
stack: 0
}, {
data: [12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], //inclusoesExclusoesChequeMasculino[0]
color: '#3333FF',
stack: 0
}, {
data: [10, 20, 30, 40, 50, 60, 60, 50, 40, 30, 29, 10], //inclusoesExclusoesSPCFeminino[0]
color: '#FF0000',
stack: 1
}]
});'谢谢!
发布于 2013-03-29 00:10:30
您可以在图表中添加右边距,这将为标签http://api.highcharts.com/highcharts#chart.marginRight提供空间
另外-带有'inverted:true‘的柱状图与条形图相同。为什么不直接使用'bar‘类型呢?
https://stackoverflow.com/questions/15685133
复制相似问题