histogram_cell_allocated
info
This functionality is available in the PRO edition only.
Description
Defines the height of the filled area in the resourceHistogram
histogram_cell_allocated: (start_date: Date, end_date: Date, resource: any, tasks: Array<Task>, assignments: any[]) => 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
height- (number | void) - the height of the filled area in the resourceHistogram
Example
gantt.templates.histogram_cell_allocated=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.
The value of the template can be set from 0 to maxCapacity.
maxCapacity definition
If each row of the histogram is considered as a bar chart, maxCapacity is the height of the Y-scale of this chart. In the image below maxCapacity = 24:
Related API
- histogram_cell_class
- histogram_cell_label
- histogram_cell_capacity
- process_resource_assignments
- resource_property
Related Guides
Change log
- the assignments parameter is added in v7.1