[]
        
(Showing Draft Content)

Non-Working Time

The chart area of a Gantt chart displays the non-working time as well. Gantt charts highlight working and non-working time differently so that users can distinguish them clearly. By default, the Gantt chart uses the gray color to indicate the non-working time by default. You can change the draw mode, color, and style pattern of the non-working area using the nonWorkingTime properties.

The following code sample shows how to change different properties of the non-working area.

// Change non-working time styles.
// Change color to green.
ganttSheet.project.timescale.nonWorkingTime.color = "green";
// Change pattern to lineCross.
ganttSheet.project.timescale.nonWorkingTime.pattern = "lineCross";
// Change draw mode to none.
ganttSheet.project.timescale.nonWorkingTime.drawMode = "None";

The GIF below shows the output of the above codes.


non working time style