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 Gantt1.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_gantt.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 AxGantt1.Chart .Label(EXGANTTLib.UnitEnum.exThirdMonth) = "" .Label(EXGANTTLib.UnitEnum.exDay) = "<%d%>/<%m%>" .Zoom(.FirstVisibleDate, .NextDate(.FirstVisibleDate, EXGANTTLib.UnitEnum.exWeek), True) End With
The following C# sample zooms the chart to display one week:
EXGANTTLib.Chart chart = axGantt1.Chart; chart.set_Label(EXGANTTLib.UnitEnum.exThirdMonth, ""); chart.set_Label(EXGANTTLib.UnitEnum.exDay, "<%d%>/<%m%>"); chart.Zoom(Convert.ToDateTime( chart.FirstVisibleDate ), chart.get_NextDate(Convert.ToDateTime(chart.FirstVisibleDate), EXGANTTLib.UnitEnum.exWeek, 1), true);
The following VFP sample zooms the chart to display one week:
With thisform.Gantt1.Chart .Label(17) = "" && exThirdMonth .Label(4096) = "<%d%>/<%m%>" && exDay .Zoom(.FirstVisibleDate, .NextDate(.FirstVisibleDate, 256), .t.) && exWeek EndWith