redefines functions responsible for displaying different types of tasks

object type_renderers;

Available only in PRO Edition


gantt.config.type_renderers[gantt.config.types.project] = function(task,defaultRender){
    var main_el = document.createElement("div");
    var size = gantt.getTaskPosition(task);
    main_el.innerHTML = [
        "<div class='project-left'></div>",
        "<div class='project-right'></div>"
    main_el.className = "custom-project";
    main_el.style.left = size.left + "px";
    main_el.style.top = size.top + 7 + "px";
    main_el.style.width = size.width + "px";
    return main_el;

Default value:


Related samples


This functionality is available in the PRO edition only.

A function that renders tasks takes 2 parameters:

  • task - the task object
  • defaultRender - the default render function used in the dhtmlxGantt

You can use this option to define a custom display for certain types of tasks. For example, the setting allows you to implement a more conservative view for the project or summary tasks.

Related sample:  Classic Look

See also
Back to top