artakserkses
Posts: 51
Joined: Tue Feb 23, 2021 11:23 am

tooltip on yAxis.grid.column

Hello again :)
Is it possible somehow to make tooltip on columns, or columns labels?
like f.ex. in here: https://codesandbox.io/s/gantt-chart-ov ... mponent.ts I would like a tooltip on Test, Resource4, and Resource1

I tried tooltips on series, chart, etc. but this doesn't work. I also tried to do label.formatter in html, and add pTooltip (from primeng), or mouse events, but those are deleting in generating html :/ And I have no more ideas how can i do it :)
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: tooltip on yAxis.grid.column

Hi,
Great to hear from you :)

You can use the solution from this post.
viewtopic.php?t=43774#p154719
It is not possible to show a tooltip on yAxis straight from the API level. To achieve that you could use our SVG renderer, to create a label that will imitate the tooltip, and then delete it on the mouse out. All you have to do is to add mouseover and mouseout event on the yAxis title - you could use our on() method and then just render it on the correct position. As you can see in the simple demo below, from now after hovering over yAxis title the label with title name will appear near the cursor.

Best regards.
Sebastian Hajdus
Highcharts Developer
artakserkses
Posts: 51
Joined: Tue Feb 23, 2021 11:23 am

Re: tooltip on yAxis.grid.column

sebastian.h wrote: Fri Jun 25, 2021 9:58 am Hi,
Great to hear from you :)
I'm happy too :)
Thanks for answer it was very helpful. Thanks to it i just draw a rectangles on areas where i want to have label, and add mouse events on those rectangles :mrgreen:
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: tooltip on yAxis.grid.column

Hi,
I'm glad that the solution turned out to be successful :)

Regards.
Sebastian Hajdus
Highcharts Developer
m.cs
Posts: 6
Joined: Tue Oct 03, 2023 2:43 pm

Re: tooltip on yAxis.grid.column

Hi,
I'm trying to implement this also on the Gantt Chart y axis labels. Can you please share the code how you were able to achieve this?
Thank you.
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: tooltip on yAxis.grid.column

Thanks for contacting us with your question!

Here is a demo of a gantt chart with a tooltip displayed for yAxis.labels, see:

Demo: https://jsfiddle.net/BlackLabel/k2p1bhme/

Let me know if that was what you were looking for!
Kind regards
Jakub

Return to “Highcharts Gantt”