Gustavo_Carrillo2019
Posts: 2
Joined: Wed May 15, 2019 9:41 pm

Update label color after click on tooltip

Hi,
I'm still practising with highcharts an have a simple design of a chart. It is displaying as I want but there is still one thing missing. When I press on a tooltip the label on the same xAxis should change its color to the tooltip's color. I would like to know if it is possible since I've been looking for a way to do it and couldn't get the solution.

This is the chart that I'm working on:

https://jsfiddle.net/orc1x09h/
bastss
Site Admin
Posts: 1212
Joined: Wed Oct 17, 2018 10:59 am

Re: Update label color after click on tooltip

Hey Gustavo_Carrillo2019,

Would you like to get something like this?
Demo: https://jsfiddle.net/BlackLabel/qLmhz78d/

I think that the easiest solution is to use mouseOver and mouseOut features to hide a point, add a class for the appropriate label and styled this label in CSS.

API: https://api.highcharts.com/highcharts/p ... s.mouseOut

Best regards!
Sebastian Wędzel,
Highcharts Developer
Gustavo_Carrillo2019
Posts: 2
Joined: Wed May 15, 2019 9:41 pm

Re: Update label color after click on tooltip

Thank you so much this is what I needed

Return to “Highcharts Usage”