timeline_placeholder

shows the background grid in the empty timeline

boolean timeline_placeholder;

Example

gantt.config.timeline_placeholder = false;
...
gantt.init("gantt_here");

Related samples

Details

The background grid will appear in the timeline if there are no tasks loaded into the Gantt:

background grid

or if the rows with tasks don't fill the whole timeline:

background grid

To highlight columns and cells in the background grid, use the timeline_cell_class template:

gantt.templates.timeline_cell_class = function (task, date) {
    if (!gantt.isWorkTime({ date: date, task: task })) {
        return "weekend";
    }
};

For background rows, a temporary task object will be added to the template. The object can be identified by its id:

if(task.id === "timeline_placeholder_task"){
    ...
}
See also
Change log

added in v8.0

Back to top