new LevelOptions()
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 labelis associated with the property:
Label {string}, indicates the format to display the level's labelwhich means that the following statements are equivalent:
oLevel.Options = {label: "<%yyyy%>"}where oLevel is an object of Level type
oLevel.SetOptions({label: "<%yyyy%>"})
oLevel.Label = "<%yyyy%>"
oLevel.SetLabel("<%yyyy%>")
Members
(static) align
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
The align field is mapped to the Level.Align property, so the following statements are equivalent:
oLevel.Options = {align: exontrol.AlignEnum.exAlignRight}
oLevel.SetOptions({align: exontrol.AlignEnum.exAlignRight})
oLevel.Align = exontrol.AlignEnum.exAlignRight
oLevel.SetAlign(exontrol.AlignEnum.exAlignRight)
Example
null {null}, centers the label for the base level, and aligns to left for any other
2 {number}, right align the label
align
(static) count :number
The count field is mapped to the Level.Count property, so the following statements are equivalent:
oLevel.Options = {count: 2}
oLevel.SetOptions({count: 2})
oLevel.Count = 2
oLevel.SetCount(2)
Type:
- number
Example
2 {number}, specifies that the level displays every second time-unit
count
(static) drawGridLines :boolean
The drawGridLines field is mapped to the Level.DrawGridLines property, so the following statements are equivalent:
oLevel.Options = {drawGridLines: true}
oLevel.SetOptions({drawGridLines: true})
oLevel.DrawGridLines = true
oLevel.SetDrawGridLines(true)
Type:
- boolean
Example
true {boolean}, shows the grid lines for the current level
drawGridLines
(static) drawTickLines :Gantt.LevelLineEnum
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
The drawTickLines field is mapped to the Level.DrawTickLines property, so the following statements are equivalent:
oLevel.Options = {drawTickLines: exontrol.Gantt.LevelLineEnum.exLevelSolidLine | exontrol.Gantt.LevelLineEnum.exLevelUpperHalf}
oLevel.SetOptions({drawTickLines: exontrol.Gantt.LevelLineEnum.exLevelSolidLine | exontrol.Gantt.LevelLineEnum.exLevelUpperHalf})
oLevel.DrawTickLines = exontrol.Gantt.LevelLineEnum.exLevelSolidLine | exontrol.Gantt.LevelLineEnum.exLevelUpperHalf
oLevel.SetDrawTickLines(exontrol.Gantt.LevelLineEnum.exLevelSolidLine | exontrol.Gantt.LevelLineEnum.exLevelUpperHalf)
Type:
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
drawTickLines
(static) drawTickLinesFrom :string
The drawTickLinesFrom field 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
The drawTickLinesFrom field is mapped to the Level.DrawTickLinesFrom property, so the following statements are equivalent:
oLevel.Options = {drawTickLinesFrom: "2,1"}
oLevel.SetOptions({drawTickLinesFrom: "2,1"})
oLevel.DrawTickLinesFrom = "2,1"
oLevel.SetDrawTickLinesFrom("2,1")
Type:
- string
Example
"0,2" {string}, displays additional tick-lines from level (0-index) as solid lines(exLevelSolidLine(2))
drawTickLinesFrom
(static) formatLabel :string
The expression supports the following keywords:
"value" {string}, gets the label of the level as provided with no format
"dvalue" {Date}, indicates the date-time value of the unit in the label to format
The formatLabel field is mapped to the Level.FormatLabel property, so the following statements are equivalent:
oLevel.Options = {formatLabel: "weekday(dvalue) = 1 ? (`` + value + ` `) : value"}
oLevel.SetOptions({formatLabel: "weekday(dvalue) = 1 ? (`` + value + ` `) : value"})
oLevel.FormatLabel = "weekday(dvalue) = 1 ? (`` + value + ` `) : value"
oLevel.SetFormatLabel("weekday(dvalue) = 1 ? (`` + value + ` `) : value")
Type:
- string
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
formatLabel
(static) label :string
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(the parts delimited by [] brackets may miss)
COUNT specifies the value for the count field
UNIT field indicates the value for the unit field, representing a numeric value of exontrol.UnitEnum
The ALT part of the label supports ex-HTML tags such as (<b>, <i>, <fgcolor>, ...) and <%DATE%> tags as follows:
Name Description Sample (day-patterns) <%d%> Day of the month using one or two numeric digits, depending on the value 1 - 31 <%dd%> Day of the month using exactly two numeric digits 01 - 31 <%d1%> Weekday using its first letter S - S <%loc_d1%> Weekday as a single-letter abbreviation based on the current user settings S - S <%d2%> Weekday using its first two letters Su - Sa <%loc_d2%> Weekday as a two-letter abbreviation based on the current user settings Su - Sa <%d3%> Weekday using its first three letters Sun - Sat <%ddd%> Weekday using its first three letters Sun - Sat <%loc_d3%> Weekday as a three-letter abbreviation based on the current user regional and language settings; equivalent to <%loc_ddd%> Sun - Sat <%loc_ddd%> Weekday as a three-letter abbreviation based on the current user regional and language settings Sun - Sat <%dddd%> Full name of the weekday Sunday - Saturday <%loc_dddd%> Full weekday name based on the current user regional and language settings Sunday - Saturday <%w%> Numeric day of the week 1 - 7 <%y%> Numeric day of the year 1 - 366 (week-patterns) <%ww%> Week of the year 1 - 53 (month-patterns) <%m%> Month of the year using one or two numeric digits, as needed 1 - 12 <%mm%> Month of the year using exactly two numeric digits 01 - 12 <%mr%> Month of the year using Roman numerals, as needed I - XII <%m1%> Month using its first letter J - D <%loc_m1%> Month as a single-letter abbreviation based on the current user settings J - D <%m2%> Month using its first two letters Ja - De <%loc_m2%> Month as a two-letter abbreviation based on the current user settings Ja - De <%m3%> Month using its first three letters Jan - Dec <%mmm%> Month using its first three letters Jan - Dec <%loc_m3%> Month as a three-letter abbreviation based on the current user regional and language settings; equivalent to <%loc_mmm%> Jan - Dec <%loc_mmm%> Month as a three-letter abbreviation based on the current user regional and language settings Jan - Dec <%mmmm%> Full name of the month January - December <%loc_mmmm%> Full month name based on the current user regional and language settings January - December (year-patterns) <%q%> Date shown as the quarter of the year 1 - 4 <%hy%> Date shown as the half of the year 1 - 2 <%loc_y%> Year represented by the last digit only, based on the current regional settings 0 - 9 <%yy%> Last two digits of the year 01 - 99 <%loc_yy%> Year represented by the last two digits only, based on the current regional settings; a leading zero is added for single-digit years 01 - 99 <%yyyy%> Full year using four digits 0100 - 9999 <%loc_yyyy%> Year represented using four or five digits, depending on the calendar in use. Thai Buddhist and Korean calendars use five-digit years; the "yyyy" pattern displays five digits for these calendars and four digits for all other supported calendars. Calendars with single-digit or two-digit years, such as the Japanese Emperor era, are formatted differently: single-digit years include a leading zero (for example, "03"), two-digit years use two digits (for example, "13"), and no additional leading zeros are applied 0100 - 9999 <%i%> Numeric value displayed instead of a date, representing the number of milliseconds elapsed since the Unix Epoch, January 1, 1970, 00:00:00 UTC 1767085565940 (localized era-patterns) <%loc_g%> Period/era based on the current user regional and language settings A,B <%loc_gg%> Period/era based on the current user regional and language settings AD,BC (localized date-patterns) <%loc_sdate%> Date in short format based on the current user regional and language settings 12/31/2000 <%loc_ldate%> Date in long format based on the current user regional and language settings December 31, 2000 <%loc_dsep%> Date separator based on the current user regional and language settings / (time-patterns) <%h%> Hour in one or two digits, as needed 0 - 23 <%hh%> Hour in two digits 00 - 23 <%h12%> Hour in 12-hour format, in one or two digits 0/12 - 11 <%hh12%> Hour in 12-hour format, in two digits 00/12 - 11 <%n%> Minute in one or two digits, as needed 0 - 59 <%nn%> Minute in two digits 00 - 59 <%s%> Second in one or two digits, as needed 0 - 59 <%ss%> Second in two digits 00 - 59 <%AM/PM%> 12-hour clock with uppercase "AM" or "PM" as appropriate AM, PM (localized time-patterns) <%loc_AM/PM%> Time marker such as AM or PM based on the current user regional and language settings AM, PM <%loc_A/P%> Single-character time marker such as A or P based on the current user regional and language settings A, P <%loc_time%> Time based on the current user regional and language settings 1:30:15 PM <%loc_time24%> Time in 24-hour format without a time marker based on the current user regional and language settings 13:30:15 <%loc_tsep%> Time separator based on the current user regional and language settings :
The label is mapped to the Level.Label property, so the following statements are equivalent:
oLevel.Options = {label: "<%yyyy%>"}
oLevel.SetOptions({label: "<%yyyy%>"})
Level.Label = "<%yyyy%>"
Level.SetLabel("<%yyyy%>")
Type:
- string
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)
label
(static) shape :any
The shape field can be any of the following:
- the shape's name within the exontrol.Shapes.Tree or exontrol.Shapes 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
The shape field is mapped to the Level.Shape property, so the following statements are equivalent:
oLevel.Options = {shape: "red"}
oLevel.SetOptions({shape: "red"})
oLevel.Shape = "red"
oLevel.SetShape("red")
Type:
- any
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.Gantt.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)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
shape
(static) toolTip :string
The toolTip supports ex-HTML tags such as (<b>, <i>, <fgcolor>, ...) and <%DATE%> tags as follows:
Name Description Sample (day-patterns) <%d%> Day of the month using one or two numeric digits, depending on the value 1 - 31 <%dd%> Day of the month using exactly two numeric digits 01 - 31 <%d1%> Weekday using its first letter S - S <%loc_d1%> Weekday as a single-letter abbreviation based on the current user settings S - S <%d2%> Weekday using its first two letters Su - Sa <%loc_d2%> Weekday as a two-letter abbreviation based on the current user settings Su - Sa <%d3%> Weekday using its first three letters Sun - Sat <%ddd%> Weekday using its first three letters Sun - Sat <%loc_d3%> Weekday as a three-letter abbreviation based on the current user regional and language settings; equivalent to <%loc_ddd%> Sun - Sat <%loc_ddd%> Weekday as a three-letter abbreviation based on the current user regional and language settings Sun - Sat <%dddd%> Full name of the weekday Sunday - Saturday <%loc_dddd%> Full weekday name based on the current user regional and language settings Sunday - Saturday <%w%> Numeric day of the week 1 - 7 <%y%> Numeric day of the year 1 - 366 (week-patterns) <%ww%> Week of the year 1 - 53 (month-patterns) <%m%> Month of the year using one or two numeric digits, as needed 1 - 12 <%mm%> Month of the year using exactly two numeric digits 01 - 12 <%mr%> Month of the year using Roman numerals, as needed I - XII <%m1%> Month using its first letter J - D <%loc_m1%> Month as a single-letter abbreviation based on the current user settings J - D <%m2%> Month using its first two letters Ja - De <%loc_m2%> Month as a two-letter abbreviation based on the current user settings Ja - De <%m3%> Month using its first three letters Jan - Dec <%mmm%> Month using its first three letters Jan - Dec <%loc_m3%> Month as a three-letter abbreviation based on the current user regional and language settings; equivalent to <%loc_mmm%> Jan - Dec <%loc_mmm%> Month as a three-letter abbreviation based on the current user regional and language settings Jan - Dec <%mmmm%> Full name of the month January - December <%loc_mmmm%> Full month name based on the current user regional and language settings January - December (year-patterns) <%q%> Date shown as the quarter of the year 1 - 4 <%hy%> Date shown as the half of the year 1 - 2 <%loc_y%> Year represented by the last digit only, based on the current regional settings 0 - 9 <%yy%> Last two digits of the year 01 - 99 <%loc_yy%> Year represented by the last two digits only, based on the current regional settings; a leading zero is added for single-digit years 01 - 99 <%yyyy%> Full year using four digits 0100 - 9999 <%loc_yyyy%> Year represented using four or five digits, depending on the calendar in use. Thai Buddhist and Korean calendars use five-digit years; the "yyyy" pattern displays five digits for these calendars and four digits for all other supported calendars. Calendars with single-digit or two-digit years, such as the Japanese Emperor era, are formatted differently: single-digit years include a leading zero (for example, "03"), two-digit years use two digits (for example, "13"), and no additional leading zeros are applied 0100 - 9999 <%i%> Numeric value displayed instead of a date, representing the number of milliseconds elapsed since the Unix Epoch, January 1, 1970, 00:00:00 UTC 1767085565940 (localized era-patterns) <%loc_g%> Period/era based on the current user regional and language settings A,B <%loc_gg%> Period/era based on the current user regional and language settings AD,BC (localized date-patterns) <%loc_sdate%> Date in short format based on the current user regional and language settings 12/31/2000 <%loc_ldate%> Date in long format based on the current user regional and language settings December 31, 2000 <%loc_dsep%> Date separator based on the current user regional and language settings / (time-patterns) <%h%> Hour in one or two digits, as needed 0 - 23 <%hh%> Hour in two digits 00 - 23 <%h12%> Hour in 12-hour format, in one or two digits 0/12 - 11 <%hh12%> Hour in 12-hour format, in two digits 00/12 - 11 <%n%> Minute in one or two digits, as needed 0 - 59 <%nn%> Minute in two digits 00 - 59 <%s%> Second in one or two digits, as needed 0 - 59 <%ss%> Second in two digits 00 - 59 <%AM/PM%> 12-hour clock with uppercase "AM" or "PM" as appropriate AM, PM (localized time-patterns) <%loc_AM/PM%> Time marker such as AM or PM based on the current user regional and language settings AM, PM <%loc_A/P%> Single-character time marker such as A or P based on the current user regional and language settings A, P <%loc_time%> Time based on the current user regional and language settings 1:30:15 PM <%loc_time24%> Time in 24-hour format without a time marker based on the current user regional and language settings 13:30:15 <%loc_tsep%> Time separator based on the current user regional and language settings :
The toolTip field is mapped to the Level.ToolTip property, so the following statements are equivalent:
oLevel.Options = {toolTip: "<%ddd%> <%m%>/<%d%>/<%yyyy%>"}
oLevel.SetOptions({toolTip: "<%ddd%> <%m%>/<%d%>/<%yyyy%>"})
oLevel.ToolTip = "<%ddd%> <%m%>/<%d%>/<%yyyy%>"
oLevel.SetToolTip("<%ddd%> <%m%>/<%d%>/<%yyyy%>")
Type:
- string
Example
"<%ddd%> <%m%>/<%d%>/<%yyyy%>" displays the level's date such as "Sun 12/2/2007"
toolTip
(static) unit :exontrol.UnitEnum
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
The unit field is mapped to the Level.Unit property, so the following statements are equivalent:
oLevel.Options = {unit: exontrol.UnitEnum.exDay}
oLevel.SetOptions({unit: exontrol.UnitEnum.exDay})
oLevel.Unit = exontrol.UnitEnum.exDay
oLevel.SetUnit(exontrol.UnitEnum.exDay)
Type:
- exontrol.UnitEnum
Example
4096 or exontrol.UnitEnum.exDay {number}, indicates that the level displays days
unit