terrahound
Posts: 10
Joined: Tue Sep 01, 2015 6:45 am

Setting border width and color of active series item

Hi,

I would like to know as to how to set all the active series categories' border width and colors the same the one encircled below
Image

I was able to achieve that by setting the series state like so:

Code: Select all

	states: {
            hover: {
              brightness: 0,
              borderWidth: 1,
              borderColor: globalStyles.gray1,
            },
          },
However there is no state for all active series categories.

Thank you
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Setting border width and color of active series item

Hello terrahound,

Thanks for contacting us with your question.

Just to make sure - do you want to add border for each series' point when one of the points is hovered? Thanks in advance for clarification.

Best regards!
Mateusz Bernacik
Highcharts Developer
terrahound
Posts: 10
Joined: Tue Sep 01, 2015 6:45 am

Re: Setting border width and color of active series item

Hi mateusz.b,

Thank you so much for the reply.

Yes, that is exactly what I am hoping to achieve.
Also if it is possible to show the same border changes whenever the legend item corresponding to the series is hovered
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Setting border width and color of active series item

Hi terrahound,

To achieve such effect you can simply update series with new border options on mouseOver and mouseOut events.
Demo: https://jsfiddle.net/BlackLabel/sj57ohud/
API reference: https://api.highcharts.com/highcharts/p ... .mouseOver,
https://api.highcharts.com/highcharts/p ... s.mouseOut,
https://api.highcharts.com/class-refere ... ies#update

Let me know if that was what you were looking for!
Best regards!
Mateusz Bernacik
Highcharts Developer
terrahound
Posts: 10
Joined: Tue Sep 01, 2015 6:45 am

Re: Setting border width and color of active series item

Hi mateusz.b,

Awesome, thank you so much for the answer!
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Setting border width and color of active series item

You're welcome! In case of any further questions, feel free to contact us again.
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”