L_L
Posts: 2
Joined: Sun Mar 26, 2023 8:43 am

problem when hovering on series

Hi guys!

I have an 'areaspline' chart type and I would like to get a tooltip only when the mouse hovers on the series itself and not near it.
to achieve this, I turned off the stickyTracking option.
It seemed to work except on a case in which the 2-nd series overlaps the first one. and then I don't get any events from it..

I searched and found a function - toFront() but it does not cover all the cases since the first series might be entirely covered.

any suggestions?

https://jsfiddle.net/qv9w67ps/
jakub.s
Posts: 1229
Joined: Fri Dec 16, 2022 11:45 am

Re: problem when hovering on series

Hi,

Welcome to our forum & thanks for the question!

Unfortunately, it seems to be a natural behavior for a series with lower zIndex which is fully covered.

I'm afraid that stickyTracking = false may not work for this case (the series.point.events.mouseOver only fires on the points that are not covered). I don't see any easy solution to this problem.

I'd consider turning stickyTracking to true if that's not a huge issue for you.

I'll talk to our developers and after consulting it with them, I'll create a feature request on GitHub for this to work and I'll send you a link if you want me to do it.

Best regards,
Jakub
Jakub
Highcharts Developer
L_L
Posts: 2
Joined: Sun Mar 26, 2023 8:43 am

Re: problem when hovering on series

Hi Jakub,

Thank you for your reply!

yes. I will be happy for the link.
by the way, I tried in the demo I attached to set stickyTracking to true and although I get the hover gesture I don't get the click event from the covered series which is another issue..

Code: Select all

plotOptions: {
        series: {
           events: {
           	click: function() {console.log(this.name)}
           }
           
        }
    },
jakub.s
Posts: 1229
Joined: Fri Dec 16, 2022 11:45 am

Re: problem when hovering on series

Hi,

You're right! Unfortunately, it also seems to be undesired behavior.

I've reported it here: https://github.com/highcharts/highcharts/issues/18744 where you can track its progress.

In the meantime please let me know if you have any other questions.

Best regards,
Jakub
Jakub
Highcharts Developer

Return to “Highcharts Usage”