gpt4 book ai didi

angular - Highchart yAxis plotLines 标签位置

转载 作者:行者123 更新时间:2023-12-02 01:08:34 25 4
gpt4 key购买 nike

我遇到了重新定位 yAxis.plotLines.label 位置的问题。
enter image description here

我想将标签从原始位置移动到 plotLine 下。
请检查此 link

Highcharts.chart('container', {
xAxis: {
tickInterval: 24 * 3600 * 1000, // one day
type: 'datetime'
},

yAxis: {
plotLines: [{
color: 'red',
width: 2,
value: 100,
label: {
text: 'Plot line',
align: 'right'
}
}]
},

series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4],
pointStart: Date.UTC(2010, 0, 1),
pointInterval: 24 * 3600 * 1000
}]
});

最佳答案

检查 xAxis.plotLines.label.y调整标签位置

Fiddle演示

 yAxis: {
plotLines: [{
color: 'red',
width: 2,
value: 100,
label: {
text: 'Plot line',
align: 'right',
y: 20, /*moves label down*/
}
}]
},

关于angular - Highchart yAxis plotLines 标签位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46418011/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com