在填充区域Highcharts不跟踪鼠标活动 [英] Highcharts not tracking mouse activity under filled area
问题描述
有什么办法保持对其他地区的覆盖标记交互(当确实有一个填充颜色)?
Is there any way to keep interaction on markers covered by other areas (when the do have a fill color)?
检查例如:
http://jsfiddle.net/ozke/n4k57v5j/1/
$('#container').highcharts({
chart: {
type: 'area'
},
xAxis: {
fill: '#F00',
gridLineWidth: 1,
},
yAxis: {
enabled: false,
gridLineWidth: 0
},
series: [
// Required JSON code?
{
data: [15,20,10,20,30]
},{
data: [10,15,20,15,20]
},
]
});
在蓝色区域标记/点是不可能达到/悬停/交互当x = 2。
The marker/dot in the blue area is impossible to reach/hover/interact when x=2.
在CSS中,相当于将使用指针事件:无;
的区域(没有边框或标记)
In CSS, the equivalent would be using pointer-events:none;
on the area (not the border or markers).
这可能是与SVG和/或事件的传播。
It's probably something to do with SVG and/or event propagation.
推荐答案
一些研究,我发现后有类似的东西指针事件:无;
对SVG(用通过Highcharts)。有几个选项excluse对SVG但对我来说什么,我需要的是指针的事件:visibleStroke;
After some research I found out there's something similar to pointer-events: none;
for SVG (used by Highcharts). There's a few options excluse for SVG but in my case what I needed was pointer-events: visibleStroke;
解决方案然后将:
path { pointer-events: visibleStroke; }
这篇关于在填充区域Highcharts不跟踪鼠标活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!