仅在高图的一个标记中禁用标记悬停 [英] Disable marker hover in only one marker of highchart
问题描述
我试图说服我的高位图参加竞标,但是遇到了问题.
I am trying to convince my highchart to do my bidding and have encountered a problem.
我想实现的目标: 我希望图表的标记之一消失.我希望线穿过(并在该点处断开),但是该点完全不相关,并且我不希望将鼠标悬停在该点上时弹出该点.我当前的代码如下所示:
What I want to acchieve: I want one of the markers of the graph to disappear. I want the line to go through (and break at) one point, but the point is completely irrelevant and I do not want that point to pop up when hovering over it. My current code looks something like this:
$(function () {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line'
},
plotOptions: {
series: {
states: {
hover: {
enabled: true
}
}
}
},
series: [{
marker: {
enabled: false
},
data: [15.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, {
y: 26.5,
marker: {
enabled: false,
states: {
hover: {
enabled: false
}
}
}
}, 23.3, 18.3, 13.9, 9.6]
}]
});
});
});
我所有的标记的行为都相同:它们直到我将鼠标悬停在它们上方时才可见.我想要的是所有标记的行为均与提供的代码相同,但标记y = 25.6除外.我希望此标记的行为与我设置时从所有标记获得的行为相同
And all my markers behave the same: they are not visible until I hover over them, at which point they pop up. What I want is for all my markers to behave as they do in the provided code, with the exception of the marker at y=25.6. I want the behaviour of this marker be the same as the behavior I get from all markers when i set
hover:{ enabled: false }
使用我的原始代码.也就是说,我希望标记完全消失".
in my original code. That is, I want the marker to "dissapear" completely.
在此先感谢您的帮助. 扬
Thanks in advance for all your help. Jan
推荐答案
不幸的是,这是Highcharts中的错误,请参见此.
This is unfortunately bug in Highcharts, see this.
这篇关于仅在高图的一个标记中禁用标记悬停的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!