timeline_placeholder
Description
在空的时间线中显示背景网格
timeline_placeholder: boolean
Example
gantt.config.timeline_placeholder = false;
...
gantt.init("gantt_here");
Related samples
Details
当 Gantt 中未加载任何任务时,背景网格将出现在时间线中:
或如果带有任务的行没有填满整个时间线:

要在背景网格中突出显示列和单元格,请使用 timeline_cell_class 模板:
gantt.templates.timeline_cell_class = function (task, date) (
if (!gantt.isWorkTime(( date: date, task: task ))) (
return "weekend";
)
);
对于背景行,模板中将添加一个临时任务对象。 可以通过它的 id 进行标识:
if(task.id === "timeline_placeholder_task")(
...
)
Related API
Change log
- 在 v8.0 中新增
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.