悬停到Y轴的线 [英] Line to the Y axis on hover
问题描述
图表/堆栈溢出
我希望最终用户可以轻松地比较区域/折线图中的点.因此,当他们将鼠标悬停在某个点上时,我想从该点一直到左右绘制一条水平线.与plotLine(我理解是静态的)不同,它会根据您悬停在哪一点而出现/消失/更改.
I would like to make it easy for end users to compare points in an area/line chart. As such, when they hover on a point, I would like to draw a horizontal line from that point all the way to the left and to right. Unlike a plotLine (which i understand to be static), this would be appear/disappear/change based on which point you are hovering on.
您可以在股票图表中看到类似的东西,其中垂直线下降到X轴.
You can see something similar on the stockcharts where a vertical line goes down to the X-axis.
有什么想法吗?
推荐答案
使用 yAxis.crosshair
:
yAxis: {
crosshair: {
...
}
}
实时演示: http://jsfiddle.net/BlackLabel/6m4e8x0y/5003/
API参考: https://api.highcharts.com/highcharts/yAxis.crosshair
这篇关于悬停到Y轴的线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!