property Chart.NonworkingHours as Long
Retrieves or sets a value that indicates the non-working hours, for each hour in a day a bit.

 TypeDescription 
   Long A Long expression that indicates the non-working hours in a day.  
By default, the NonworkingHours property is 0, that indicates all hours in a day are working hours. The non-working hours are shown using the NonworkingHoursPattern and the NonworkingHoursColor which defines the pattern and the color, when the base level of the chart displays hours, if the ShowNonworkingUnits property is True ( by default ).  Use the ShowNonworkingUnits property to show or hide the non-working units as hours or days in your chart.

Every bit from the less significant bit, in the NonworkingHours property specifies whether the hour is a not-working or working hour. For instance, if you want to highlight that only 9AM is a not-working hour, you should set the 10th bit in the property on 1 ( the hours starts from 0 to 23 ), and so the value for the NonworkingHours property is 512 ( which binary representation is 1000000000 ). The hours in the property starts from 0AM for the first less significant bit, 1AM for the second bit, like in the following table. 

For instance, if you need the representation of non-working hours from 6PM to 8AM, you need to set on 1 each representative bit in the NonworkingHours property, or to add corresponding values in the last row in the table for each non-working hours, so in this case the  NonworkingHours property is 16253183 or in binary 111110000000000011111111. For instance, if  the NonworkingHours property is 0 or  NonworkingHoursPattern is exPatternEmpty the not-working hours are not highlighted. Use the NonworkingDays property to specify non-working days. Use the Add("A:B") to add a bar that displays the bar A in the working area, and B in non-working areas.


Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.