showTask

makes the specified task visible on the screen

void showTask(string| number id);
idstring| numberthe task id

Example

var taskId = gantt.addTask({
    id:10,
    text:"Task #5",
    start_date:"02-09-2013",
    duration:28
}, "project_2");
 
gantt.showTask(10);

Details

In the default mode, Gantt scrolls itself when you use the showTask method. But if the autosize mode is enabled, Gantt increases the size of its container to show itself on the page instead of showing the specified date. Read the Scrolling to hidden elements article to know how to solve this problem.

See also
Back to top