pveras
Posts: 1
Joined: Thu Aug 11, 2022 5:38 pm
Contact: Website Twitter

Set hover state on series programatically - out of chart object

Hello, I need to set the hover state on the series programatically through a dropdown that contains the name of the series.

I have tried a few different ways:
1. Setting state to nothing - using chart.series[0].points[0].setState();
2. Setting state to hover - using chart.series[0].points[0].setState('hover');

As of now none of these method works. Below is the code with the eventListener for the dropdown already implemented. I just need to know which method I can call to set the series' to hover upon changing the dropdown item.

https://jsfiddle.net/5pxgfth2/1/


I have referenced to the following posts and none helped me get to what I truly need:
viewtopic.php?t=41965
viewtopic.php?t=39875
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Set hover state on series programatically - out of chart object

Hi pveras!
Welcome to our forum and thanks for contacting us with your question!

If you want to achieve the look of series when hovering one series with the mouse you have to change the state of the other series to inactive. You can check it in the demo below.

Demo: https://jsfiddle.net/BlackLabel/abphd5un/

Let me know if you have any further questions!
Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Usage”