tooltip_text
Description
Specifies the text of tooltips
tooltip_text: (start: Date, end: Date, task: Task) => string | void;
Parameters
start- (required) Date - the date when a task is scheduled to beginend- (required) Date - the date when a task is scheduled to be completedtask- (required) Task - the task object
Returns
text- (string | void) - an HTML text which will be rendered in the gantt
Example
gantt.templates.tooltip_text = function(start,end,task){
return "<b>Task:</b> "+task.text+"<br/><b>Start date:</b> " +
gantt.templates.tooltip_date_format(start)+
"<br/><b>End date:</b> "+gantt.templates.tooltip_date_format(end);
};
Details
note
This template is defined in the tooltip extension, so you need to activate the tooltip plugin. Read the details in the Tooltips for Gantt Elements article.
Related API
Related Guides
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.