Type | Description | |||
UnitEnum | An UnitEnum expression that indicates the level's time unit. |
The first level displays the month, the year and the number of the week in the year , the second level displays the name of the week day, and the third level displays the day of the month. The LevelCount property specifies the number of levels being displayed, in our case 3.
The following Template shows how to display your header using three levels as arranged in the picture above ( just copy and paste the following script to Template page ):
BeginUpdate() Chart { LevelCount = 3 Level(0) { Label = "<b><%mmm%>, <%yyyy%></b> <r>Week: <%ww%>" Unit = 256 'exWeek } Level(1).Label = "<%d1%>" Level(2).Label = "<%d%>" } EndUpdate()
The following VB sample displays your header using 3 levels as shown above:
With Gantt1 .BeginUpdate With .Chart .LevelCount = 3 With .Level(0) .Label = "<b><%mmm%>, <%yyyy%></b> <r>Week: <%ww%>" .Unit = EXGANTTLibCtl.UnitEnum.exWeek End With .Level(1).Label = "<%d1%>" .Level(2).Label = "<%d%>" End With .EndUpdate End With
The following VFP sample displays your header using 3 levels:
with thisform.gantt1 .BeginUpdate() with .Chart .LevelCount = 3 with .Level(0) .Label = "<b><%mmm%>, <%yyyy%></b> <r>Week: <%ww%>" .Unit = 256 endwith .Level(1).Label = "<%d1%>" .Level(2).Label = "<%d%>" endwith .EndUpdate() endwith
The following VB.NET sample displays your header using 3 levels:
With AxGantt1 .BeginUpdate() With .Chart .LevelCount = 3 With .Level(0) .Label = "<b><%mmm%>, <%yyyy%></b> <r>Week: <%ww%>" .Unit = EXGANTTLib.UnitEnum.exWeek End With .Level(1).Label = "<%d1%>" .Level(2).Label = "<%d%>" End With .EndUpdate() End With
The following C# sample displays your header using 3 levels:
axGantt1.BeginUpdate(); EXGANTTLib.Chart chart = axGantt1.Chart; chart.LevelCount = 3; chart.get_Level(0).Label = "<b><%mmm%>, <%yyyy%></b> <r>Week: <%ww%>"; chart.get_Level(0).Unit = EXGANTTLib.UnitEnum.exWeek; chart.get_Level(1).Label = "<%d1%>"; chart.get_Level(2).Label = "<%d%>"; axGantt1.EndUpdate();
The following C++ sample displays your header using 3 levels:
m_gantt.BeginUpdate(); CChart chart = m_gantt.GetChart(); chart.SetLevelCount( 3 ); chart.GetLevel(0).SetLabel(COleVariant( "<b><%mmm%>, <%yyyy%></b> <r>Week: <%ww%>" )); chart.GetLevel(0).SetUnit(256); chart.GetLevel(1).SetLabel(COleVariant( "<%d1%>" )); chart.GetLevel(2).SetLabel(COleVariant( "<%d%>" )); m_gantt.EndUpdate();