BarOptions class (Gantt)

BarOptions()

new BarOptions()

The BarOptions type holds all options a bar can display or own. The Bar(name) method gets the bar giving its index, name or reference. The Bar(name) method is equivalent with Chart.Bars.Item(name) method.

Every option of the BarOptions type has associated a property of the Bar object. For instance, the option:

shape {any}, defines the shape to apply on the bar's background
is associated with the property:
Shape {any}, defines the shape to apply on the bar's background
which means that the following statements are equivalent:
oBar.Options = {shape: exontrol.Shapes.Button}
oBar.SetOptions({shape: exontrol.Shapes.Button})
oBar.Shape = exontrol.Shapes.Button
oBar.SetShape(exontrol.Shapes.Button)
where oBar is an object of Bar type
BarOptions

Members

(static) def :object

The def field defines default options for the current type of the bars, as an object of ItemBarOptions type.
Type:
  • object
Example
null {null}, resets all default-options
 {selectable: false} {object}, makes unselectable all bars of the current type
 {caption: "<%=%C0%>"} {object}, all bars of the current type displays the caption of the first column
def

(static) formatHistogramValues :string

The formatHistogramValues field formats the bar's value in the histogram The expression supports the following keywords:
"value", defines the cumulative bar's effort or also called the bar's histogram value
.
Type:
  • string
Example
"" or "value" {string}, specifies that the bar's histogram value is displayed as it is (unformatted)
 "value + '%'" {string}, displays the value followed by an percent character
 "value format '1'" {string}, displays the value using a single digit
 "value = int(value) ? value : value format ''" {string}, displays the value without digits if integer (.00), and with two digits for any other type
formatHistogramValues

(static) height :number

The height field specifies the height of the bar.
Type:
  • number
Example
null {null}, the bar's height is 18 by default
 -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) histogramCriticalColor :string

The histogramCriticalColor field specifies the color to show the bars that exceed the critical value.
Type:
  • string
Example
"" {string}, hides the critical value
 "red" {string}, shows bars that exceed the critical value in red
 "rgba(255,0,0,0.5)" {string}, shows bars that exceed the critical value in partial-transparent red
histogramCriticalColor

(static) histogramCriticalValue :number

The histogramCriticalValue field specifies the bar's critical value.
Type:
  • number
Example
0 {number}, any bar is critical
 10 {number}, any bar that exceeds the value of 10 into histogram is critical
histogramCriticalValue

(static) histogramCumulativeColors :string

The histogramCumulativeColors field indicates the colors (separated by comma character) the histogram may show when it displays bars using cumulative type (only if the bar's histogramType option includes exHistCumulative flag, or the chart's histogramView option includes the exHistogramGroupCumulative flag ).
Type:
  • string
Example
"" {string}, no cumulative-color is applied
 "red,green,blue" {string}, the histogram shows the bars of the current type, in red, green and blue
histogramCumulativeColors

(static) histogramCumulativeOriginalColorBars :Gantt.HistogramCumulativeOriginalColorBarsEnum

The histogramCumulativeOriginalColorBars field specifies specifies whether the original bar's color is changed accordingly to the cumulative histogram. The exontrol.Gantt.HistogramCumulativeOriginalColorBarsEnum type supports the following values:
  • exShowCumulativeColor(-1), the color for the bar is not changed, but its reflection in the histogram shows the corresponding cumulative color
  • exChangeColor(0), the color for the bar and its reflection in the histogram is showing the corresponding cumulative color
  • exKeepOriginalColor(1), the color for the bar and its reflection in the histogram is not changed
.
Type:
Example
null {null} or 0 or exontrol.Gantt.HistogramCumulativeOriginalColorBarsEnum.exChangeColor {number}, the color for the bar and its reflection in the histogram is showing the corresponding cumulative color
 1 or exontrol.Gantt.HistogramCumulativeOriginalColorBarsEnum.exChangeColor {number}, the color for the bar and its reflection in the histogram is not changed
histogramCumulativeOriginalColorBars

(static) histogramCumulativeShowLegend :number

The histogramCumulativeShowLegend field specifies the index of the column to display the legend for the cumulative bars in the histogram.
Type:
  • number
Example
-1 {number}, no histogram-legend is displayed for the current type of bars
1 {number}, the column with the index 1, provides the histogram-legend for the current type of bars.
histogramCumulativeShowLegend

(static) histogramGridLinesColor :string

The histogramGridLinesColor field specifies the color to show the histogram's grid lines.
Type:
  • string
Example
"" {string}, no grid lines are shown
 "gray" {string}, shows the histogram's grid lines in gray
 "rgba(0,0,0,0.5)" {string}, shows the histogram's grid lines in partial-transparent black
histogramGridLinesColor

(static) histogramItems :number

The histogramItems field specifies the number of items being represented in the histogram when overload histogram is shown, as explained:
  • negative {number}, the absolute value represents the fixed number of units being displayed on the vertical axis
  • 0 {number}, the height of the units being displayed in the histogram is computed, so all units fit the histogram area
  • positive {number}, indicates the number of minimum units being displayed on the vertical axis
.
Type:
  • number
Example
0 {number}, re-scales the histogram to fit all histogram-units
 10 {number}, prepares the histogram to display up to 10 items (rescales the histogram to fit all, if it requires more)
 -10 {number}, the histogram always displays 10 items
histogramItems

(static) histogramRulerLinesColor :string

The histogramRulerLinesColor field specifies the color to show the histogram's ruler lines.
Type:
  • string
Example
"" {string}, no ruler lines are shown
 "black" {string}, shows the histogram's ruler lines in black
 "rgba(0,0,0,0.5)" {string}, shows the histogram's ruler lines in partial-transparent black
histogramRulerLinesColor

(static) histogramShape :any

The histogramShape field defines the shape to apply on the bar's background, when it is represented into the control's histogram. The histogramShape field can be 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
Example
"" {string}, null {null}, no shape is applied (the bar is not represented into the control's histogram)
 "red" {string}, shows rectangular-red histogram
 '{"frameColor": "black", "primitive": "Spline"}' {string}, shows spline-curve histogram
 '{"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
 {frameColor: "blue", frameSize: 3, fillColor: "rgba(0,0,255,0.5)", primitive: "Spline"} {object}, shows filled spline-curve histogram
histogramShape

(static) histogramType :Gantt.HistogramTypeEnum

The histogramType field specifies the type of the bar's histogram, or how the bar's effort is represented into the control's histogram. The exontrol.Gantt.HistogramTypeEnum type supports the following values and flags:
  • exHistOverload(0), shows the overloads and subloads of your current planning situation (the histogram-graph shows the count of specified tasks day by day, or unit by unit)
  • exHistOverAllocation(1), shows in percents, the over-allocations of your current planning situation using the effort of the task divided by the length of the task (effort/length). The exHistOverAllocation flag can be combined with exHistOverAllocationFixed or exHistOverAllocationMultiply. The work-load for a task is computed as exBarEffort / length of the bar. The work-load for the task is the work effort / task duration. (i.e. If item.exBarEffort = 1 and bar's length is 10 days, then the work-load = 0.1 or 10%). The histogram- graph shows the sum of the work-loads (the work-load of each task item is added, unit by unit)
  • exHistCumulative(0x100), bars in the histogram show cumulative colors (the exHistCumulative can be applied to exHistOverload and exHistOverAllocation values. For instance, the exHistOverAllocation + exHistCumulative defines a cumulative histogram for exHistOverAllocation type)
  • exHistOverAllocationFixed(0x200), shows in percents, the over-allocations of your current planning situation using the effort of the task (effort) (the exHistOverAllocationFixed can be combined with the exHistOverAllocation flag only)
  • exHistOverAllocationMultiply(0x400), shows in percents, the over-allocations of your current planning situation using the effort of the task multiplied by the length of the task (effort * length) (the exHistOverAllocationFixed can be combined with the exHistOverAllocation flag only)
.
Type:
Example
0 or exontrol.Gantt.HistogramTypeEnum.exHistOverload {number} shows the overloads and subloads of your current planning situation
 1 or exontrol.Gantt.HistogramTypeEnum.exHistOverAllocation {number} shows the overloads and subloads of your current planning situation, in percents
histogramType

(static) name :string

The name field specifies the name of the bar. If the name includes the '%' character, it defines a bar of percent-type ("A%B"). A bar of percent-type displays and handles inner progress-bar, according with the bar's "percent" option.
The A of "A%B" format can be:
  • the name of already added bar, that defines the base-bar or the background-bar, such as "Task"
  • the index of already added bar, that defines the base-bar or the background-bar, such as 0
The B of "A%B" format can be:
  • the name of already added bar, that defines the progress-bar or the foreground-bar, such as "Progress"
  • the index of already added bar, that defines the progress-bar or the foreground-bar, such as 0
  • the shape to show the progress-bar or the foreground-bar as
    • "red" {string}, fills the progress-bar in red (CSS color)
    • '{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the progress-bar 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 progress-bar. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
.
Type:
  • string
Example
"Task" {string}, names the bar to "Task"
 "Task%Progress" {string}, defines a "Task" bar of percent-type, so it displays the bar's "percent" value using the "Progress" shape
 "Summary%Task" {string}, defines a "Summary" bar of percent-type, so it displays the bar's "percent" value using another "Task" shape
 "Task%red" {string}, defines a "Task" bar of percent-type, so it displays the bar's "percent" value using the "red" color
 "Task%Button" {string}, defines a "Task" bar of percent-type, so it displays the bar's "percent" value using the "Button" already-defined shape
 'Summary%{"fillColor": "rgba(0,0,0,0.5)", "client": "[,y+2*height/3+3,,height/3]", "primitive": "round"}' {string}, defines a "Summary" bar of percent-type, so it displays the bar's "percent" value using a predefined shape
name

(static) overlaid :object

The overlaid field specifies the options for the specified overlaid type, as an object of {offset, intersect, stack, cascade} type where:
offset {number}, specifies the vertical offset, to display the overlaid bars (it has effect for exOverlaidBarsOffset type only)
intersect {any}, specifies the shape to be shown on the portion that laid over bars (it has effect for exOverlaidBarsIntersect type only)
stack {number}, specifies the vertical-distance between two bars that covers each other (it has effect for exOverlaidBarsStack type only)
cascade {number}, specifies the vertical-distance between two bars that covers each other (it has effect for exOverlaidBarsCascade type only)
.
Type:
  • object
Example
null {null},  specifies the default option for all overlaid types
 {cascade: 4} {object}, changes the vertical-distance between two bars that covers each other, when overlaidType is exOverlaidBarsCascade
overlaid

(static) overlaidGroup :string

The overlaidGroup field specifies the list of bars beside the current bar that may cover each other (separated by comma character).
Type:
  • string
Example
"" {string} or null {null}, only bars of the same type get arranged based on the overlaidType property.
 "Task,Milestone,Deadline" {string} , all these type of bars get arranged based on the overlaidType property.
overlaidGroup

(static) overlaidType :Gantt.OverlaidBarsTypeEnum

The overlaidType field specifies specifies how overlaid bars are arranged. The exontrol.Gantt.OverlaidBarsTypeEnum type supports the following values and flags:
  • exOverlaidBarsNone(0), no overlaid bars are shownoverlaidType
  • exOverlaidBarsOffset(1), the overlaid bars are shown using a different vertical offset. The Overlaid(exOverlaidBarsOffset) specifies the vertical offset, in pixels, to display the overlaid bars. This option does NOT change the height of the item.
  • exOverlaidBarsIntersect(2), the overlaid portion is shown using a different type of bar. The Overlaid(exOverlaidBarsIntersect) specifies the name of the bar to be displayed on the portion that laid over bars. This option does NOT change the height of the item.
  • exOverlaidBarsStack(3), the bars that covers each other are shown as a stack. The Overlaid(exOverlaidBarsStack) specifies the distance in pixels between two bars that covers each other. This option changes the height of the item so the bars that covers each other are displayed entirely.
  • exOverlaidBarsCascade(4), the bars gets arranged as a cascade with the z-order being indicated by ItemBar(exBarOverlaidCascade) key. Arrange the bars on the same level for those with the same exBarOverlaidCascade key, and on a different level for bars with a different exBarOverlaidCascade key. This option changes the height of the item so the bars that covers each other are displayed entirely.
  • exOverlaidBarsTransparent(0x100), the overlaid portion is shown using a semi-transparent color. The Overlaid(exOverlaidBarsTransparent) specifies the percent of transparency being applied to the covered bar.
  • exOverlaidBarsStackAutoArrange(0x200), the overlaid stack is automatically arranged for best fit in the item. The exOverlaidBarsStackAutoArrange flag can be combined with exOverlaidBarsStack flag only.
  • exOverlaidBarsIncludeCaption(0x1000), the overlaid mechanism includes the caption for bars
  • exOverlaidBarsStrict(0x2000), the overlaid mechanism includes only bars in the same group ( OverlaidGroup property ) but of different types.
.
Type:
Example
0 {number} or null {null}, no overlaid bars are shown
 4 or exontrol.Gantt.OverlaidBarsTypeEnum.exOverlaidBarsCascade {number}, the bars gets arranged as a cascade with the z-order being indicated by ItemBar(exBarOverlaidCascade) key.
overlaidType

(static) overviewColor :string

The overviewColor field defines the color to show bars of the same type within the control's overview.
Type:
  • string
Example
"" {string} or null{null}, the overview color of the item-bar is defined by the item-bar's overviewColor, bar's overviewColor, item-bar's shape fill, pattern or frame color (the first truly value in this order)
 "transparent" or "rgba(0,0,0,0)" {string}, the overview representation of the bar is hidden
 "red" or "#FF0000", "rgb(255,0,0)", "rgba(255,0,0,1)", ... {string}, the bar is shown in red within the control's overview
overviewColor

(static) shape :any

The shape field defines the shape to apply on the bar's background The shape field can be 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
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
shape

(static) shortcut :string

The shortcut field specifies the shortcut name, or an alternate name to refer the bar.
Type:
  • string
Example
"Task" {string}, renames the bar to "Task"
shortcut

(static) showHistogramValues :string

The showHistogramValues field defines the formula/expression that returns the color to display the bar's histogram value. The expression supports the following keywords:
"value", defines the cumulative bar's effort or also called the bar's histogram value
.
Type:
  • string
Example
"0", "" {string} or null {null}, the bar's histogram value is never shown
 "1" {string}, the bar's histogram value is always shown (#1)
 "'green'" {string}, the bar's histogram value is always shown in green (please pay attention to green which is quoted by ' characters)
 "value > 5 ? 'red' : 0" {string}, the bar's histogram value is displayed in red only if it greater than 5
 "value < 5 ? '#FF' : 'rgba(0,0,0,0.5)'" {string}, shows the bar's histogram value in blue if it less than 5, else in partial-gray
showHistogramValues