我试图将零数字放置在 Jmeter 外,但我不知道如何操作,我不能使用x & y选项,因为plotLine的位置总是在变化,所以我需要零与plotLine一起移动,并且总是在外部。this is a gauge where the zero is higher than the start of the gauge.in this case the gauge is right where the gauge starts, here you can see how the zero is positioned.
这里我将留下我认为相关的代码部分
yAxis: {
reversed: false,
min: min || 0,
max: max || 1,
lineWidth: 0,
tickInterval: 0,
tickWidth: 0,
tickColor: "transparent",
minorTickInterval: null,
zIndex: 4,
tickAmount: 2,
title: {
y: -90,
},
labels: {
y: 20,
distance: -25,
style: {
color: activeColor, // muiTheme.palette.common.coal[0],
fontSize: "14px",
},
},
plotBands: [
{
from: plotBandValueFrom,
to: plotBandValueTo,
borderColor: "#000",
backgroundColor: "transparent",
borderWidth: 2,
thickness: "100%",
outerRadius: "80%",
innerRadius: "60%",
zIndex: 10,
},
],
plotLines: [
{
value: 0,
zIndex: 5,
width: 4,
color: "#000",
label: {
text: 0,
verticalAlign: "top",
textAlign: "center",
style: {
color: "#000",
fontSize: "10px",
},
},
},
],
},
字符串
1条答案
按热度按时间pbpqsu0x1#
不幸的是,使用API中的属性无法以这种方式定位标签。但是,您可以使用
chart.events.render()
回调来使用自己的逻辑更新位置。下面的演示并不完美,但它是如何实现的一个示例。Demo:https://jsfiddle.net/BlackLabel/ud9rjmfL/API:https://api.highcharts.com/highcharts/chart.events.render