Skip to main content

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 cell
  • end_date - (required) Date - end date of the scale cell
  • resource - (required) object - the resource object
  • tasks - (required) Array - <Task> tasks that are assigned to the specified resource and overlap start/end dates of the cell
  • assignments - (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;
};

Details

note

The "assignments" argument is only available when the process_resource_assignments config is enabled.

Change log

  • the assignments parameter is added in v7.1