

| Type | Description | |||
| StartDate as Date | A Date expression that indicates the start date. | |||
| EndDate as Date | A Date expression that indicates the end date. | |||
| ChangeUnitWidth as Variant | A Boolean expression that indicates whether the Zoom method may change the UnitWidth property., If missing, the ChangeUnitWidth parameter is True. |
When zooming

The following VB sample zooms the chart to display one week:
With G2antt1.Chart
.Label(exThirdMonth) = ""
.Label(exDay) = "<%d%>/<%m%>"
.Zoom .FirstVisibleDate, .NextDate(.FirstVisibleDate, exWeek), True
End With
The following C++ sample zooms the chart to display one week:
CChart chart = m_g2antt.GetChart(); chart.SetLabel(17 /*exThirdMonth*/, "" ); chart.SetLabel(4096 /*exDay*/, "<%d%>/<%m%>" ); chart.Zoom( V2D( &chart.GetFirstVisibleDate() ), chart.GetNextDate( V2D( &chart.GetFirstVisibleDate() ), 256, COleVariant( (long)1 ) ), COleVariant( (long)TRUE ) );
The following VB.NET sample zooms the chart to display one week:
With AxG2antt1.Chart
.Label(EXG2ANTTLib.UnitEnum.exThirdMonth) = ""
.Label(EXG2ANTTLib.UnitEnum.exDay) = "<%d%>/<%m%>"
.Zoom(.FirstVisibleDate, .NextDate(.FirstVisibleDate, EXG2ANTTLib.UnitEnum.exWeek), True)
End WithThe following C# sample zooms the chart to display one week:
EXG2ANTTLib.Chart chart = axG2antt1.Chart; chart.set_Label(EXG2ANTTLib.UnitEnum.exThirdMonth, ""); chart.set_Label(EXG2ANTTLib.UnitEnum.exDay, "<%d%>/<%m%>"); chart.Zoom(Convert.ToDateTime( chart.FirstVisibleDate ), chart.get_NextDate(Convert.ToDateTime(chart.FirstVisibleDate), EXG2ANTTLib.UnitEnum.exWeek, 1), true);
The following VFP sample zooms the chart to display one week:
With thisform.G2antt1.Chart
.Label(17) = "" && exThirdMonth
.Label(4096) = "<%d%>/<%m%>" && exDay
.Zoom(.FirstVisibleDate, .NextDate(.FirstVisibleDate, 256), .t.) && exWeek
EndWith