dqui.ercot
Posts: 2
Joined: Thu Aug 04, 2022 9:32 pm

Label interaction between series

I have an arearange with showInLegend: false and a line series that shown.
When click on the label for the line, it should hide BOTH the line + arearange.

This was the closest I came to a custom label click functionality, but it is limited to one series.
http://jsfiddle.net/fzy27d1z/

Is there any possible way to make the label interact with multiple series?

I have also tried making a single arearange (without the line)... but the problem is now the markers show up for BOTH high nd low (0) values.
We only want the markers to show up for the high values but hidden for the low... and can't seem to figure out how to do so.
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: Label interaction between series

Hello dqui.ercot, welcome to our official forum, and thanks for contacting us with your question!
In the demo you shared I don't really see the things that you described. There is no arearange series there.
What I understand is that you want to make 2 series, which are connected, and when you click on the legend item, they both hide. You can achieve this effect by linking them using a property named "linkedTo".

Then, you can make the areaseries not respond to any mouse actions by setting 'enableMouseTracking: false'.
The last thing is to edit the tooltip, to show the correct information. You can do it using the 'tooltip.formatter'. There you can specify what the values should be. Is this what you were looking for? Let me know if you have any further questions!

Live Demo: https://jsfiddle.net/BlackLabel/t7no0qds/3/


API Reference:
enableMouseTracking: https://api.highcharts.com/highcharts/s ... seTracking
linkedTo: https://api.highcharts.com/highcharts/s ... e.linkedTo
tooltip.formatter: https://api.highcharts.com/highcharts/tooltip.formatter

Kind regards,
Paweł Lysy
Highcharts Developer

Return to “Highcharts Usage”