Type | Description | |||
Long | A long expression that indicates the non-working days in a week. |
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