请帮助配置“ Highcharts”。我无法在一行的右侧对齐标题和标签。如果标签已在格式化程序中重新计算,则会被裁剪。
yAxis选项配置:
chart: {
spacingLeft: 0
},
yAxis: {
offset: 12,
title: {
rotation: 0,
align: 'high',
y: -21,
textAlign: 'right',
x: 0,
margin: 0,
offset: 0,
text: 'ttl'
},
labels: {
x: 0,
align: 'right',
formatter: function(e) {
return e.value * 333;
}
}
}
答案 0 :(得分:0)
您可以使用title.x
和labels.x
属性来设置空间。 x
值包含在图表大小计算中:
yAxis: {
title: {
rotation: 0,
align: 'high',
y: -21,
textAlign: 'right',
x: -10,
margin: 0,
offset: 0,
text: 'ttl'
},
labels: {
x: -10,
align: 'right',
formatter: function(e) {
return e.value * 333;
}
}
}
实时演示: http://jsfiddle.net/BlackLabel/67bv3nts/
API参考: