Javascript 在yAxis Highcharts上显示绘图线值
我正在使用Highchart的字符栏,我想知道是否有办法显示平均线(打印线)的值,在“yAxis”中显示值,或者在鼠标悬停时显示一个带有打印线精确值的对话框 我已经显示了平均线,但无法读取图形上的精确值 这是海图中的绘图线Javascript 在yAxis Highcharts上显示绘图线值,javascript,highcharts,Javascript,Highcharts,我正在使用Highchart的字符栏,我想知道是否有办法显示平均线(打印线)的值,在“yAxis”中显示值,或者在鼠标悬停时显示一个带有打印线精确值的对话框 我已经显示了平均线,但无法读取图形上的精确值 这是海图中的绘图线 plotLines: [{ color: 'red', value: avg, // Insert your average here width: '1', zIndex: 2 // To not get stuck below the re
plotLines: [{
color: 'red',
value: avg, // Insert your average here
width: '1',
zIndex: 2 // To not get stuck below the regular plot lines
}]
您应该能够显示标签:
plotLines: [{
color: 'red',
value: avg, // Insert your average here
width: '1',
zIndex: 2, // To not get stuck below the regular plot lines
label: {
text: avg,
textAlign: 'left',
x: -40
}
}]
是的,这会告诉我平均值的确切值,但是,有一种方法可以在“yAxis”上“信任”它?@BennyBuAc您必须使用标签属性。我已经更新了我的答案,以显示一些示例值您还可以增加zIndex值以显示列上方的行。示例:。