

| Type | Description | |||
| UnitEnum | A UnitEnum expression that specifies the time scale unit being used to display the inside units. |
The following screen shot splits the time scale chart, and displays different sections using different time scale units ( the chart displays months, the January displays weeks, while the March displays days ):

The following screen shot shows the chart displays week numbers:
The following screen shot shows the week days once a week gets expanded/magnified ( the chart displays weeks ):
With G2antt1 .BeginUpdate With .Chart .ShowNonworkingDates = False .PaneWidth(0) = 0 .LevelCount = 2 With .Level(0) .Label = "<%mmmm%>" .Unit = exMonth End With With .Level(1) .Label = "<%ww%>" .Unit = exWeek End With .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True With .DefaultInsideZoomFormat .OwnerLabel = "<font ;7><%mmm%> Week: <%ww%>" .InsideLabel = "<font ;7><b><%d1%></b>" .InsideUnit = exDay End With With .InsideZooms .SplitBaseLevel = False .Add #2/3/2008# End With End With .EndUpdate End WithThe following VB.NET sample shows how can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days ):
With AxG2antt1 .BeginUpdate With .Chart .ShowNonworkingDates = False .PaneWidth(0) = 0 .LevelCount = 2 With .Level(0) .Label = "<%mmmm%>" .Unit = EXG2ANTTLib.UnitEnum.exMonth End With With .Level(1) .Label = "<%ww%>" .Unit = EXG2ANTTLib.UnitEnum.exWeek End With .FirstVisibleDate = #1/1/2008# .AllowInsideZoom = True With .DefaultInsideZoomFormat .OwnerLabel = "<font ;7><%mmm%> Week: <%ww%>" .InsideLabel = "<font ;7><b><%d1%></b>" .InsideUnit = EXG2ANTTLib.UnitEnum.exDay End With With .InsideZooms .SplitBaseLevel = False .Add #2/3/2008# End With End With .EndUpdate End WithThe following C++ sample shows how can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days ):
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
var_Chart->PutPaneWidth(0,0);
var_Chart->PutLevelCount(2);
EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
var_Level->PutLabel("<%mmmm%>");
var_Level->PutUnit(EXG2ANTTLib::exMonth);
EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
var_Level1->PutLabel("<%ww%>");
var_Level1->PutUnit(EXG2ANTTLib::exWeek);
var_Chart->PutFirstVisibleDate("1/1/2008");
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
var_InsideZoomFormat->PutOwnerLabel(L"<font ;7><%mmm%> Week: <%ww%>");
var_InsideZoomFormat->PutInsideLabel(L"<font ;7><b><%d1%></b>");
var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exDay);
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
var_InsideZooms->Add("2/3/2008");
spG2antt1->EndUpdate();
The following C# sample shows how can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days ):
axG2antt1.BeginUpdate();
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart;
var_Chart.ShowNonworkingDates = false;
var_Chart.set_PaneWidth(0 != 0,0);
var_Chart.LevelCount = 2;
EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0);
var_Level.Label = "<%mmmm%>";
var_Level.Unit = EXG2ANTTLib.UnitEnum.exMonth;
EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1);
var_Level1.Label = "<%ww%>";
var_Level1.Unit = EXG2ANTTLib.UnitEnum.exWeek;
var_Chart.FirstVisibleDate = "1/1/2008";
var_Chart.AllowInsideZoom = true;
EXG2ANTTLib.InsideZoomFormat var_InsideZoomFormat = var_Chart.DefaultInsideZoomFormat;
var_InsideZoomFormat.OwnerLabel = "<font ;7><%mmm%> Week: <%ww%>";
var_InsideZoomFormat.InsideLabel = "<font ;7><b><%d1%></b>";
var_InsideZoomFormat.InsideUnit = EXG2ANTTLib.UnitEnum.exDay;
EXG2ANTTLib.InsideZooms var_InsideZooms = var_Chart.InsideZooms;
var_InsideZooms.SplitBaseLevel = false;
var_InsideZooms.Add("2/3/2008");
axG2antt1.EndUpdate();
The following VFP sample shows how can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days ):
with thisform.G2antt1
.BeginUpdate
with .Chart
.ShowNonworkingDates = .F.
.PaneWidth(0) = 0
.LevelCount = 2
with .Level(0)
.Label = "<%mmmm%>"
.Unit = 16
endwith
with .Level(1)
.Label = "<%ww%>"
.Unit = 256
endwith
.FirstVisibleDate = {^2008-1-1}
.AllowInsideZoom = .T.
with .DefaultInsideZoomFormat
.OwnerLabel = "<font ;7><%mmm%> Week: <%ww%>"
.InsideLabel = "<font ;7><b><%d1%></b>"
.InsideUnit = 4096
endwith
with .InsideZooms
.SplitBaseLevel = .F.
.Add({^2008-2-3})
endwith
endwith
.EndUpdate
endwith