Class: Level

Level(oLevels, oLevel)

new Level(oLevels, oLevel)

The Level object describes a level in the chart. The Level(index) method retrieves the level based on its index.

Every option of the LevelOptions type has associated a property of the Level object. For instance, the option:

label {string}, indicates the format to display the level's label
is associated with the property:
Label {string}, indicates the format to display the level's label
which means that the following statements are equivalent:
oLevel.Options = {label: "<%yyyy%>"}
oLevel.SetOptions({label: "<%yyyy%>"})
oLevel.Label = "<%yyyy%>"
oLevel.SetLabel("<%yyyy%>")
where oLevel is an object of Level type
Parameters:
Name Type Description
oLevels Levels Indicates the owner collection of the level, as an object of Levels type
oLevel Level Specifies a level to copy data from, as an object of Level type

Methods

GetAlign() → {exontrol.AlignEnum}

The GetAlign() method gets the label's alignment
Returns:
Returns the label's alignment The exontrol.AlignEnum type supports the following values:
  • exAlignTop (0x00), justifies the object to the top of the rectangle
  • exAlignLeft (0x00), aligns object to the left
  • exAlignCenter (0x01), centers object horizontally in the rectangle
  • exAlignRight (0x02), aligns object to the right
  • exAlignVCenter (0x04), centers object vertically
  • exAlignBottom (0x08), justifies the object to the bottom of the rectangle
Type
exontrol.AlignEnum

GetCount() → {number}

The GetCount() method gets the count of unit-scale within the level to display at once
Returns:
Returns the count of unit-scale within the level to display at once.
Type
number

GetDrawGridLines() → {boolean}

The GetDrawGridLines() method specifies whether the grid lines are visible for the current level (the grid lines are shown in the items section only)
Returns:
Returns true, if the grid lines are visible for the current level
Type
boolean

GetDrawTickLines() → {Gantt.LevelLineEnum}

The GetDrawTickLines() method specifies whether the tick lines are visible for the current level (the tick lines are shown in the header section only)
Returns:
Returns the level's tick lines The exontrol.Gantt.LevelLineEnum type supports the following values and flags:
  • exLevelNoLine(0), no line is shown
  • exLevelDefaultLine(-1), indicates the default grid line style
  • exLevelDotLine(1), indicates a dotted line. For vertical/tick lines, it can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine. Can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine option.
  • exLevelSolidLine(2), indicates a solid line. For vertical/tick lines, it can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine. Can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine option.
  • exLevelLowerHalf(0x10), indicates that the line is shown in the lower half of the level. For vertical/tick lines, it can be combined with exLevelDotLine or exLevelSolidLine
  • exLevelUpperHalf(0x20), indicates that the line is shown in the upper half of the level. For vertical/tick lines, it can be combined with exLevelDotLine or exLevelSolidLine
  • exLevelMiddleLine(0x40), indicates that the line is shown in the middle. For vertical/tick lines, it can be combined with exLevelDotLine or exLevelSolidLine
  • exLevelQuarterHeight(0x100), indicates that the line is shown as a quarter of the full height. Specify the exLevelQuarterHeight option to show shorter tick lines in the chart's level. Can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine option
Type
Gantt.LevelLineEnum

GetDrawTickLinesFrom() → {string}

The GetDrawTickLinesFrom() method specifies whether the level shows tick lines from another level
Returns:
Indicates two-values separated by comma character as "level,type" format, where:
  • level {number}, specifies the index of the level to show additional tick lines from
  • type {Gantt.LevelLineEnum}, specifies the type of tick lines to display
Type
string

GetFormatLabel() → {string}

The GetFormatLabel() method gets the format to display the level's label.
Returns:
Returns the expression to display the level's label. The expression supports the following keywords:
"value", gets the label of the level (string) as provided with no format
"dvalue", indicates the date-time value of the unit in the label to format
Type
string

GetLabel() → {string}

The GetLabel() method indicates the format to display the level's label.
Returns:
Returns the format to display the level's label. The label field supports alternative HTML labels being separated by "<|>" and values for Count and Unit being separated by "<||>". By alternate HTML label we mean that you can define a list of HTML labels that may be displayed in the chart's header based on the space allocated for the time-unit. In other words, the control chooses automatically the alternate HTML label to be displayed for best fitting in the portion of the chart where the time-unit should be shown.

The label field format is "ALT1[<|>ALT2<|>...[<||>COUNT[<||>UNIT]]]" where

ALT defines a HTML label
COUNT specifies the value for the count field
UNIT field indicates the value for the unit field
(the parts delimited by [] brackets may miss)

The ALT part of the label supports ex-HTLM tags such as (<b>, <i>, <fgcolor>, ...) and <%DATE%> tags as follows:

  • <%d%> - Day of the month in one or two numeric digits, as needed (1 to 31)
  • <%dd%> - Day of the month in two numeric digits (01 to 31)
  • <%d1%> - First letter of the weekday (S to S)
  • <%loc_d1%> - Indicates day of week as a one-letter abbreviation using the current user settings
  • <%d2%> - First two letters of the weekday (Su to Sa)
  • <%loc_d2%> - Indicates day of week as a two-letters abbreviation using the current user settings
  • <%d3%> - First three letters of the weekday (Sun to Sat)
  • <%loc_d3%> equivalent with <%loc_ddd%>
  • <%ddd%> - First three letters of the weekday (Sun to Sat)
  • <%loc_ddd%> - Indicates the day of week as a three-letter abbreviation using the current user regional and language settings
  • <%dddd%> - Full name of the weekday (Sunday to Saturday)
  • <%loc_dddd%> - Indicates day of week as its full name using the current user regional and language settings
  • <%i%> - Displays the number instead the date
  • <%w%> - Day of the week (1 to 7)
  • <%ww%> - Week of the year (1 to 53)
  • <%m%> - Month of the year in one or two numeric digits, as needed (1 to 12)
  • <%mr%> - Month of the year in Roman numerals, as needed (I to XII)
  • <%mm%> - Month of the year in two numeric digits (01 to 12)
  • <%m1%> - First letter of the month (J to D)
  • <%loc_m1%> - Indicates month as a one-letter abbreviation using the current user settings
  • <%m2%> - First two letters of the month (Ja to De)
  • <%loc_m2%> - Indicates month as a two-letters abbreviation using the current user settings
  • <%m3%> - First three letters of the month (Jan to Dec)
  • <%loc_m3%> - equivalent with <%loc_mmm%>
  • <%mmm%> - First three letters of the month (Jan to Dec)
  • <%loc_mmm%> - Indicates month as a three-letter abbreviation using the current user regional and language settings
  • <%mmmm%> - Full name of the month (January to December)
  • <%loc_mmmm%> - Indicates month as its full name using the current user regional and language settings
  • <%q%> - Date displayed as the quarter of the year (1 to 4)
  • <%y%> - Number of the day of the year (1 to 366)
  • <%yy%> - Last two digits of the year (01 to 99)
  • <%yyyy%> - Full year (0100 to 9999)
  • <%hy%> - Date displayed as the half of the year (1 to 2)
  • <%loc_g%> - Indicates period/era using the current user regional and language settings
  • <%loc_gg%> - Indicates period/era using the current user regional and language settings
  • <%loc_sdate%> - Indicates the date in the short format using the current user regional and language settings
  • <%loc_ldate%> - Indicates the date in the long format using the current user regional and language settings
  • <%loc_dsep%> - Indicates the date separator using the current user regional and language settings (/)
  • <%h%> - Hour in one or two digits, as needed (0 to 23)
  • <%hh%> - Hour in two digits (00 to 23)
  • <%h12%> - Hour in 12-hour time format, in one or two digits - [0(12),11]
  • <%hh12%> - Hour in 12-hour time format, in two digits - [00(12),11]
  • <%n%> - Minute in one or two digits, as needed (0 to 59)
  • <%nn%> - Minute in two digits (00 to 59)
  • <%s%> - Second in one or two digits, as needed (0 to 59)
  • <%ss%> - Second in two digits (00 to 59)
  • <%AM/PM%> - Twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
  • <%loc_AM/PM%> - Indicates the time marker such as AM or PM using the current user regional and language settings
  • <%loc_A/P%> - Indicates the one character time marker such as A or P using the current user regional and language settings
  • <%loc_time%> - Indicates the time using the current user regional and language settings
  • <%loc_time24%> - Indicates the time in 24 hours format without a time marker using the current user regional and language settings
  • <%loc_tsep%> - indicates the time separator using the current user regional and language settings (:)
  • <%loc_y%> - Represents the Year only by the last digit, using current regional settings
  • <%loc_yy%> - Represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years
  • <%loc_yyyy%> - Represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Type
string

GetOptions() → {object}

The GetOptions() method returns the options of the chart's level
Returns:
An object of LevelOptions type that indicates the options of the chart's level
Type
object
Example
The following statements are equivalents:

 oLevel.GetOptions(), returns the options of the chart's level
 oLevel.Options, returns the options of the chart's level

where oLevel is an object of Level type

GetShape() → {any}

The GetShape() method gets the level's shape
Returns:
Returns the level's shape, as any of the following:
  • the shape's name within the exontrol.Shape.Tree or exontrol.Shape namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the column itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
Type
any

GetToolTip() → {string}

The GetToolTip() method gets the expression to define the level's tooltip.
Returns:
Gets the expression that defines the level's tooltip. The expression supports ex-HTLM tags such as (<b>, <i>, <fgcolor>, ...) and <%DATE%> tags as follows:
  • <%d%> - Day of the month in one or two numeric digits, as needed (1 to 31)
  • <%dd%> - Day of the month in two numeric digits (01 to 31)
  • <%d1%> - First letter of the weekday (S to S)
  • <%loc_d1%> - Indicates day of week as a one-letter abbreviation using the current user settings
  • <%d2%> - First two letters of the weekday (Su to Sa)
  • <%loc_d2%> - Indicates day of week as a two-letters abbreviation using the current user settings
  • <%d3%> - First three letters of the weekday (Sun to Sat)
  • <%loc_d3%> equivalent with <%loc_ddd%>
  • <%ddd%> - First three letters of the weekday (Sun to Sat)
  • <%loc_ddd%> - Indicates the day of week as a three-letter abbreviation using the current user regional and language settings
  • <%dddd%> - Full name of the weekday (Sunday to Saturday)
  • <%loc_dddd%> - Indicates day of week as its full name using the current user regional and language settings
  • <%i%> - Displays the number instead the date
  • <%w%> - Day of the week (1 to 7)
  • <%ww%> - Week of the year (1 to 53)
  • <%m%> - Month of the year in one or two numeric digits, as needed (1 to 12)
  • <%mr%> - Month of the year in Roman numerals, as needed (I to XII)
  • <%mm%> - Month of the year in two numeric digits (01 to 12)
  • <%m1%> - First letter of the month (J to D)
  • <%loc_m1%> - Indicates month as a one-letter abbreviation using the current user settings
  • <%m2%> - First two letters of the month (Ja to De)
  • <%loc_m2%> - Indicates month as a two-letters abbreviation using the current user settings
  • <%m3%> - First three letters of the month (Jan to Dec)
  • <%loc_m3%> - equivalent with <%loc_mmm%>
  • <%mmm%> - First three letters of the month (Jan to Dec)
  • <%loc_mmm%> - Indicates month as a three-letter abbreviation using the current user regional and language settings
  • <%mmmm%> - Full name of the month (January to December)
  • <%loc_mmmm%> - Indicates month as its full name using the current user regional and language settings
  • <%q%> - Date displayed as the quarter of the year (1 to 4)
  • <%y%> - Number of the day of the year (1 to 366)
  • <%yy%> - Last two digits of the year (01 to 99)
  • <%yyyy%> - Full year (0100 to 9999)
  • <%hy%> - Date displayed as the half of the year (1 to 2)
  • <%loc_g%> - Indicates period/era using the current user regional and language settings
  • <%loc_gg%> - Indicates period/era using the current user regional and language settings
  • <%loc_sdate%> - Indicates the date in the short format using the current user regional and language settings
  • <%loc_ldate%> - Indicates the date in the long format using the current user regional and language settings
  • <%loc_dsep%> - Indicates the date separator using the current user regional and language settings (/)
  • <%h%> - Hour in one or two digits, as needed (0 to 23)
  • <%hh%> - Hour in two digits (00 to 23)
  • <%h12%> - Hour in 12-hour time format, in one or two digits - [0(12),11]
  • <%hh12%> - Hour in 12-hour time format, in two digits - [00(12),11]
  • <%n%> - Minute in one or two digits, as needed (0 to 59)
  • <%nn%> - Minute in two digits (00 to 59)
  • <%s%> - Second in one or two digits, as needed (0 to 59)
  • <%ss%> - Second in two digits (00 to 59)
  • <%AM/PM%> - Twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
  • <%loc_AM/PM%> - Indicates the time marker such as AM or PM using the current user regional and language settings
  • <%loc_A/P%> - Indicates the one character time marker such as A or P using the current user regional and language settings
  • <%loc_time%> - Indicates the time using the current user regional and language settings
  • <%loc_time24%> - Indicates the time in 24 hours format without a time marker using the current user regional and language settings
  • <%loc_tsep%> - indicates the time separator using the current user regional and language settings (:)
  • <%loc_y%> - Represents the Year only by the last digit, using current regional settings
  • <%loc_yy%> - Represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years
  • <%loc_yyyy%> - Represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Type
string

GetUnit() → {exontrol.UnitEnum}

The GetUnit() method gets the level's unit-scale.
Returns:
Returns the level's unit-scale. The exontrol.UnitEnum type support the following values:
  • exYear (0), indicates the year scale
  • exHalfYear (1), indicates the half-year scale
  • exQuarterYear (2), indicates the quarter-year scale
  • exMonth (0x10), indicates the month scale
  • exThirdMonth (0x11), indicates the third-month scale
  • exWeek (0x100), indicates the week scale
  • exDay (0x1000), indicates the day scale
  • exHour (0x10000), indicates the hour scale
  • exMinute (0x100000), indicates the minute scale
  • exSecond (0x1000000), indicates the second scale
Type
exontrol.UnitEnum

SetAlign(value)

The SetAlign() method sets the label's alignment
Parameters:
Name Type Description
value exontrol.AlignEnum Specifies the label's alignment. The align property supports additional flags as follows: The exontrol.AlignEnum type supports the following values:
  • exAlignTop (0x00), justifies the object to the top of the rectangle
  • exAlignLeft (0x00), aligns object to the left
  • exAlignCenter (0x01), centers object horizontally in the rectangle
  • exAlignRight (0x02), aligns object to the right
  • exAlignVCenter (0x04), centers object vertically
  • exAlignBottom (0x08), justifies the object to the bottom of the rectangle
Example
null {null}, centers the label for the base level, and aligns to left for any other (equivalent of 0x15)
4 (0x04) {number}, vertical centers the label, and left aligns the label
24 (0x16) {number}, vertical centers the label, and right aligns the label (inside the chart)

SetCount(value)

The SetCount() method sets the count of unit-scale within the level to display at once
Parameters:
Name Type Description
value number Specifies the count of unit-scale within the level to display at once.
Example
2 {number}, specifies that the level displays every second time-unit

SetDrawGridLines(value)

The SetDrawGridLines() method shows or hides the grid lines for the current level (the grid lines are shown in the items section only)
Parameters:
Name Type Description
value boolean Specifies whether the grid lines are visible for the current level
Example
true {boolean}, shows the grid lines for the current level

SetDrawTickLines(value)

The SetDrawTickLines() method shows or hides the tick lines for the current level (the tick lines are shown in the header section only)
Parameters:
Name Type Description
value Gantt.LevelLineEnum Specifies whether the tick lines are visible for the current level The exontrol.Gantt.LevelLineEnum type supports the following values and flags:
  • exLevelNoLine(0), no line is shown
  • exLevelDefaultLine(-1), indicates the default grid line style
  • exLevelDotLine(1), indicates a dotted line. For vertical/tick lines, it can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine. Can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine option.
  • exLevelSolidLine(2), indicates a solid line. For vertical/tick lines, it can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine. Can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine option.
  • exLevelLowerHalf(0x10), indicates that the line is shown in the lower half of the level. For vertical/tick lines, it can be combined with exLevelDotLine or exLevelSolidLine
  • exLevelUpperHalf(0x20), indicates that the line is shown in the upper half of the level. For vertical/tick lines, it can be combined with exLevelDotLine or exLevelSolidLine
  • exLevelMiddleLine(0x40), indicates that the line is shown in the middle. For vertical/tick lines, it can be combined with exLevelDotLine or exLevelSolidLine
  • exLevelQuarterHeight(0x100), indicates that the line is shown as a quarter of the full height. Specify the exLevelQuarterHeight option to show shorter tick lines in the chart's level. Can be combined with exLevelLowerHalf, exLevelUpperHalf or exLevelMiddleLine option
Example
0 or exontrol.Gantt.LevelLineEnum.exLevelNoLine {number}, hides the level's tick lines
 0x22 or exontrol.Gantt.LevelLineEnum.exLevelSolidLine | exontrol.Gantt.LevelLineEnum.exLevelUpperHalf {number}, shows the level's tick lines in the upper-half as solid lines

SetDrawTickLinesFrom(value)

The SetDrawTickLinesFrom() method shows additional tick lines from a different level (chart's header only)
Parameters:
Name Type Description
value string Indicates two-values separated by comma character as "level,type" format, where:
  • level {number}, specifies the index of the level to show additional tick lines from
  • type {Gantt.LevelLineEnum}, specifies the type of tick lines to display
Example
"0,2" {string}, displays additional tick-lines from level (0-index) as solid lines(exLevelSolidLine(2))

SetFormatLabel(value)

The SetFormatLabel() method defines the format to display the level's label
Parameters:
Name Type Description
value string Specifies the expression/formula to display the level's label. The expression supports the following keywords:
  • "value", gets the label of the level (string) as provided with no format
  • "dvalue", indicates the date-time value of the unit in the label to format
Example
"weekday(dvalue) = 1 ? (`<bgcolor 000000><fgcolor FFFFFF> ` + value + ` `) : value", shows every Monday in black and white
 "((weekday(dvalue) in (0,6)) ? `<fgcolor 808080>` : ``) + value" {string}, shows every Saturday and Sunday in gray

SetLabel(label)

The SetLabel() method defines the format to display the level's label
Parameters:
Name Type Description
label any The label parameter could be any of the following:
  • {string}, specifies alternate-labels of "ALT1[<|>ALT2<|>...[<||>COUNT[<||>UNIT]]]" format (as explained by [GetLabel()] Level#GetLabel method)
  • {exontrol.UnitEnum}, specifies the unit-scale to get label from (Chart.Label(unit) property)
  • {object}, indicates an object of {l(abel),u(nit),c(ount)} type as explained:
    • l(abel) {string}, specifies alternate-labels of "ALT1[<|>ALT2<|>...[<||>COUNT[<||>UNIT]]]" format (as explained by [GetLabel()] Level#GetLabel method)
    • u(nit) {exontrol.UnitEnum}, specifies the level's unit-scale
    • c(ount) {number}, specifies the level's count of unit-scale to display at once.
Example
"" {string}, displays no label
"<|><%d1%><|><%d2%><|><%d3%><|><%dddd%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||>1<||>4096" {string}, indicates a list of 7 alternate HTML labels, the Count property set on 1 and the Unit property set on exDay (4096)

SetOptions(nOptions)

The SetOptions() method applies new options to the chart's level
Parameters:
Name Type Description
nOptions object Indicates an object of LevelOptions type that specifies the new options to apply

SetShape(value)

The SetShape() method sets the label's shape
Parameters:
Name Type Description
value any Specifies the label's shape, as any of the following:
  • the shape's name within the exontrol.Shape.Tree or exontrol.Shape namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the column itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
Example
"" {string}, null {null}, no shape is applied
 "red" {string}, fills the object's background in red (CSS color)
 '{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
 "xxx" {string}, indicates that exontrol.Shapes.Tree.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
 exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace

SetToolTip(value)

The SetToolTip() method sets the expression to define the level's tooltip.
Parameters:
Name Type Description
value string Specifies the expression to display the level's tooltip. The expression supports ex-HTLM tags such as (<b>, <i>, <fgcolor>, ...) and <%DATE%> tags as follows:
  • <%d%> - Day of the month in one or two numeric digits, as needed (1 to 31)
  • <%dd%> - Day of the month in two numeric digits (01 to 31)
  • <%d1%> - First letter of the weekday (S to S)
  • <%loc_d1%> - Indicates day of week as a one-letter abbreviation using the current user settings
  • <%d2%> - First two letters of the weekday (Su to Sa)
  • <%loc_d2%> - Indicates day of week as a two-letters abbreviation using the current user settings
  • <%d3%> - First three letters of the weekday (Sun to Sat)
  • <%loc_d3%> equivalent with <%loc_ddd%>
  • <%ddd%> - First three letters of the weekday (Sun to Sat)
  • <%loc_ddd%> - Indicates the day of week as a three-letter abbreviation using the current user regional and language settings
  • <%dddd%> - Full name of the weekday (Sunday to Saturday)
  • <%loc_dddd%> - Indicates day of week as its full name using the current user regional and language settings
  • <%i%> - Displays the number instead the date
  • <%w%> - Day of the week (1 to 7)
  • <%ww%> - Week of the year (1 to 53)
  • <%m%> - Month of the year in one or two numeric digits, as needed (1 to 12)
  • <%mr%> - Month of the year in Roman numerals, as needed (I to XII)
  • <%mm%> - Month of the year in two numeric digits (01 to 12)
  • <%m1%> - First letter of the month (J to D)
  • <%loc_m1%> - Indicates month as a one-letter abbreviation using the current user settings
  • <%m2%> - First two letters of the month (Ja to De)
  • <%loc_m2%> - Indicates month as a two-letters abbreviation using the current user settings
  • <%m3%> - First three letters of the month (Jan to Dec)
  • <%loc_m3%> - equivalent with <%loc_mmm%>
  • <%mmm%> - First three letters of the month (Jan to Dec)
  • <%loc_mmm%> - Indicates month as a three-letter abbreviation using the current user regional and language settings
  • <%mmmm%> - Full name of the month (January to December)
  • <%loc_mmmm%> - Indicates month as its full name using the current user regional and language settings
  • <%q%> - Date displayed as the quarter of the year (1 to 4)
  • <%y%> - Number of the day of the year (1 to 366)
  • <%yy%> - Last two digits of the year (01 to 99)
  • <%yyyy%> - Full year (0100 to 9999)
  • <%hy%> - Date displayed as the half of the year (1 to 2)
  • <%loc_g%> - Indicates period/era using the current user regional and language settings
  • <%loc_gg%> - Indicates period/era using the current user regional and language settings
  • <%loc_sdate%> - Indicates the date in the short format using the current user regional and language settings
  • <%loc_ldate%> - Indicates the date in the long format using the current user regional and language settings
  • <%loc_dsep%> - Indicates the date separator using the current user regional and language settings (/)
  • <%h%> - Hour in one or two digits, as needed (0 to 23)
  • <%hh%> - Hour in two digits (00 to 23)
  • <%h12%> - Hour in 12-hour time format, in one or two digits - [0(12),11]
  • <%hh12%> - Hour in 12-hour time format, in two digits - [00(12),11]
  • <%n%> - Minute in one or two digits, as needed (0 to 59)
  • <%nn%> - Minute in two digits (00 to 59)
  • <%s%> - Second in one or two digits, as needed (0 to 59)
  • <%ss%> - Second in two digits (00 to 59)
  • <%AM/PM%> - Twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
  • <%loc_AM/PM%> - Indicates the time marker such as AM or PM using the current user regional and language settings
  • <%loc_A/P%> - Indicates the one character time marker such as A or P using the current user regional and language settings
  • <%loc_time%> - Indicates the time using the current user regional and language settings
  • <%loc_time24%> - Indicates the time in 24 hours format without a time marker using the current user regional and language settings
  • <%loc_tsep%> - indicates the time separator using the current user regional and language settings (:)
  • <%loc_y%> - Represents the Year only by the last digit, using current regional settings
  • <%loc_yy%> - Represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years
  • <%loc_yyyy%> - Represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Example
"<%ddd%> <%m%>/<%d%>/<%yyyy%>" displays the level's date such as "Sun 12/2/2007"

SetUnit(value)

The SetUnit() method sets the level's unit-scale.
Parameters:
Name Type Description
value exontrol.UnitEnum An exontrol.UnitEnum expression that indicates the level's time unit. The exontrol.UnitEnum type support the following values:
  • exYear (0), indicates the year scale
  • exHalfYear (1), indicates the half-year scale
  • exQuarterYear (2), indicates the quarter-year scale
  • exMonth (0x10), indicates the month scale
  • exThirdMonth (0x11), indicates the third-month scale
  • exWeek (0x100), indicates the week scale
  • exDay (0x1000), indicates the day scale
  • exHour (0x10000), indicates the hour scale
  • exMinute (0x100000), indicates the minute scale
  • exSecond (0x1000000), indicates the second scale
Example
4096 or exontrol.UnitEnum.exDay {number}, indicates that the level displays days