作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在此fiddle放置在 highcharts.com 我想当鼠标悬停在当前 yAxis
上时隐藏点,并从 tooltip
中删除 labels
,但不删除图表。
下面是带有红线和十字要隐藏的简单图像:
最佳答案
该问题是由 tooltip.shared
引起的默认为true
。来自文档(强调我的):
When the tooltip is shared, the entire plot area will capture mouse movement.
由于您只想捕获单个系列上的鼠标移动,因此我们只需将该值设置为 false
即可解决问题。在您的示例中:
// ... other options
tooltip: {
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.change}%)<br/>',
valueDecimals: 2,
shared: false
}
关于javascript - 如何在 Highcharts 中隐藏鼠标悬停时的特定点和标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19008982/
我是一名优秀的程序员,十分优秀!