Hi Guys,
is there any method or workaround to extend the tooltip for tasks with dynamic information?
Thanks,
Eddy
Hi Guys,
is there any method or workaround to extend the tooltip for tasks with dynamic information?
Thanks,
Eddy
Yes, here is a sample:
ganttChartControl.showTooltip(true);
// Sample usage of custom task tooltip
ganttChartControl.customTaskTooltip = function(task) {
return "<div style='background-color:#ccc;text-align:center;height:100px'>" + task.getName() + "</div>";
}
// Sample usage of custom project tooltip
ganttChartControl.customProjectTooltip = function(project) {
return "<div style='background-color:#cccc00;text-align:center;height:60px;font:bold 10pt Tahoma'>" + project.getName() + "</div>";
}
Does this mean that you could put things other than text to customize a tooltip, could be an image a widget etc?
Yes, you can use any html tags in the popup, so it can be a text or an image or a mixed content.
FYI,
The code from Fedor’s post is actual for dhtmlxGantt 1.0
In current version tooltip content is defined by scheduler.templates.tooltip_text function