ItemBarOptions class (Gantt)

ItemBarOptions()

new ItemBarOptions()

The ItemBarOptions type holds all options(name, start, end, ...) an item-bar can display or own. The ItemBar(key) method gets the bar of the current item giving its key, and returns an object of ItemBar type.

Every option of the ItemBarOptions type has associated a property of the ItemBar object. For instance, the option:

caption {string}, specifies the caption to display within the bar
is associated with the property:
Caption {string}, specifies the caption to display within the bar
which means that the following statements are equivalent:
oItemBar.Options = {caption: "pointer"}
oItemBar.SetOptions({caption: "pointer"})
oItemBar.Caption = "pointer"
oItemBar.SetCaption("pointer")
where oItemBar is an object of ItemBar type

Members

(static) alignPercentCaption :number

The alignPercentCaption field horizontally aligns the bar's percent-caption. Only bars of percent-type ("A%B") display and handle the inner progress-bar. The showPercentCaption field shows or hides the bar's percent-caption. The percent field specifies the bar's percent, as a value from 0 to 1 (for 100%).

The alignPercentCaption field supports the following values:

  • 0, 1 or 2 the caption is not clipped and it is aligned to the left, center or right side of the bar ( no clip )
  • 3, 4 or 5 the caption of the bar gets clipped to the bar's client area, else the caption is aligned to the left, center or right side of the bar ( clip, inside )
  • 6, 7 or 8 the bar's caption is hidden if its size is less or equal with MinUnitWidth property, else if it does not fit the bar's client are, gets clipped or else fully aligned to left, center or right side of the bar ( hide if min, clip if not fit, inside )
  • 9, 10 or 11 the bar's caption is hidden if it does not fit entirely into the bar's client area, else it is fully displayed aligned to the left, center or right side of the bar ( hide if not fit, no clip, inside )
  • 12, 13 or 14 the bar's caption is displayed inside of the bar's client area if it fits entirely, else it is displayed outside of the bar aligned to the left, center or right ( no clip, inside, outside )
  • 16, 17, 18, the bar's caption is displayed outside of the bar to the left or to the right ( no clip, outside )

The alignPercentCaption field is mapped to the ItemBar.AlignPercentCaption property, so the following statements are equivalent:

oItemBar.Options = {alignPercentCaption: 18}
oItemBar.SetOptions({alignPercentCaption: 18})
oItemBar.AlignPercentCaption = 18
oItemBar.SetAlignPercentCaption(18)
Type:
  • number
Example
18 {number} or null {null}, the bar's percent-caption is displayed right-outside
0 {boolean}, the bar's percent-caption is aligned to the left
alignPercentCaption

(static) canBeLinked :boolean

The canBeLinked field specifies whether the bar can be linked. The canEndLink field specifies whether a link can end on this bar. The canStartLink field specifies whether a link can start from this bar. So, if the canBeLinked field is set to false, no link can start from, or end into the current bar, no matter of the values of canStartLink and canEndLink fields. If the canBeLinked field is set to true or null, the bar can be linked based on the values of canStartLink and canEndLink fields.

The canBeLinked field is mapped to the ItemBar.CanBeLinked property, so the following statements are equivalent:

oItemBar.Options = {canBeLinked: false}
oItemBar.SetOptions({canBeLinked: false})
oItemBar.SetCanBeLinked(false)
Type:
  • boolean
Example
false {boolean}, no link can start from, or end into the current bar
true {boolean} or null {null}, the bar can be linked
canBeLinked
The canEndLink field specifies whether a link can end on this bar. The canBeLinked field specifies whether the bar can be linked. The canEndLink field specifies whether a link can end on this bar. The canStartLink field specifies whether a link can start from this bar. So, if the canBeLinked field is set to false, no link can start from, or end into the current bar, no matter of the values of canStartLink and canEndLink fields. If the canBeLinked field is set to true or null, the bar can be linked based on the values of canStartLink and canEndLink fields.

The canEndLink field is mapped to the ItemBar.CanEndLink property, so the following statements are equivalent:

oItemBar.Options = {canEndLink: false}
oItemBar.SetOptions({canEndLink: false})
oItemBar.SetCanEndLink(false)
Type:
  • boolean
Example
false {boolean}, no link can end on this bar
true {boolean} or null {null}, any link can end on this bar
canEndLink

(static) canMove :boolean

The canMove field specifies whether the user can move the bar within the same item by drag (requires to be selectable too). The canMoveToAnother field specifies whether the bar can be moved to another item by drag and drop (requires to be selectable too). The selectable field indicates whether the item-bar is selectable or unselectable.

The canMove field is mapped to the ItemBar.CanMove property, so the following statements are equivalent:

oItemBar.Options = {canMove: true}
oItemBar.SetOptions({canMove: true})
oItemBar.CanMove = true
oItemBar.SetCanMove(true)
Type:
  • boolean
Example
false {boolean}, the user can't move the item-bar
true {boolean} or null{null}, the user can move the item-bar by drag
canMove

(static) canMoveToAnother :boolean

The canMoveToAnother field specifies whether the bar can be moved to another item by drag and drop (requires to be selectable too). The user can move by drag and drop an item-bar from an item to another item, in order to change the item hosting the bar. The canMove field specifies whether the user can move the bar within the same item by drag (requires to be selectable too). The selectable field indicates whether the item-bar is selectable or unselectable. The ItemBar.Parent property specifies the item hosting the bar.

The canMoveToAnother field is mapped to the ItemBar.CanMoveToAnother property, so the following statements are equivalent:

oItemBar.Options = {canMoveToAnother: true}
oItemBar.SetOptions({canMoveToAnother: true})
oItemBar.CanMoveToAnother = true
oItemBar.SetCanMoveToAnother(true)
Type:
  • boolean
Example
false {boolean} or null{null}, the user can't move the item-bar
true {boolean}, the user can move the item-bar from an item to another, by drag
canMoveToAnother

(static) canResize :number

The canResize field specifies whether the user can resize the bar on both margins by drag (requires to be selectable too), as explained:
  • 0 {number} or false {boolean}, the user can not resize the bar by drag
  • -1 {number} or null {null}, the bar can be resized on both sides
  • 1 {number} or true {boolean}, the bar can be resized on left side, and can not be resized on right
  • 2 {number}, the bar can be resized on right side, and can not be resized on left

The canResize field is mapped to the ItemBar.CanResize property, so the following statements are equivalent:

oItemBar.Options = {canResize: 1}
oItemBar.SetOptions({canResize: 1})
oItemBar.CanResize = 1
oItemBar.SetCanResize(1)

The canMove field specifies whether the user can move the bar within the same item by drag (requires to be selectable too). The canMoveToAnother field specifies whether the bar can be moved to another item by drag and drop (requires to be selectable too). The selectable field indicates whether the item-bar is selectable or unselectable.

Type:
  • number
Example
false {boolean}, the user can't resize the item-bar
true {boolean}, the user can resize the bar on left side, and can not be resize on right
-1 {number} or null {null}, the user can resize the bar on both sides
canResize

(static) canResizePercent :boolean

The canResizePercent field specifies whether the user can resize the percent at runtime. The showPercentCaption field shows or hides the bar's percent-caption. The alignPercentCaption field horizontally aligns the bar's percent-caption. The percent field specifies the bar's percent, as a value from 0 to 1 (for 100%). The resizePercentStep field defines the incremental step used when resizing a bar's percentage value (percent) via drag-and-drop at runtime.

The canResizePercent field is mapped to the ItemBar.CanResizePercent property, so the following statements are equivalent:

oItemBar.Options = {canResizePercent: true}
oItemBar.SetOptions({canResizePercent: true})
oItemBar.CanResizePercent = true
oItemBar.SetCanResizePercent(true)
Type:
  • boolean
Example
false {boolean}, the bar's percent can not be resized by drag
true {boolean} or null {null}, the user can resize the bar's percent at runtime
canResizePercent
The canStartLink field specifies whether a link can start from this bar. The canBeLinked field specifies whether the bar can be linked. The canEndLink field specifies whether a link can end on this bar. The canStartLink field specifies whether a link can start from this bar. So, if the canBeLinked field is set to false, no link can start from, or end into the current bar, no matter of the values of canStartLink and canEndLink fields. If the canBeLinked field is set to true or null, the bar can be linked based on the values of canStartLink and canEndLink fields.

The canStartLink field is mapped to the ItemBar.CanStartLink property, so the following statements are equivalent:

oItemBar.Options = {canStartLink: false}
oItemBar.SetOptions({canStartLink: false})
oItemBar.SetCanStartLink(false)
Type:
  • boolean
Example
false {boolean}, no link can start from the current bar
true {boolean} or null {null}, any link can start from the current bar
canStartLink

(static) caption :string

The caption field specifies the caption to display within the bar. The caption supports exHTML format, including the <%=formula%> tag, where formula is an expression that supports predefined constants, operators and % keywords such as %0 (itembar's property), %C0 (cell's value), %CD0 (cell's extra-data) or %CS0 (cell' checkbox-state), as explained below. The caption is useful to display any kind of information related to the item-bar, such as its name, start/end date-time, duration, percent, or any other custom information related to the item-bar. The caption can be shown in different formats and styles, by using the exHTML format and the <%=formula%> tag within the caption string. The formula within the <%=formula%> tag is evaluated for each item-bar and it can include predefined constants, operators and % keywords that are replaced with actual values for each item-bar. For instance, the formula "%0" is replaced with the value of the item-bar's name property for each item-bar, while the formula "%C0" is replaced with the value of the first cell (column index 0) for each item-bar.

The expression supports the following keywords:

%0, %1, %2, ... specifies the value/option of the item-bar as name, start, end and so on (ItemBarPropertyEnum type)
%C0, %C1, %C2, ... {string} specifies the caption of the cell, or the string the cell displays in the column with the index 0, 1 2, ... ( "%C0 + %C1", concatenates the caption of first and second cell )
%CD0, %CD1, %CD2, ... {any} specifies the cell's user-date in the column with the index 0, 1 2, ... ( "%CD0 ? value : ``", displays the cell's value only if the cell's data is not empty )
%CS0, %CS1, %CS2, ... {number} specifies the cell's state in the column with the index 0, 1 2, ... ( "(%CS0 ? `<b>` : ``) + value", displays the cell's value in bold only if the first cell is checked )
%CT0, %CT1, %CT2, ... {boolean} returns true if the cell displays a total field; otherwise, it returns false. The exTotalField / exTotalColumn flag specifies whether the cell displays a total field. For instance, "%CT1" refers to all cells in the second column that display totals, while "not %CT1" refers to all cells in the second column that do not display totals (@since 3.3)
%CE0, %CE1, %CE2, ... {boolean} returns true if the cell is editable; otherwise, it returns false.. For example, "%CE0" refers to all editable cells in the first column, while "not %CE1" refers to all cells in the second column that are read-only (@since 3.3)
%CC0, %CC1, %CC2, ... {number} retrieve the number of child items (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The ChildCount property returns the number of child items. For example, "%CC0" identifies all parent items, while "%CC0 = 0" identifies all leaf items (@since 3.3)
%CX0, %CX1, %CX2, ... {boolean} returns true if the item hosting the cell is expanded, or false if it is collapsed (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The Item.Expanded property specifically indicates whether the item is expanded or collapsed. For example, "%CX0" refers to all expanded items, while "not %CX0" identifies all collapsed items (@since 3.3)

The caption field is mapped to the ItemBar.Caption property, so the following statements are equivalent:

oItemBar.Options = {caption: "<b>task</b>"}
oItemBar.SetOptions({caption: "<b>task</b>"})
oItemBar.Caption = "<b>task</b>"
oItemBar.SetCaption("<b>task</b>")

The captionHOffset field defines the bar's caption horizontal-offset (relative to its alignment/default-position). The captionVOffset field defines the bar's caption vertical-offset (relative to its alignment/default-position). The showCaption field specifies whether the bar's caption is visible or hidden.

Type:
  • string
Example
"&lt;b&gt;task&lt;/b&gt;" {string}, the item-bar displays the task string in bold
"&lt;fgcolor white&gt;&lt;bgcolor black&gt; &lt;%=%0%&gt; " {string}, the item-bar displays its type/name in black/white
"&lt;%=shortdate(%1)%&gt;&lt;br&gt;&lt;%=shortdate(%2)%&gt;" {string}, the item-bar displays its start date-time in short format on the first line, and the end date-time in short format, on the second line
"&lt;%=%C0 + %C1%&gt;" {string}, concatenates and displays the caption of first and second cell
"&lt;%=(%CD0 ? %0 : ``)%&gt;" {string}, displays the first-column only if the item's data is not empty
"&lt;b&gt;&lt;%=(%CS0 ? %0 : ``)%&gt;&lt;/b&gt;&lt;%=(%CS0 ? `` : %0)%&gt;" {string}, displays the item-bar's name in bold only if the first cell is checked )
caption

(static) captionHOffset :number

The captionHOffset field defines the bar's caption horizontal-offset (relative to its alignment/default-position). The captionVOffset field defines the bar's caption vertical-offset (relative to its alignment/default-position). The showCaption field specifies whether the bar's caption is visible or hidden. The caption field specifies the caption to display within the bar.

The captionHOffset field is mapped to the ItemBar.CaptionHOffset property, so the following statements are equivalent:

oItemBar.Options = {captionHOffset: 4}
oItemBar.SetOptions({captionHOffset: 4})
oItemBar.CaptionHOffset = 4
oItemBar.SetCaptionHOffset(4)
Type:
  • number
Example
0 {number}, null {null}, the bar's caption is shown at its alignment/default-position
-4 {number}, the bar's caption is shown 4-pixels left to its alignment/default-position
4 {number}, the bar's caption is shown 4-pixels right to its alignment/default-position
captionHOffset

(static) captionVOffset :number

The captionVOffset field defines the bar's caption vertical-offset (relative to its alignment/default-position). The captionHOffset field defines the bar's caption horizontal-offset (relative to its alignment/default-position). The showCaption field specifies whether the bar's caption is visible or hidden. The caption field specifies the caption to display within the bar.

The captionVOffset field is mapped to the ItemBar.CaptionVOffset property, so the following statements are equivalent:

oItemBar.Options = {captionVOffset: 4}
oItemBar.SetOptions({captionVOffset: 4})
oItemBar.CaptionVOffset = 4
oItemBar.SetCaptionVOffset(4)
Type:
  • number
Example
0 {number}, null {null}, the bar's caption is shown at its alignment/default-position
-4 {number}, the bar's caption is shown 4-pixels up to its alignment/default-position
4 {number}, the bar's caption is shown 4-pixels down to its alignment/default-position
captionVOffset

(static) effort :number|string

The effort field specifies the bar's effort, or the effort to execute an unit within the bar. Indicates the bar's histogram value, which is interpreted based on bar's histogramType property.

The effort field could be:

  • a numeric value which it is applied for all units in the task (constant-effort)
  • a string that indicates the expression/formula to get the effort of the bar to be represented on the chart's histogram (variant-expression).

    The expression/formula may contain the following keywords:

    • value, {Date}indicates the date-time being queried
    • start, {Date} indicates the starting point of the bar as indicated by ItemBar.Start property
    • end, {Date} indicates the ending point of the bar as indicated by ItemBar.End property

    The HistogramUnitCount property gets or sets the time-scale count to determine the effort of bars with variable-effort. The HistogramUnitScale property defines the time-scale unit to determine the effort of bars with variable-effort. For instance, the ItemBar.Effort on "weekday(value) in (0,6) ? 0 : 2", means that that effort to do the job is 2 for any day in the task, excepts the Sundays(0) and Saturdays(6) (weekend. For instance, the "(hour(value) > 5 and hour(value) < 18) ? 2 : 0" indicates that the bar's effort is 2 for any hour between 6AM and 18PM, and 0 for rest.

The effort field is mapped to the ItemBar.Effort property, so the following statements are equivalent:

oItemBar.Options = {effort: 1.5}
oItemBar.SetOptions({effort: 1.5})
oItemBar.SetEffort(1.5)
Type:
  • number | string
Example
0 {number}, the bar is not represented into the control's histogram
 1.5 {number}, the bar's histogram value is based on the bar's histogramType option as explained:

   exHistOverload(0), adds 1.5-unit(s) to the histogram for each date-time of the bar
   exHistOverAllocation(1), adds 150% to the histogram for each date-time of the bar (1 day long), 75% for a 2-days long or shortly effort divided by length (in days) (effort/length)
   exHistOverAllocationFixed(512), adds 150% to the histogram for each date-time of the bar (no matter of its length) (fixed percent)
   exHistOverAllocationMultiply(1024), adds 150% to the histogram for each date-time of the bar (1 day long), 300% for a 2-days long or shortly effort multiplied by length (in days) (effort*length)

 "weekday(value) in (0,6) ? 0 : 2" {string}, defines an effort-expression or a variable-effort as explained: the effort to do the job is 2 for any day in the task, excepts the Sundays(0) and Saturdays(6) (weekend)
 "weekday(value) = 1 ? 2 : 1" {string}, indicates that the effort to do the job is 2 for Mondays(1), else 1
 "(month(value)=month(value+1)) ? 1 : 0" {string}, indicates that the effort to do the job is 1 for any day, excepts the last day in the month
 "int((value-start)/86400000) ? 1 : 2" {string},  indicates that the effort to do the job is 2 for the first day in the task, and 1 for the others (86400000 represents the number of mili-seconds within a day, as 24 * 60 * 60 * 1000)
 "(int((value-start)/86400000)+1) mod 2 ? 1 : 0" {string},  indicates that the effort to do the job is 2 for the first day in the task, and 1 for the others (86400000 represents the number of mili-seconds within a day, as 24 * 60 * 60 * 1000)
effort

(static) end :any

The end field indicates the date-time the bar ends to, as one of the following:
  • end {null}, indicates the current date and time (equivalent of Now)
  • end {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#"
  • end {Date}, indicates a JavaScript date to be copied
  • end {number} integer value representing the year of the date to be created

The end field is mapped to the ItemBar.End property, so the following statements are equivalent:

oItemBar.Options = {end: "#1/2/2001#"}
oItemBar.SetOptions({end: "#1/2/2001#"})
oItemBar.End = "#1/2/2001#"
oItemBar.SetEnd("#1/2/2001#")

The start field indicates the date-time the bar starts from.

Type:
  • any
Example
"#1/2/2001#" {string}, defines the bar's end date-time as January 2nd, 2001
Date.Today().NextDay(2) {Date}, changes the bar's end date-time to 1 day after tomorrow
end

(static) extraCaption :string

The extraCaption field associates an extra caption with the current item-bar. The extraCaptionVOffset field defines the vertical offset of the bar's extra caption (relative to its alignment/default position). The extraCaptionHOffset field defines the horizontal offset of the bar's extra caption (relative to its alignment/default position). The extraCaptionHAlign field specifies the horizontal alignment / clipping of the item-bar's extra caption inside / outside the bar. The extraCaptionVAlign field specifies the vertical alignment of the item-bar's extra caption inside / outside the bar.

The extraCaption supports exHTML format, including the <%=formula%> tag, where formula is an expression that supports predefined constants, operators and % keywords such as %0 (itembar's property), %C0 (cell's value), %CD0 (cell's extra-data) or %CS0 (cell' checkbox-state)

The expression supports the following keywords:

%0, %1, %2, ... specifies the value/option of the item-bar as name, start, end and so on (ItemBarPropertyEnum type)
%C0, %C1, %C2, ... {string} specifies the caption of the cell, or the string the cell displays in the column with the index 0, 1 2, ... ( "%C0 + %C1", concatenates the caption of first and second cell )
%CD0, %CD1, %CD2, ... {any} specifies the cell's user-date in the column with the index 0, 1 2, ... ( "%CD0 ? value : ``", displays the cell's value only if the cell's data is not empty )
%CS0, %CS1, %CS2, ... {number} specifies the cell's state in the column with the index 0, 1 2, ... ( "(%CS0 ? `<b>` : ``) + value", displays the cell's value in bold only if the first cell is checked )
%CT0, %CT1, %CT2, ... {boolean} returns true if the cell displays a total field; otherwise, it returns false. The exTotalField / exTotalColumn flag specifies whether the cell displays a total field. For instance, "%CT1" refers to all cells in the second column that display totals, while "not %CT1" refers to all cells in the second column that do not display totals (@since 3.3)
%CE0, %CE1, %CE2, ... {boolean} returns true if the cell is editable; otherwise, it returns false.. For example, "%CE0" refers to all editable cells in the first column, while "not %CE1" refers to all cells in the second column that are read-only (@since 3.3)
%CC0, %CC1, %CC2, ... {number} retrieve the number of child items (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The ChildCount property returns the number of child items. For example, "%CC0" identifies all parent items, while "%CC0 = 0" identifies all leaf items (@since 3.3)
%CX0, %CX1, %CX2, ... {boolean} returns true if the item hosting the cell is expanded, or false if it is collapsed (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The Item.Expanded property specifically indicates whether the item is expanded or collapsed. For example, "%CX0" refers to all expanded items, while "not %CX0" identifies all collapsed items (@since 3.3)

The extraCaption field is mapped to the ItemBar.ExtraCaption property, so the following statements are equivalent:

oItemBar.Options = {extraCaption: "<b>task</b>"}
oItemBar.SetOptions({extraCaption: "<b>task</b>"})
oItemBar.ExtraCaption = "<b>task</b>"
oItemBar.SetExtraCaption("<b>task</b>")
Type:
  • string
Example
"&lt;b&gt;task&lt;/b&gt;" {string}, the item-bar displays the task string in bold
"&lt;fgcolor white&gt;&lt;bgcolor black&gt; &lt;%=%0%&gt; " {string}, the item-bar displays its type/name in black/white
"&lt;%=shortdate(%1)%&gt;&lt;br&gt;&lt;%=shortdate(%2)%&gt;" {string}, the item-bar displays its start date-time in short format on the first line, and the end date-time in short format, on the second line
"&lt;%=%C0 + %C1%&gt;" {string}, concatenates and displays the caption of first and second cell
"&lt;%=(%CD0 ? %0 : ``)%&gt;" {string}, displays the first-column only if the item's data is not empty
"&lt;b&gt;&lt;%=(%CS0 ? %0 : ``)%&gt;&lt;/b&gt;&lt;%=(%CS0 ? `` : %0)%&gt;" {string}, displays the item-bar's name in bold only if the first cell is checked )
extraCaption

(static) extraCaptionHAlign :number

The extraCaptionHAlign field specifies the horizontal-alignment / clipping of the item-bar's extra caption inside / outside the bar, as explained:
  • 0, 1 or 2 the caption is not clipped and it is aligned to the left, center or right side of the bar ( no clip )
  • 3, 4 or 5 the caption of the bar gets clipped to the bar's client area, else the caption is aligned to the left, center or right side of the bar ( clip, inside )
  • 6, 7 or 8 the bar's caption is hidden if its size is less or equal with MinUnitWidth property, else if it does not fit the bar's client are, gets clipped or else fully aligned to left, center or right side of the bar ( hide if min, clip if not fit, inside )
  • 9, 10 or 11 the bar's caption is hidden if it does not fit entirely into the bar's client area, else it is fully displayed aligned to the left, center or right side of the bar ( hide if not fit, no clip, inside )
  • 12, 13 or 14 the bar's caption is displayed inside of the bar's client area if it fits entirely, else it is displayed outside of the bar aligned to the left, center or right ( no clip, inside, outside )
  • 16, 17, 18, the bar's caption is displayed outside of the bar to the left or to the right ( no clip, outside )
Also, the field supports the following flag (OR combination with any other value):
  • 32 (0x20), which indicates that the bar's caption fits the bar and view (that bar's caption is aligned relative to the horizontal-intersection of the bar with the view).
The extraCaption field associates an extra caption with the current item-bar. The extraCaptionVOffset field defines the vertical offset of the bar's extra caption (relative to its alignment/default position). The extraCaptionHOffset field defines the horizontal offset of the bar's extra caption (relative to its alignment/default position). The extraCaptionVAlign field specifies the vertical alignment of the item-bar's extra caption inside / outside the bar.

The extraCaption field is mapped to the ItemBar.ExtraCaption property, so the following statements are equivalent:

oItemBar.Options = {extraCaption: "<b>task</b>"}
oItemBar.SetOptions({extraCaption: "<b>task</b>"})
oItemBar.ExtraCaption = "<b>task</b>"
oItemBar.SetExtraCaption("<b>task</b>")
Type:
  • number
Example
null {null}, the item-bar's extra caption is horizontally centered
18 {number}, the item-bar's extra caption is displayed outside of the bar to the right ( no clip, outside )
extraCaptionHAlign

(static) extraCaptionHOffset :number

The extraCaptionHOffset field defines the horizontal offset of the bar's extra caption (relative to its alignment/default position). The extraCaption field associates an extra caption with the current item-bar. The extraCaptionHAlign field specifies the horizontal alignment / clipping of the item-bar's extra caption inside / outside the bar. The extraCaptionVAlign field specifies the vertical alignment of the item-bar's extra caption inside / outside the bar. The extraCaptionVOffset field defines the vertical offset of the bar's extra caption (relative to its alignment/default position).

The extraCaptionHOffset field is mapped to the ItemBar.ExtraCaptionHOffset property, so the following statements are equivalent:

oItemBar.Options = {extraCaptionHOffset: 4}
oItemBar.SetOptions({extraCaptionHOffset: 4})
oItemBar.ExtraCaptionHOffset = 4
oItemBar.SetExtraCaptionHOffset(4)
Type:
  • number
Example
0 {number}, null {null}, the bar's caption is shown at its alignment/default-position
-4 {number}, the bar's caption is shown 4-pixels left to its alignment/default-position
4 {number}, the bar's caption is shown 4-pixels right to its alignment/default-position
extraCaptionHOffset

(static) extraCaptionVAlign :number

The extraCaptionVAlign field specifies the vertical-alignment of the item-bar's extra caption inside / outside the bar, as explained:
  • 0, the caption is aligned to the top
  • 1, the caption is vertically centered
  • 2, the caption is aligned to the bottom
  • 16 (0x10), The caption is displayed outside of the item-bar (16 outside on top, 18 outside on bottom)
  • 32 (0x20), which indicates that the bar's caption fits the bar and view (that bar's caption is aligned relative to the vertical-intersection of the bar with the view).

The extraCaption field associates an extra caption with the current item-bar. The showExtraCaption field specifies whether the bar's extra caption is visible or hidden. The extraCaptionVOffset field defines the vertical offset of the bar's extra caption (relative to its alignment/default position). The extraCaptionHOffset field defines the horizontal offset of the bar's extra caption (relative to its alignment/default position). The extraCaptionHAlign field specifies the horizontal alignment / clipping of the item-bar's extra caption inside / outside the bar.

The extraCaption field is mapped to the ItemBar.ExtraCaption property, so the following statements are equivalent:

oItemBar.Options = {extraCaption: "<b>task</b>"}
oItemBar.SetOptions({extraCaption: "<b>task</b>"})
oItemBar.ExtraCaption = "<b>task</b>"
oItemBar.SetExtraCaption("<b>task</b>")
Type:
  • number
Example
null {null}, the item-bar's extra caption is vertically centered
18 {number}, the item-bar's extra caption is displayed outside of the bar to the bottom
extraCaptionVAlign

(static) extraCaptionVOffset :number

The extraCaptionVOffset field defines the vertical offset of the bar's extra caption (relative to its alignment/default position). The extraCaptionHOffset field defines the horizontal offset of the bar's extra caption (relative to its alignment/default position). The extraCaption field associates an extra caption with the current item-bar. The extraCaptionHAlign field specifies the horizontal alignment / clipping of the item-bar's extra caption inside / outside the bar. The extraCaptionVAlign field specifies the vertical alignment of the item-bar's extra caption inside / outside the bar.

The extraCaptionVOffset field is mapped to the ItemBar.ExtraCaptionVOffset property, so the following statements are equivalent:

oItemBar.Options = {extraCaptionVOffset: 4}
oItemBar.SetOptions({extraCaptionVOffset: 4})
oItemBar.ExtraCaptionVOffset = 4
oItemBar.SetExtraCaptionVOffset(4)
Type:
  • number
Example
0 {number}, null {null}, the bar's caption is shown at its alignment/default-position
-4 {number}, the bar's caption is shown 4-pixels up to its alignment/default-position
4 {number}, the bar's caption is shown 4-pixels down to its alignment/default-position
extraCaptionVOffset

(static) hAlignCaption :number

The hAlignCaption field specifies the horizontal-alignment / clipping of the item-bar's caption inside / outside the bar, as explained:
  • 0, 1 or 2 the caption is not clipped and it is aligned to the left, center or right side of the bar ( no clip )
  • 3, 4 or 5 the caption of the bar gets clipped to the bar's client area, else the caption is aligned to the left, center or right side of the bar ( clip, inside )
  • 6, 7 or 8 the bar's caption is hidden if its size is less or equal with MinUnitWidth property, else if it does not fit the bar's client are, gets clipped or else fully aligned to left, center or right side of the bar ( hide if min, clip if not fit, inside )
  • 9, 10 or 11 the bar's caption is hidden if it does not fit entirely into the bar's client area, else it is fully displayed aligned to the left, center or right side of the bar ( hide if not fit, no clip, inside )
  • 12, 13 or 14 the bar's caption is displayed inside of the bar's client area if it fits entirely, else it is displayed outside of the bar aligned to the left, center or right ( no clip, inside, outside )
  • 16, 17, 18, the bar's caption is displayed outside of the bar to the left or to the right ( no clip, outside )
Also, the field supports the following flag (OR combination with any other value):
  • 32 (0x20), which indicates that the bar's caption fits the bar and view (that bar's caption is aligned relative to the horizontal-intersection of the bar with the view).

The hAlignCaption field is mapped to the ItemBar.HAlignCaption property, so the following statements are equivalent:

oItemBar.Options = {hAlignCaption: 1}
oItemBar.SetOptions({hAlignCaption: 1})
oItemBar.HAlignCaption = 1
oItemBar.SetHAlignCaption(1)

The caption field specifies the caption to display within the bar. The showCaption field specifies whether the bar's caption is visible or hidden.

Type:
  • number
Example
null {null}, the item-bar's caption is horizontally centered
18 {number}, the item-bar's caption is displayed outside of the bar to the right ( no clip, outside )
hAlignCaption

(static) height :number

The height field defines the height of the bar. The height of the bar can be defined by the bar itself, or by the item that hosts the bar. If the height field is set to a number greater than or equal to 0, it specifies the bar's height in pixels. If the height field is set to -1, the bar's height is determined by the item's height (the item that hosts the bar defines the bar's height). If the height field is set to null, the bar's height is defined by the height of the bar of the same type/name.

The height field is mapped to the ItemBar.Height property, so the following statements are equivalent:

oItemBar.Options = {height: 12}
oItemBar.SetOptions({height: 12})
oItemBar.Height = 12
oItemBar.SetHeight(12)
Type:
  • number
Example
null {null}, the bar's height is defined by the height of the bar of the same type/name
-1 {number}, specifies that the bar's height is determined by the item's height (the item that hosts the bar defines the bar's height)
0 {number}, defines a zero-height bar (bar is hidden)
12 {number}, the bar's height is 12-pixels tall
height

(static) histLegend :string

The histLegend field specifies the description to show within the histogram's legend for the bar in the control's histogram. The exBarHistLegend option has effect only if the Bar.HistogramCumulativeOriginalColorBars is exKeepOriginalColor. he HistogramVisible property shows or hides the control's histogram.

The histLegend supports exHTML format, including the <%=formula%> tag, where formula is an expression that supports

  • predefined constants
  • operators
  • % keywords such as %0 (itembar's property), %C0 (cell's value), %CD0 (cell's extra-data) or %CS0 (cell' checkbox-state)

The expression supports the following keywords:

%0, %1, %2, ... specifies the value/option of the item-bar as name, start, end and so on (ItemBarPropertyEnum type)
%C0, %C1, %C2, ... {string} specifies the caption of the cell, or the string the cell displays in the column with the index 0, 1 2, ... ( "%C0 + %C1", concatenates the caption of first and second cell )
%CD0, %CD1, %CD2, ... {any} specifies the cell's user-date in the column with the index 0, 1 2, ... ( "%CD0 ? value : ``", displays the cell's value only if the cell's data is not empty )
%CS0, %CS1, %CS2, ... {number} specifies the cell's state in the column with the index 0, 1 2, ... ( "(%CS0 ? `<b>` : ``) + value", displays the cell's value in bold only if the first cell is checked )
%CT0, %CT1, %CT2, ... {boolean} returns true if the cell displays a total field; otherwise, it returns false. The exTotalField / exTotalColumn flag specifies whether the cell displays a total field. For instance, "%CT1" refers to all cells in the second column that display totals, while "not %CT1" refers to all cells in the second column that do not display totals (@since 3.3)
%CE0, %CE1, %CE2, ... {boolean} returns true if the cell is editable; otherwise, it returns false.. For example, "%CE0" refers to all editable cells in the first column, while "not %CE1" refers to all cells in the second column that are read-only (@since 3.3)
%CC0, %CC1, %CC2, ... {number} retrieve the number of child items (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The ChildCount property returns the number of child items. For example, "%CC0" identifies all parent items, while "%CC0 = 0" identifies all leaf items (@since 3.3)
%CX0, %CX1, %CX2, ... {boolean} returns true if the item hosting the cell is expanded, or false if it is collapsed (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The Item.Expanded property specifically indicates whether the item is expanded or collapsed. For example, "%CX0" refers to all expanded items, while "not %CX0" identifies all collapsed items (@since 3.3)

The histLegend field is mapped to the ItemBar.HistLegend property, so the following statements are equivalent:

oItemBar.Options = {histLegend: "<b>cust</b>"}
oItemBar.SetOptions({histLegend: "<b>cust</b>"})
oItemBar.HistLegend = "<b>cust</b>"
oItemBar.SetHistLegend("<b>cust</b>")
Type:
  • string
Since:
  • 1.6
Example
"&lt;b&gt;cust&lt;/b&gt;" {string}, the legend displays the cust string in bold
"&lt;%=%0%&gt; " {string}, the legend displays the bar's type/name
"&lt;fgcolor gray&gt;&lt;%=lower(%3)%&gt;" {string}, the histogram-legend displays the bar's caption in gray and lowercase
histLegend

(static) key :string

The key field specifies the key of the bar (used only if item hosts multiple bars). The key field is used to distinguish between multiple bars within the same item. If the item hosts a single bar, the key field is not required, and it can be set to null. If the item hosts multiple bars, each bar should have a unique key to be identified. The key field does not affect the bar's visual appearance, but it is used to identify the bar when accessing it through code. For instance, if an item hosts two bars with keys "A" and "B", you can access them using Item.ItemBar("A") and Item.ItemBar("B") respectively.

The key field is mapped to the ItemBar.Key property, so the following statements are equivalent:

oItemBar.Options = {key: "A"}
oItemBar.SetOptions({key: "A"})
oItemBar.Key = "A"
oItemBar.SetKey("A")
Type:
  • string
Example
"A" {string}, defines a bar with the key "A"
key

(static) name :string

The name field specifies the name/type of the bar. The Bars collection holds the control's predefined bar types. The caption property defines the caption displayed within the bar. The shape property defines the shape applied to the bar's background. The height property specifies the height of the bar. The name field determines how the bar looks, while the shape, height, or any other fields can be used to customize the appearance of the item-bar itself. The toolTip property specifies the tooltip displayed when the cursor hovers over the bar.

The name field is mapped to the ItemBar.Name property, so the following statements are equivalent:

oItemBar.Options = {name: "Task"}
oItemBar.SetOptions({name: "Task"})
oItemBar.Name = "Task"
oItemBar.SetName("Task")
Type:
  • string
Example
"Task" {string}, defines the current bar to look and act as a "Task" bar
"Task%Progress" {string}, defines the bar to look as a "Task" bar and to display the bar's "percent" option, as an inside "Progress"-bar. The Chart.Bars.Add("Task%Progress") should be previously called to define a bar of percent-type.
name

(static) offset :number

The offset field specifies the vertical-offset relative to the default position, the bar is displayed. The default position is the one that the bar would have if it were not part of overlaid-bars. The offset field is used to vertically shift bars that are part of overlaid-bars, in order to make them visible when they overlap each other. The overlaidType field specifies specifies how overlaid bars are arranged. The overlaid field specifies the options for the specified overlaid type, as an object of {offset, intersect, stack, cascade} type.

The offset field is mapped to the ItemBar.Offset property, so the following statements are equivalent:

oItemBar.Options = {offset: -4}
oItemBar.SetOptions({offset: -4})
oItemBar.Offset = -4
oItemBar.SetOffset(-4)
Type:
  • number
Example
0 {number} or null {null}, the item bar is shown in its default position, ussualy centered to the item, while it is not part of overlaid-bars
-4 {number}, shifts vertically the item bar by 4-pixels
offset

(static) overlaidKey :string

The overlaidKey field specifies the z-order of the bar when it overlaps other bars (exOverlaidBarsCascade type). Bars with the same overlaidKey value are displayed on the same level when they overlap each other. The overlaid field specifies the options for the specified overlaid type, as an object of {offset, intersect, stack, cascade} type. The overlaidType field specifies specifies how overlaid bars are arranged.

The overlaidKey field is mapped to the ItemBar.OverlaidKey property, so the following statements are equivalent:

oItemBar.Options = {overlaidKey: "Z"}
oItemBar.SetOptions({overlaidKey: "Z"})
oItemBar.OverlaidKey = "Z"
oItemBar.SetOverlaidKey("Z")
Type:
  • string
Example
"Z" {string}, all overlaid-bars of the same overlaid-key "Z" are displayed on the same level
overlaidKey

(static) overviewColor :string

The overviewColor field defines the color to show a particular bar within the control's overview. The overview is a visual representation of the entire chart, usually displayed at the right side of the control, which provides a quick overview of all items and bars within the chart. The overviewColor field specifies the color to show the current item-bar within the control's overview. If the overviewColor field is not set for an item-bar, the overview color of that bar is defined by the bar's overviewColor, item-bar's shape fill, pattern or frame color (the first truthy value in this order). The OverviewVisible property shows or hides the control's overview.

The overviewColor field is mapped to the ItemBar.OverviewColor property, so the following statements are equivalent:

oItemBar.Options = {overviewColor: "red"}
oItemBar.SetOptions({overviewColor: "red"})
oItemBar.OverviewColor = "red"
oItemBar.SetOverviewColor("red")
Type:
  • string
Example
"" {string} or null{null}, the overview color of the current item-bar is defined by the bar's overviewColor, item-bar's shape fill, pattern or frame color (the first truthy value in this order)
"transparent" or "rgba(0,0,0,0)" {string}, the overview representation of the current item-bar is hidden
"red" or "#FF0000", "rgb(255,0,0)", "rgba(255,0,0,1)", ... {string}, the current item-bar is shown in red within the control's overview
overviewColor

(static) percent :number

The percent field specifies the bar's percent, as a value from 0 to 1 (for 100%). Only bars of percent-type ("A%B") display and handle the inner progress-bar. The showPercentCaption field shows or hides the bar's percent-caption. The alignPercentCaption field horizontally aligns the bar's percent-caption.

The percent field is mapped to the ItemBar.Percent property, so the following statements are equivalent:

oItemBar.Options = {percent: 0.5}
oItemBar.SetOptions({percent: 0.5})
oItemBar.Percent = 0.5
oItemBar.SetPercent(0.5)
Type:
  • number
Example
0 {number} or null {null}, the bar's percent is set to 0%
1 {number}, the bar's percent is set to 100%
percent

(static) percentCaptionFormat :string

The percentCaptionFormat field specifies the HTML format to display the bar's percent. The %p keyword defines the bar's percent. The percent field specifies the bar's percent, as a value from 0 to 1 (for 100%). Only bars of percent-type ("A%B") display and handle the inner progress-bar. The showPercentCaption field shows or hides the bar's percent-caption. The alignPercentCaption field horizontally aligns the bar's percent-caption. The canResizePercent field specifies whether the user can resize the percent at runtime.

The percentCaptionFormat field is mapped to the ItemBar.PercentCaptionFormat property, so the following statements are equivalent:

oItemBar.Options = {percentCaptionFormat: "%p%"}
oItemBar.SetOptions({percentCaptionFormat: "%p%"})
oItemBar.PercentCaptionFormat = "%p%"
oItemBar.SetPercentCaptionFormat("%p%")
Type:
  • string
Example
"" {string}, displays the bar's percent as it is (no % character is displayed)
"&lt;b&gt;%p%&lt;/b&gt;" {string}, shows the bar's percent in bold
percentCaptionFormat

(static) predecessor :string

The predecessor field defines the list of predecessor bars, separated by comma. Tasks may have multiple predecessors or multiple successors. Before you begin establishing dependencies, it's important to understand that there are four types:
  • Finish to Start (FS), the predecessor ends before the successor can begin
  • Start to Start (SS), the predecessor begins before the successor can begin
  • Finish to Finish (FF), the predecessor ends before the successor can end
  • Start to Finish (SF), the predecessor begins before the successor can end

The format of bar's predecessor is INDEX1["SF"|"FS"|"FF"|"SS"][KEY][:["W"]LAG|:LAG["W"]], where:

  • INDEX1 is the 1-based index of the item that hosts the bar
  • followed by the type of the link which can be one any of SF(Start-Finish), FS(Finish-Start), SS(Start-Start) or FF(Finish-Finish) sequence (FS if missing)
  • continues with the KEY of the bar (empty is not used)
  • and ends with the LAG of the link (specifies the delay the activity is postponed by the link). The "W" indicates a working-lag for the link (specifies the delay in working-units the activity is postponed by the link). 

The predecessor field is mapped to the ItemBar.Predecessor property, so the following statements are equivalent:

oItemBar.Options = {predecessor: "2FSZ"}
oItemBar.SetOptions({predecessor: "2FSZ"})
oItemBar.Predecessor = "2FSZ"
oItemBar.SetPredecessor("2FSZ")
Type:
  • string
Since:
  • 2.3
Example
"2FSZ", specifies that the current item-bar is linked with the "Z" bar of the second item (item with the index 1) using a Finish-Start link
 "1SF:-2", adds a Start-Finish link with the bar '' of the first-item, using a lag of -2 days
predecessor

(static) resizePercentStep :number

The resizePercentStep field defines the incremental step used when resizing a bar's percentage value (percent) via drag-and-drop at runtime. It determines how much the bar's percentage changes each time it is adjusted by the user:
  • 0 (default), the bar can be resized freely to any value between 0% and 100%
  • > 0, the bar resizes in fixed steps equal to the specified fraction of 100% of its container
Behavior:
  • only applies to user-driven resizing at runtime. Programmatic changes to exBarPercent ignore this step
  • ensures that the bar snaps to predictable increments, making layout adjustments more consistent and controlled

The canResizePercent field specifies whether the user can resize the percent at runtime. The percent field specifies the bar's percent, as a value from 0 to 1 (for 100%).

The resizePercentStep field is mapped to the ItemBar.ResizePercentStep property, so the following statements are equivalent:

oItemBar.Options = {resizePercentStep: 0.05}
oItemBar.SetOptions({resizePercentStep: 0.05})
oItemBar.ResizePercentStep = 0.05
oItemBar.SetResizePercentStep(0.05)
Type:
  • number
Since:
  • 5.0
Example
null {null} or {0}, the bar can be resized freely to any value between 0% and 100%
0.05 {number}, the bar moves in 5% increments
0.1 {number}, the bar moves in 10% increments
resizePercentStep

(static) resourceFormat :string

The resourceFormat field specifies the format for displaying a bar's resource. This field allows you to define a string expression to customize the display format. The resources field specifies the resources to be used by the current bar, separated by commas.

The expression supports the following keywords:

  • name {string}, indicates the name of the resource
  • percent {number}, indicates the usage percentage of the resource as a value between 0 and 1

The expression can include exHTML tags to format the output, such as <b> for bold text, <font> for font styling, and <fgcolor> for foreground color. You can also use conditional logic and formatting functions to customize the display further.

The resourceFormat field is mapped to the ItemBar.ResourceFormat property, so the following statements are equivalent:

oItemBar.Options = {resourceFormat: "name + ' (' + (percent*100) + '%)'"}
oItemBar.SetOptions({resourceFormat: "name + ' (' + (percent*100) + '%)'")})
oItemBar.ResourceFormat = "name + ' (' + (percent*100) + '%)'")
oItemBar.SetResourceFormat("name + ' (' + (percent*100) + '%)'")
Type:
  • string
Since:
  • 3.2
Example
"name" {string}, displays just the name of the resource (not including its usage)
"name + (percent = 1 ? `` : ( `(` + (round(100*percent) format `` replace `.00` with `` + `%`))  + `)`)" {string}, displays name followed by percentage
"`&lt;b&gt;` + name + `&lt;/b&gt;&lt;font ;5&gt;&lt;fgcolor gray&gt;` + (percent = 1 ? `` : (round(100*percent) format ``) + `%` ) + `&lt;/fgcolor&gt;&lt;/font&gt;`" {string}, resource names in bold and the usage percentage in a smaller font
resourceFormat

(static) resources :string

The resources field specifies the resources to be used by the current bar, separated by commas. The resources field is a string that specifies the list of resources, including their usage, or 100% if not specified. Resources are separated by commas, and usage is indicated as a double expression using a dot as the decimal separator. For example, Resource1,Resource2,Resource3 indicates that the bar uses Resource1, Resource2, and Resource3 at 100% each, while R1,R2[50%],R3[67.89%] specifies that the bar uses R1 at 100%, R2 at 50%, and R3 at 67.89%. The resourceFormat field specifies the format for displaying a bar's resource.
  • If the first character is a plus sign (+), the rest of the expression indicates the resources to be added to the current bar. For instance, if the current bar has the 'resources' property set to "R1,R2" and we set 'resources' to "+R3", it means that "R3" is added to the bar's resources, resulting in a new 'resources' property of "R1,R2,R3"
  • If the first character is a minus sign (-), the rest of the expression indicates the resources to be removed from the current bar. For instance, if the current bar has the 'resources' property set to "R1,R2" and we set 'resources' to "-R2", it means that "R2" is removed from the bar's resources, resulting in a new 'resources' property of "R1"
  • If no + or - character is used, setting the 'resources' property replaces its current value entirely. For example, if the current bar has 'resources' set to "R1,R2" and we set 'resources' to "R3,R4", it means the new 'resources' property will be "R3,R4". This replaces the previous resources with the new ones specified

The resources field is mapped to the ItemBar.Resources property, so the following statements are equivalent:

oItemBar.Options = {resources: "R1,R2"}
oItemBar.SetOptions({resources: "R1,R2"})
oItemBar.Resources = "R1,R2"
oItemBar.SetResources("R1,R2")
Type:
  • string
Since:
  • 3.2
Example
"R1,R2" {string}, allocates the R1 and R2 resources to the current bar
"R1[50%],R2[10%]" {string}, allocates 50% of R1 resources and 10% of R2 resource to the current bar
"+R3[34%]" {string}, adds 34% of R3 resource
resources

(static) selectable :boolean

The selectable field indicates whether the item-bar is selectable or unselectable. The selected field specifies whether the bar is selected or unselected. If the selectable field is set to false, the item-bar is unselectable, so the user can not select the item-bar. If the selectable field is set to true, the item-bar is selectable, so the user can select the item-bar and also any operation that requires selection (such as moving or resizing) can be applied on the item-bar.

The selectable field is mapped to the ItemBar.Selectable property, so the following statements are equivalent:

oItemBar.Options = {selectable: true}
oItemBar.SetOptions({selectable: true})
ItemBar.Selectable = true
oItemBar.SetSelectable(true)
Type:
  • boolean
Example
false {boolean}, the item-bar is unselectable (the user can select the item-bar)
true {boolean}, the item-bar is selectable
selectable

(static) selected :boolean

The selected field specifies whether the bar is selected or unselected. The selectable field indicates whether the item-bar is selectable or unselectable. The selected field specifies whether the bar is selected or unselected. If the selectable field is set to false, the item-bar is unselectable, so the user can not select the item-bar. If the selectable field is set to true, the item-bar is selectable, so the user can select the item-bar and also any operation that requires selection (such as moving or resizing) can be applied on the item-bar.

The selected field is mapped to the ItemBar.Selected property, so the following statements are equivalent:

oItemBar.Options = {selected: true}
oItemBar.SetOptions({selected: true})
oItemBar.Selected = true
oItemBar.SetSelected(true)
Type:
  • boolean
Example
false {boolean}, unselects the bar
true {boolean}, selects the bar
selected

(static) shape :any

The shape field defines the shape to apply on the bar's background. The shape field can be set for each bar to define the bar's individual shape, or it can be set for all bars of the same type through the Bar.Shape property. If the shape field is set for the item-bar it overrides the shape defined for the bar of the same type. If the shape field is not set for the item-bar, the shape defined for the bar of the same type is applied on the item-bar. If the shape field is not set for the item-bar and also not set for the bar of the same type, no "unknown" shape is applied on the item-bar (The Chart.unkS() method defines the shape to show "unknown" bars).

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 ItemBar.Shape property, so the following statements are equivalent:

oItemBar.Options = {shape: "red"}
oItemBar.SetOptions({shape: "red"})
ItemBar.Shape = "red"
ItemBar.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) showCaption :boolean

The showCaption field specifies whether the bar's caption is visible or hidden. The caption field specifies the caption to display within the bar. The caption supports exHTML format, including the <%=formula%> tag, where formula is an expression that supports predefined constants, operators and % keywords such as %0 (itembar's property), %C0 (cell's value), %CD0 (cell's extra-data) or %CS0 (cell' checkbox-state), as explained below.

The showCaption field is mapped to the ItemBar.ShowCaption property, so the following statements are equivalent:

oItemBar.Options = {showCaption: true}
oItemBar.SetOptions({showCaption: true})
oItemBar.ShowCaption = true
oItemBar.SetShowCaption(true)
Type:
  • boolean
Example
false {boolean}, hides the item-bar's caption
true {boolean}, shows the item-bar's caption
showCaption

(static) showExtraCaption :boolean

The showExtraCaption field specifies whether the bar's extra caption is visible or hidden. The extraCaption field associates an extra caption with the current item-bar. The extraCaptionVOffset field defines the vertical offset of the bar's extra caption (relative to its alignment/default position). The extraCaptionHOffset field defines the horizontal offset of the bar's extra caption (relative to its alignment/default position). The extraCaptionHAlign field specifies the horizontal alignment / clipping of the item-bar's extra caption inside / outside the bar.

The showExtraCaption field is mapped to the ItemBar.ShowExtraCaption property, so the following statements are equivalent:

oItemBar.Options = {showExtraCaption: true}
oItemBar.SetOptions({showExtraCaption: true})
oItemBar.ShowExtraCaption = true
oItemBar.SetShowExtraCaption(true)
Type:
  • boolean
Example
false {boolean}, hides the item-bar's extra caption
true {boolean}, shows the item-bar's extra caption
showExtraCaption

(static) showPercentCaption :boolean

The showPercentCaption field shows or hides the bar's percent-caption. Only bars of percent-type ("A%B") display and handle the inner progress-bar. The alignPercentCaption field horizontally aligns the bar's percent-caption. The percent field specifies the bar's percent, as a value from 0 to 1 (for 100%).

The showPercentCaption field is mapped to the ItemBar.ShowPercentCaption property, so the following statements are equivalent:

oItemBar.Options = {showPercentCaption: true}
oItemBar.SetOptions({showPercentCaption: true})
oItemBar.ShowPercentCaption = true
oItemBar.SetShowPercentCaption(true)
Type:
  • boolean
Example
false {boolean} or null {null}, the bar's percent-caption is hidden
true {boolean}, the bar's percent-caption is shown
showPercentCaption

(static) start :any

The start field indicates the date-time the bar starts from, as one of the following:
  • start {null}, indicates the current date and time (equivalent of Now)
  • start {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#"
  • start {Date}, indicates a JavaScript date to be copied
  • start {number} integer value representing the year of the date to be created

The start field is mapped to the ItemBar.Start property, so the following statements are equivalent:

oItemBar.Options = {start: "#1/1/2001#"}
oItemBar.SetOptions({start: "#1/1/2001#"})
oItemBar.Start = "#1/1/2001#"
oItemBar.SetStart("#1/1/2001#")

The end field indicates the date-time the bar ends to.

Type:
  • any
Example
"#1/1/2001#" {string}, defines the bar's start date-time as January 1st, 2001
Date.Today() {Date}, changes the bar's start date-time to today
start

(static) successor :string

The successor field defines the list of successor bars, separated by comma. Tasks may have multiple predecessors or multiple successors. Before you begin establishing dependencies, it's important to understand that there are four types:
  • Finish to Start (FS), the predecessor ends before the successor can begin
  • Start to Start (SS), the predecessor begins before the successor can begin
  • Finish to Finish (FF), the predecessor ends before the successor can end
  • Start to Finish (SF), the predecessor begins before the successor can end

The format of bar's successor is INDEX1["SF"|"FS"|"FF"|"SS"][KEY][:["W"]LAG|:LAG["W"]], where:

  • INDEX1 is the 1-based index of the item that hosts the bar
  • followed by the type of the link which can be one any of SF(Start-Finish), FS(Finish-Start), SS(Start-Start) or FF(Finish-Finish) sequence (FS if missing)
  • continues with the KEY of the bar (empty is not used)
  • and ends with the LAG of the link (specifies the delay the activity is postponed by the link). The "W" indicates a working-lag for the link (specifies the delay in working-units the activity is postponed by the link). 

The successor field is mapped to the ItemBar.Successor property, so the following statements are equivalent:

oItemBar.Options = {successor: "3SFy"}
oItemBar.SetOptions({successor: "3SFy"})
oItemBar.Successor = "3SFy"
oItemBar.SetSuccessor("3SFy")
Type:
  • string
Since:
  • 2.3
Example
"3SFy",  specifies that the current item-bar is linked with the "y" bar of the third item (item with the index 1) using a Start-Finish link
successor

(static) summaryBarShape :any

The summaryBarShape field defines the shape to apply on the background of all summary-bar's child item-bars (have effect only for summary-bars, union of child item-bars). The DefineSummaryBars() method defines bars of the summary bar. The summary bar is an item-bar that includes other item-bars as child bars. The summary bar is useful to define a bar that summarizes other bars (for instance, a summary bar that summarizes the progress of other bars). The summary bar is defined by including other item-bars as child bars of the summary bar. The UndefineSummaryBars(itemRemove, keyRemove) method undefines bars of the summary bar.

The summaryBarShape 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 summaryBarShape field is mapped to the ItemBar.SummaryBarShape property, so the following statements are equivalent:

oItemBar.Options = {summaryBarShape: "red"}
oItemBar.SetOptions({summaryBarShape: "red"})
oItemBar.SummaryBarShape = "red"
oItemBar.SetSummaryBarShape("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)
summaryBarShape

(static) toolTip :string

The toolTip field specifies the tooltip to be shown once the cursor hovers the bar. The caption field specifies the caption to display within the bar, while the toolTip field specifies the tooltip to be shown once the cursor hovers the bar. The tooltip is useful to display any kind of information related to the item-bar, such as its name, start/end date-time, duration, percent, or any other custom information related to the item-bar. The tooltip can be shown in different formats and styles, by using the exHTML format and the <%=formula%> tag within the tooltip string. The formula within the <%=formula%> tag is evaluated for each item-bar and it can include predefined constants, operators and % keywords that are replaced with actual values for each item-bar. For instance, the formula "%0" is replaced with the value of the item-bar's name property for each item-bar, while the formula "%C0" is replaced with the value of the first cell (column index 0) for each item-bar.

The tooltip supports exHTML format, including the <%=formula%> tag, where formula is an expression that supports predefined constants, operators and % keywords such as %0 (itembar's property), %C0 (cell's value), %CD0 (cell's extra-data) or %CS0 (cell' checkbox-state)

The expression supports the following keywords:

%0, %1, %2, ... specifies the value/option of the item-bar as name, start, end and so on (ItemBarPropertyEnum type)
%C0, %C1, %C2, ... {string} specifies the caption of the cell, or the string the cell displays in the column with the index 0, 1 2, ... ( "%C0 + %C1", concatenates the caption of first and second cell )
%CD0, %CD1, %CD2, ... {any} specifies the cell's user-date in the column with the index 0, 1 2, ... ( "%CD0 ? value : ``", displays the cell's value only if the cell's data is not empty )
%CS0, %CS1, %CS2, ... {number} specifies the cell's state in the column with the index 0, 1 2, ... ( "(%CS0 ? `<b>` : ``) + value", displays the cell's value in bold only if the first cell is checked )
%CT0, %CT1, %CT2, ... {boolean} returns true if the cell displays a total field; otherwise, it returns false. The exTotalField / exTotalColumn flag specifies whether the cell displays a total field. For instance, "%CT1" refers to all cells in the second column that display totals, while "not %CT1" refers to all cells in the second column that do not display totals (@since 3.3)
%CE0, %CE1, %CE2, ... {boolean} returns true if the cell is editable; otherwise, it returns false.. For example, "%CE0" refers to all editable cells in the first column, while "not %CE1" refers to all cells in the second column that are read-only (@since 3.3)
%CC0, %CC1, %CC2, ... {number} retrieve the number of child items (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The ChildCount property returns the number of child items. For example, "%CC0" identifies all parent items, while "%CC0 = 0" identifies all leaf items (@since 3.3)
%CX0, %CX1, %CX2, ... {boolean} returns true if the item hosting the cell is expanded, or false if it is collapsed (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The Item.Expanded property specifically indicates whether the item is expanded or collapsed. For example, "%CX0" refers to all expanded items, while "not %CX0" identifies all collapsed items (@since 3.3)

The toolTip field is mapped to the ItemBar.ToolTip property, so the following statements are equivalent:

oItemBar.Options = {toolTip: "<b>task</b>"}
oItemBar.SetOptions({toolTip: "<b>task</b>"})
oItemBar.ToolTip = "<b>task</b>"
oItemBar.SetToolTip("<b>task</b>")
Type:
  • string
Example
"&lt;b&gt;task&lt;/b&gt;" {string}, the tooltip displays the task string in bold
"&lt;%=%0%&gt; " {string}, the tooltip displays the bar's type/name
"Start: &lt;%=shortdate(%1)%&gt;&lt;br&gt;End: &lt;%=shortdate(%2)%&gt;" {string}, the tooltip displays the bar's start date-time in short format on the first line, and the end date-time in short format, on the second line
"&lt;%=%C0 + %C1%&gt;" {string}, concatenates and displays the caption of first and second cell
"Duration: &lt;%=((1:=int(0:= (%513))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%&gt;", {string} shows the item-bar's duration/length in days, hours and minutes
toolTip

(static) vAlignCaption :number

The vAlignCaption field specifies the vertical-alignment of the item-bar's caption inside / outside the bar, as explained:
  • 0, the caption is aligned to the top
  • 1, the caption is vertically centered
  • 2, the caption is aligned to the bottom
  • 16 (0x10), The caption is displayed outside of the item-bar (16 outside on top, 18 outside on bottom)
  • 32 (0x20), which indicates that the bar's caption fits the bar and view (that bar's caption is aligned relative to the vertical-intersection of the bar with the view).

The vAlignCaption field is mapped to the ItemBar.VAlignCaption property, so the following statements are equivalent:

oItemBar.Options = {vAlignCaption: 1}
oItemBar.SetOptions({vAlignCaption: 1})
oItemBar.VAlignCaption = 1
oItemBar.SetVAlignCaption(1)

The caption field specifies the caption to display within the bar. The showCaption field specifies whether the bar's caption is visible or hidden.

Type:
  • number
Example
null {null}, the item-bar's caption is vertically centered
18 {number}, the item-bar's caption is displayed outside of the bar to the bottom
vAlignCaption