histogram_cell_label
info
This functionality is available in the PRO edition only.
Description
Defines the label inside a cell
histogram_cell_label: (start_date: Date, end_date: Date, resource: any, tasks: Array<Task>, assignments: any[]) => string | number | void;
Parameters
start_date- (required) Date - start date of the scale cellend_date- (required) Date - end date of the scale cellresource- (required) object - the resource objecttasks- (required) Array - <Task> tasks that are assigned to the specified resource and overlap start/end dates of the cellassignments- (required) array - resource assignments that are assigned to the specified start/end dates of the task
Returns
label- (string | number | void) - an HTML text for the label inside a histogram cell
Example
gantt.templates.histogram_cell_label = function(start_date,end_date,resource,tasks,
assignments){
return tasks.length * 8;
};
Related samples
Details
note
The "assignments" argument is only available when the process_resource_assignments config is enabled.
Related API
- histogram_cell_class
- histogram_cell_allocated
- histogram_cell_capacity
- process_resource_assignments
- resource_property
Related Guides
Change log
- the assignments parameter is added in v7.1