Disable marker hovering on only one highchart marker

I try to convince my highchart to fulfill my bets and ran into a problem.

What I want to be in time: I want one of the markers of the graph to disappear. I want the line to pass (and break) into one point, but the point is completely irrelevant, and I do not want this point to pop up when it hangs above 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] }] }); }); }); 

And all my markers behave the same way: they are not visible until I hang over them, and at that moment they pop up. I want all my markers to work the same as in the code provided, except for the marker in y = 25.6. I want the behavior of this marker to be the same as the behavior that I get from all markers when I set

 hover:{ enabled: false } 

in my source code. That is, I want the marker to completely disappear.

Thanks in advance for your help. Yang

+6
source share
2 answers

This is unfortunately a bug in Highcharts, see this .

+2
source

Try this in your series: enableMouseTracking: false

In your case, it will be:

 series: [{ data: [15.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, { enableMouseTracking: false, y: 26.5 }, 23.3, 18.3, 13.9, 9.6] }] 

Hope this helps!

(Update from 6/23/17):. For those who want to apply this to each series of charts, and not just to one, you should do the following:

 plotOptions: { series: { enableMouseTracking: false } } 
+6
source

Source: https://habr.com/ru/post/949810/


All Articles