resource_cell_class

defines the CSS class names of cells in the resource timeline cells

Parameters

start_dateDatestart date of the scale cell
end_dateDateend date of the scale cell
resourceobjectthe resource object
tasksarraytasks that are assigned to specified resource and overlap start/end dates of the cell

Available only in PRO Edition

Example

gantt.templates.resource_cell_class = function(start_date, end_date, resource, tasks){
    if (tasks.length <= 1) {
        return "workday_ok";
    } else {
        return "workday_over";
    }
};

Related samples

Details

This functionality is available in the PRO edition only.

  • Defines the CSS class names of cells in the resource timeline view.
  • Resource timeline links tasks to a resource by resource_property property of the task object.
  • The template is not called for cells where no tasks are located, unless resource_render_empty_cells is enabled.
  • Tasks of the project type are not counted and won't be passed to the tasks argument.
See also
Back to top