Baseline

7 Jun 20231 minute to read

Baseline is used to describe the original plan of the task and it can be the same as current duration of the task or different. Baseline can be enabled by setting renderBaseline as true and baseline color can be changed by baselineColor property. To render the baseline you have to map the baseline start date and baseline end date values from data source. This can be done by using baselineStartDateMapping and baselineEndDateMapping properties. The following code example shows how to enable baseline in Gantt control.

  • JAVASCRIPT
  • $("#GanttContainer").ejGantt({
            //...
            baselineStartDateMapping: "baselineStartDate", //Mapping BaselineStartDate to Gantt
            baselineEndDateMapping: "baselineEndDate", //Mapping BaselineEndDate to Gantt
            renderBaseline: true //Show/Hide the baseline in Gantt
            baselineColor:"#fba41c"
        });

    Click here to view the online demo sample for baselines in Gantt.

    The following screenshot shows the baseline in Gantt control.