jackytanjq
Posts: 33
Joined: Mon Jul 26, 2021 2:53 am

Seperate tooltip label in its own Y-axis for each series

Dear All,

There is a requirement to have the tooltip label to be in its own Y-axis for each series.

Using the example below, the tooltip of the blue line(Series 1) and black line(Series 2) should not be in the same Y-axis.
Instead, the blue tooltip should be in the first Y-axis.
And the black tooltip should be in the second Y-axis.

Example: http://jsfiddle.net/jqx7y8nn/


Please advise if this is possible?

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

Re: Seperate tooltip label in its own Y-axis for each series

Hi jackytanjq,

Thanks for contacting us with your question.

In your shared example each label has its own axis. It is hard to tell because these labels are aligned to the left side of the chart.
My suggestion here is to set one of the axes on opposite side of the chart so that it is more evident.
Demo: http://jsfiddle.net/BlackLabel/8tL7xygj/

Let me know if that was what you were looking for!
Best regards!
Mateusz Bernacik
Highcharts Developer
jackytanjq
Posts: 33
Joined: Mon Jul 26, 2021 2:53 am

Re: Seperate tooltip label in its own Y-axis for each series

Hi Mateusz,

Unfortunately I could not use the solution in the demo, but I appreciate the suggestion.
Because my requirement is it will utilize both left and right side to have more than 1 Y-axis.

My solution will look similar to this, and the issue of the label overlap can be seen in Series 2(Black) and Series 4(Orange):
http://jsfiddle.net/jackytanjq/6ymr0ned/6/

Are there any other alternative solution to solve the label overlap issue for multiple Y-axis?

Looking forward to hearing from you soon.
Thank you.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Seperate tooltip label in its own Y-axis for each series

Hello jackytanjq,

Unfortunatelly it is not possible to achieve something like that from API level, such option is not available. You could try to wrap a function responsible for drawing these labels in a similar way that is done in the demo. Than you could try to offset each label slightly so that they don't overlap.
More about extending highcharts: https://www.highcharts.com/docs/extendi ... highcharts

Regards!
Mateusz Bernacik
Highcharts Developer
jackytanjq
Posts: 33
Joined: Mon Jul 26, 2021 2:53 am

Re: Seperate tooltip label in its own Y-axis for each series

Hi Mateusz,

Okay will try to extend it, thank you for the suggestions.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Seperate tooltip label in its own Y-axis for each series

Hi jackytanjq,

You're welcome, in case of any further questions feel free to contact me.

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”