property Chart.IsDateVisible (Date as Variant) as Boolean
Specifies whether the date fits the control's chart area.

TypeDescription
Date as Variant A Date expression being queried 
Boolean A Boolean expression that indicates whether the date fits the chart's area. 
The IsDateVisible property specifies whether a date is visible or hidden. Use the FirstVisibleDate property to specify the first visible date in the chart's area. The DateChange event notifies your application whether the chart changes it's first visible date, or whether the user browses a new area in the  chart.

The following VB sample enumerates all visible dates:

With G2antt1
    .BeginUpdate
    With .Chart
        Dim d As Date
        d = .FirstVisibleDate
        Do While .IsDateVisible(d)
            If Day(d) = 11 Then
                If Not (.IsNonworkingDate(d)) Then
                    .AddNonworkingDate d
                End If
            End If
            d = .NextDate(d, exDay, 1)
        Loop
    End With
    .EndUpdate
End With

The following VB.NET sample enumerates all visible dates:

With AxG2antt1
    .BeginUpdate()
    With .Chart
        Dim d As Date
        d = .FirstVisibleDate
        Do While .IsDateVisible(d)
            If d.Day = 11 Then
                If Not (.IsNonworkingDate(d)) Then
                    .AddNonworkingDate(d)
                End If
            End If
            d = .NextDate(d, EXG2ANTTLib.UnitEnum.exDay, 1)
        Loop
    End With
    .EndUpdate()
End With

The following C# sample enumerates all visible dates:

axG2antt1.BeginUpdate();
EXG2ANTTLib.Chart chart = axG2antt1.Chart;
DateTime d = Convert.ToDateTime(chart.FirstVisibleDate);
while ( chart.get_IsDateVisible(d) )
{
	if ( d.Day == 11 )
		if ( !chart.get_IsNonworkingDate( d ) )
			chart.AddNonworkingDate(d);
	d = chart.get_NextDate(d, EXG2ANTTLib.UnitEnum.exDay, 1);
}
axG2antt1.EndUpdate();

The following VFP sample enumerates all visible dates:

With thisform.G2antt1
    .BeginUpdate
    With .Chart
        local d
        d = .FirstVisibleDate
        Do While .IsDateVisible(d)
            If Day(d) = 11 Then
                If Not (.IsNonworkingDate(d)) Then
                    .AddNonworkingDate(d)
                EndIf
            EndIf
            d = .NextDate(d, 4096, 1)
        enddo
    EndWith
    .EndUpdate
EndWith