new BarOptions()
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 backgroundis associated with the property:
Shape {any}, defines the shape to apply on the bar's backgroundwhich means that the following statements are equivalent:
oBar.Options = {shape: exontrol.Shapes.Button}where oBar is an object of Bar type
oBar.SetOptions({shape: exontrol.Shapes.Button})
oBar.Shape = exontrol.Shapes.Button
oBar.SetShape(exontrol.Shapes.Button)
Members
(static) def :object
The Def property of the Bar object is associated with the def field of the BarOptions type, so the following statements are equivalent:
oBar.Options = {def: {selectable: false}}
oBar.SetOptions({def: {selectable: false}})
oBar.Def = {selectable: false}
oBar.SetDef({selectable: false}})
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 expression supports the following keywords:
"value", defines the cumulative bar's effort or also called the bar's histogram value
The formatHistogramValues field is associated with the Bar.FormatHistogramValues property, so the following statements are equivalent:
oBar.Options = {formatHistogramValues: "value + '%'"}
oBar.SetOptions({formatHistogramValues: "value + '%'"})
oBar.FormatHistogramValues = "value + '%'"
oBar.SetFormatHistogramValues("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 is mapped to the Bar.Height property, so the following statements are equivalent:
oBar.Options = {height: 12}
oBar.SetOptions({height: 12})
oBar.Height = 12
oBar.SetHeight(12)
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 is mapped to the Bar.HistogramCriticalColor property, so the following statements are equivalent:
oBar.Options = {histogramCriticalColor: "red"}
oBar.SetOptions({histogramCriticalColor: "red"})
oBar.HistogramCriticalColor = "red"
oBar.SetHistogramCriticalColor("red")
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 is mapped to the Bar.HistogramCriticalValue property, so the following statements are equivalent:
oBar.Options = {histogramCriticalValue: 10}
oBar.SetOptions({histogramCriticalValue: 10})
oBar.HistogramCriticalValue = 10
oBar.SetHistogramCriticalValue(10)
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 is mapped to the Bar.HistogramCumulativeColors property, so the following statements are equivalent:
oBar.Options = {histogramCumulativeColors: "red,green,blue"}
oBar.SetOptions({histogramCumulativeColors: "red,green,blue"})
oBar.HistogramCumulativeColors = "red,green,blue"
oBar.SetHistogramCumulativeColors("red,green,blue")
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 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
The histogramCumulativeOriginalColorBars field is mapped to the Bar.HistogramCumulativeOriginalColorBars property, so the following statements are equivalent:
oBar.Options = {histogramCumulativeOriginalColorBars: exontrol.Gantt.HistogramCumulativeOriginalColorBarsEnum.exChangeColor}
oBar.SetOptions({histogramCumulativeOriginalColorBars: exontrol.Gantt.HistogramCumulativeOriginalColorBarsEnum.exChangeColor})
oBar.HistogramCumulativeOriginalColorBars = exontrol.Gantt.HistogramCumulativeOriginalColorBarsEnum.exChangeColor
oBar.SetHistogramCumulativeOriginalColorBars(exontrol.Gantt.HistogramCumulativeOriginalColorBarsEnum.exChangeColor)
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 is mapped to the Bar.HistogramCumulativeShowLegend property, so the following statements are equivalent:
oBar.Options = {histogramCumulativeShowLegend: 1}
oBar.SetOptions({histogramCumulativeShowLegend: 1})
oBar.HistogramCumulativeShowLegend = 1
oBar.SetHistogramCumulativeShowLegend(1)
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 is associated with the Bar.HistogramGridLinesColor property, so the following statements are equivalent:
oBar.Options = {histogramGridLinesColor: "gray"}
oBar.SetOptions({histogramGridLinesColor: "gray"})
oBar.HistogramGridLinesColor = "gray"
oBar.SetHistogramGridLinesColor("gray")
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
- 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
The histogramItems field is mapped to the Bar.HistogramItems property, so the following statements are equivalent:
oBar.Options = {histogramItems: 10}
oBar.SetOptions({histogramItems: 10})
oBar.HistogramItems = 10
oBar.SetHistogramItems(10)
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 is associated with the Bar.HistogramRulerLinesColor property, so the following statements are equivalent:
oBar.Options = {histogramRulerLinesColor: "gray"}
oBar.SetOptions({histogramRulerLinesColor: "gray"})
oBar.HistogramRulerLinesColor = "gray"
oBar.SetHistogramRulerLinesColor("gray")
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 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 histogramShape field is associated with the Bar.HistogramShape property, so the following statements are equivalent:
oBar.Options = {histogramShape: exontrol.Shapes.Button}
oBar.SetOptions({histogramShape: exontrol.Shapes.Button})
oBar.HistogramShape = exontrol.Shapes.Button
oBar.SetHistogramShape(exontrol.Shapes.Button)
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.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)
{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 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)
When the histogramType field includes the exHistCumulative flag, or the chart's histogramView option includes the exHistogramGroupCumulative flag, the bars are shown using cumulative colors specified by the histogramCumulativeColors field, and the histogramCriticalColor and histogramCriticalValue fields are ignored.
The histogramType field is mapped to the Bar.HistogramType property, so the following statements are equivalent:
oBar.Options = {histogramType: exontrol.Gantt.HistogramTypeEnum.exHistOverload}
oBar.SetOptions({histogramType: exontrol.Gantt.HistogramTypeEnum.exHistOverload})
oBar.HistogramType = exontrol.Gantt.HistogramTypeEnum.exHistOverload
oBar.SetHistogramType(exontrol.Gantt.HistogramTypeEnum.exHistOverload)
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 A of "A%B" format can be:The B 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 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.Gantt.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)
The name field is associated with the Name property of the Bar object, so the following statements are equivalent:
oBar.Options = {name: "Task"}
oBar.SetOptions({name: "Task"})
oBar.Name = "Task"
oBar.SetName("Task")
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
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)
The overlaidGroup field specifies the list of bars beside the current bar that may cover each other (separated by comma character). The overlaidType field specifies specifies how overlaid bars are arranged. Mechanism for overlaid bars is applied only for bars within the same group ( OverlaidGroup property ) but of different types, when the exOverlaidBarsStrict flag is set within the overlaidType field.
The overlaid field is mapped to the Bar.Overlaid property, so the following statements are equivalent:
oBar.Options = {overlaid: {cascade: 4}}
oBar.SetOptions({overlaid: {cascade: 4}})
oBar.Overlaid = {cascade: 4}
oBar.SetOverlaid({cascade: 4})
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 is mapped to the Bar.OverlaidGroup property, so the following statements are equivalent:
oBar.Options = {overlaidGroup: "Task,Milestone"}
oBar.SetOptions({overlaidGroup: "Task,Milestone"})
oBar.OverlaidGroup = "Task,Milestone"
oBar.SetOverlaidGroup("Task,Milestone")
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 is mapped to the Bar.OverlaidType property, so the following statements are equivalent:
oBar.Options = {overlaidType: exontrol.Gantt.OverlaidBarsTypeEnum.exOverlaidBarsOffset}The exontrol.Gantt.OverlaidBarsTypeEnum type supports the following values and flags:
oBar.SetOptions({overlaidType: exontrol.Gantt.OverlaidBarsTypeEnum.exOverlaidBarsOffset})
oBar.OverlaidType = exontrol.Gantt.OverlaidBarsTypeEnum.exOverlaidBarsOffset
oBar.SetOverlaidType(exontrol.Gantt.OverlaidBarsTypeEnum.exOverlaidBarsOffset)
- 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 is mapped to the Bar.OverviewColor property, so the following statements are equivalent:
oBar.Options = {overviewColor: "red"}
oBar.SetOptions({overviewColor: "red"})
oBar.OverviewColor = "red"
oBar.SetOverviewColor("red")
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 truthy 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 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 associated with the Shape property of the Bar object, so 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)
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) shortcut :string
The shortcut field is associated with the Shortcut property of the Bar object, so the following statements are equivalent:
oBar.Options = {shortcut: "Task"}
oBar.SetOptions({shortcut: "Task"})
oBar.Shortcut = "Task"
oBar.SetShortcut("Task")
Type:
- string
Example
"Task" {string}, renames the bar to "Task"
The following example shows how to set the default options of a "Task%Progress" bar of percent-type, so all item-bars of "Task%Progress" type will display their inner progress-bar's percent value using the caption format defined by percentCaptionFormat field, and the percent caption will be aligned to the left of the progress-bar:
oGantt.Chart.Bars.Add(
{
name: "Task%Progress",
shortcut: "Task",
def:
{
percent: 0,
showPercentCaption: true,
percentCaptionFormat: "<fgcolor white><sha black;2;0>%p%",
alignPercentCaption: 0
}
})
shortcut
(static) showHistogramValues :string
The expression supports the following keywords:
"value", defines the cumulative bar's effort or also called the bar's histogram value
The showHistogramValues field is associated with the Bar.ShowHistogramValues property, so the following statements are equivalent:
oBar.Options = {showHistogramValues: "value > 5 ? 'red' : 0"}
oBar.SetOptions({showHistogramValues: "value > 5 ? 'red' : 0"})
oBar.ShowHistogramValues = "value > 5 ? 'red' : 0"
oBar.SetShowHistogramValues("value > 5 ? 'red' : 0")
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