[英]HighCharts. How to align yAxis title and yAxis labels to right in one line?
請幫助配置“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;
}
}
}
您可以使用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參考:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.