property Chart.NonworkingDays as Long
Retrieves or sets a value that indicates the non-working days, for each week day a bit.

TypeDescription
Long A long expression that indicates the non-working days in a week.
By default, the NonworkingDays property is 65 ( Saturday(s) and Sunday(s) ). The non-working days are shown using the NonworkingDaysPattern and the NonworkingDaysColor which defines the pattern and the color, when the base level of the chart displays days, if the ShowNonworkingUnits property is True ( by default ).  Use the ShowNonworkingUnits property to display or hide the non-working units as hours or days in your chart. Use the NonworkingHours property to indicate non-working hours in a day. Use the ItemNonworkingUnits property to specify different non-working zones for different items. Use the UnitWidthNonworking property to specify a different width for non-working units in the base level. Use the ShowNonworkingUnits property to hide the non-working units. The IsNonworkingDate property indicates whether the giving date-time is a working or non-working unit.

The control supports the following ways of specify the non-working parts for items:

You can select the non-working week days in the following table ( In Internet Explorer, you have to allow running the script on this page ).

Saturday Friday Thursday Wednesday Tuesday Monday Sunday
Value 64 32 16 8 4 2 1
Bit

Click the Bit row for non-working days and the value for property is: , (hexa), (octal), (binary)

The last significant byte in the NonworkingDays expression has the following meaning:

where X could be 1 ( nonworking day ) or 0 ( working day ), Sa means Saturday, Fr means Friday, and so on. For instance, the 65 value means Saturday and Sunday are non-working days. Use the AddNonworkingDate method to add custom dates as being nonworking date.

Use the ShowNonworkingDates property to show or hide the nonworking dates in the control's chart area. Use the NonworkingDaysPattern property to specify the pattern being used to fill non-working days. The NonworkingDaysColor property specifies the color being used to fill the non-working days. For instance, if  the NonworkingDaysPattern is exPatternEmpty the non-working days are not highlighted. Use the MarkTodayColor property to specify the color to mark the today date. Use the DrawGridLines property to specify whether the control draws the grid lines in the chart's area. Use the GridLineColor property to specify the color for grid lines. Use the DrawGridLines property to specify whether the control draws the grid lines in the items area. Use the DrawGridLines property to draw grid lines for a specified level. Use the IsNonworkingDate property to retrieve a value that indicates whether a date is marked as nonworking day. Use the Add("A:B") to add a bar that displays the bar A in the working area, and B in non-working areas. Use the ItemBar(exBarWorkingCount) property to specify the count of working units in the bar. Use the ItemBar(exBarNonWorkingCount) property to specify the count of non-working units in the bar. Use the ItemBar(exBarKeepWorkingCount) property to specify whether the ItemBar( exBarWorkingCount) property is kept constant while user moves a bar at runtime. Use ItemBar(exBarWorkingUnits) or ItemBar(exBarWorkingUnitsAsString) property to retrieve the working parts of the bar. Use ItemBar(exBarNonWorkingUnits) or ItemBar(exBarNonWorkingUnitsAsString) property to retrieve the non-working parts of the bar. 

The following VB sample retrieves the value to indicate Sunday and Monday as being non-working days:

With G2antt1.Chart
    .NonworkingDays = 2 ^ (EXG2ANTTLibCtl.exSunday) Or 2 ^ (EXG2ANTTLibCtl.exMonday)
End With

The following C++ sample retrieves the value to indicate Sunday and Monday as being non-working days:

m_g2antt.GetChart().SetNonworkingDays( 1 << ( EXG2ANTTLib::exSunday ) | 1 << ( EXG2ANTTLib::exMonday ) );

where the #import <exg2antt.dll> must be called to insert definitions for types in the control's type library.

The following VB.NET sample retrieves the value to indicate Sunday and Monday as being non-working days:

With AxG2antt1.Chart
    .NonworkingDays = 2 ^ (EXG2ANTTLib.WeekDayEnum.exSunday) Or 2 ^ (EXG2ANTTLib.WeekDayEnum.exMonday)
End With

The following C# sample retrieves the value to indicate Sunday and Monday as being non-working days:

axG2antt1.Chart.NonworkingDays = 1 << (Convert.ToInt32(EXG2ANTTLib.WeekDayEnum.exSunday) ) | 1 << (Convert.ToInt32(EXG2ANTTLib.WeekDayEnum.exMonday));

The following VFP sample retrieves the value to indicate Sunday and Monday as being non-working days:

with thisform.G2antt1.Chart
	.NonworkingDays = 2 ^ 0 + 2 ^ 1
endwith