jespergranbo
Posts: 9
Joined: Mon May 17, 2021 1:18 pm

Change series name in zone

Hi experts!

I have data in a series, attached to the series is a zone, when i go below 0 i change the line colour to red, but i also want to change the tooltip hoover for when its below zero to something else than the current seriesname. Any idea on how to do this?
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Change series name in zone

Hi jespergranbo,

Thanks for contacting us with your question

Most likely this can be done with tooltip.formatter callback function, which allows you to format tooltip almost from scratch. I can try to create something like that but first I need you to provide me with a live demo of you chart. You can start here: https://jsfiddle.net/BlackLabel/g96kt8jo/24/

Regards!
Mateusz Bernacik
Highcharts Developer
jespergranbo
Posts: 9
Joined: Mon May 17, 2021 1:18 pm

Re: Change series name in zone

Hi.

Here is a simplified version of what im trying to do! :)

https://jsfiddle.net/o9yqt23z/1/
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Change series name in zone

Hi jespergranbo,

Thanks for sharing the demo. Here is an example with a tooltip.formatter:
Demo: https://jsfiddle.net/BlackLabel/ytqsbngL/
API reference: https://api.highcharts.com/highcharts/tooltip.formatter

Let me know if that was what you were looking for!
Regards!
Mateusz Bernacik
Highcharts Developer
jespergranbo
Posts: 9
Joined: Mon May 17, 2021 1:18 pm

Re: Change series name in zone

Thats exactly it, thank you! :)
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Change series name in zone

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

Return to “Highcharts Usage”