histogram_cell_class
信息
此功能仅在 PRO 版本中可用。
Description
定义应用于资源面板单元格的CSS类
histogram_cell_class: (start_date: Date, end_date: Date, resource: any, tasks: Array<Task>, assignments: any[]) => string | void;
Parameters
start_date- (required) Date - 刻度单元格的起始日期end_date- (required) Date - 刻度单元格的结束日期resource- (required) object - 资源对象tasks- (required) Array - <Task> 分配给指定资源且与单元格起止日期重叠的任务assignments- (required) array - 与指定任务起止日期关联的资源分配
Returns
className- (string | void) - 用于histogram时间线单元格的CSS类名
Example
gantt.templates.histogram_cell_class = function(start_date,end_date,resource,tasks,
assignments){
return "";
};
Related samples
Details
注释
只有启用 process_resource_assignments 配置时,才会提供 "assignments" 参数。
Related API
- histogram_cell_label
- histogram_cell_allocated
- histogram_cell_capacity
- process_resource_assignments
- resource_property
Related Guides
Change log
- 在v7.1版本中引入了 assignments 参数
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.