I’m working with the latest version of dhtmlxGantt and have enabled the tooltip plugin. My issue is that the tooltip appears both when hovering over the left grid area and the right timeline area.
My requirement is:
Tooltip should only appear when hovering over tasks in the timeline.
No tooltip should be shown when the mouse is over the grid cells.
What I’ve tried so far:
Adding a fourth parameter ‘(start, end, task, e)’ in ‘gantt.templates.tooltip_text’ to check the event target. But in the current version ‘e’ is always ‘undefined’.
Thanks for your help . I found that ‘gantt.ext.tooltips.tooltipFor’ is only available in the Pro version of dhtmlxGantt. I’m currently using the free Community edition, so this API isn’t available in my setup.
If you switch the Gantt version in the snippet tool, you can see that the gantt.ext.tooltips.tooltipFor property is available in the Standard (GPL) version:
So, if your Gantt version is older, it won’t work, but this is not related to the Pro version. And in this case, you really need to rely on the tooltip_text template.
Here is an example of how it can be implemented: https://snippet.dhtmlx.com/eh2gevy2
I’m currently using dhtmlxGantt v9.1 (GPL license) and it seems that the function gantt.ext.tooltips.tooltipFor is no longer available in this version. When I try to access it, I get the following console output: tooltipFor was introduced around version 6.1, but in 9.x it may have been removed or refactored. Could anyone confirm if this API has been deprecated in newer versions, and whether the recommended solution is to fall back to templates instead? Or do I need to downgrade to 6.1 if I want to use tooltipFor directly?
Hello Yard,
It seems you didn’t properly enable the Tooltip extension. In the 6.1 version, you needed to add files to enable extensions. Starting from the 7.0 version, you need to use the plugins method: https://docs.dhtmlx.com/gantt/migrating.html#6370
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan