Type | Description | |||
ItemA as HITEM | A long expression that indicates the handle of the item that contains the bar to group to. | |||
KeyA as Variant | A long or string expression that specifies the key of the bar to group to. The Key parameter of the AddBar method specifies the key of the bar being added. | |||
StartA as Boolean | A boolean expression that specifies whether the start or the end of the bar is grouped with other bar. True specifies that the start of the bar is grouped with other bar. False indicates that the end of the bar is grouped with other bar. | |||
ItemB as HITEM | A long expression that indicates the handle of the item that contains the bar being grouped with. | |||
KeyB as Variant | A long or string expression that specifies the key of the bar being grouped with. | |||
StartB as Boolean | A boolean expression that specifies whether the start or the end of the bar is grouped with other bar. True specifies that the start of the bar is grouped with other bar. False indicates that the end of the bar is grouped with other bar. | |||
GroupBarsOptions as Variant | ( exGroupBarsOptionNone, by default or if missing ) A GroupBarsOptionsEnum expression or a combination that specifies the way the bars gets grouped together. For instance, the exPreserveBarLength + exFlexibleInterval specifies that the bars preserves their lengths, and the bar B can be moved anywhere to the right of the bar A. If the GroupBarsOptions is exGroupBarsNone the bars are ungrouped. | |||
Options as Variant | ( empty, by default or if missing ) A String expression that specifies a list of double values, separated by ; character, that specifies in this order: fixed interval ; maximum value when interval is increased, minimum value when the interval between bars is decreased. For instance, "2;4" value specifies that the interval between two bars should be 2 days and the interval can't be greater than 6 ( 2 + 4 ). Use the exLimitIntervalMin, exLimitIntervalMax, exLimitInterval or exFlexibleInterval for the GroupBarsOptions parameter when specifying the range of values that the interval between bars should be. |
The length of the bar and interval between two bars are defined as follows:
If using the NonworkingDays property, the ItemBar(exBarKeepWorkingCount) property indicates whether the working units of the bar is keep constant while moving/grouping. If the GroupBarsOptions parameter includes the exLimitIntervalTreatAsWorking the interval between bars is indicating the working days between days.
Samples:
Use the AddLink method to add or draw a link between two bars. Use the DefineSummaryBars method to define bars in a summary bar, so it gets updated as soon as the child bars are moved or resized. Use the UngroupBars method to ungroup two bars or all bars. The Items.ItemBar(exBarsGroup) property retrieves a collection of item,key that defines the bars begin grouped with specified bar.
The following screen shots show the changes in a group of 3 bars ( 1, 2 and 3 ), when the bar 2 ( the arrow ) is moved from Sep 26 to Sep 29, using different options for GroupBarsOptions and Options parameters. Click on the picture and view the XML file that was used to generate the picture. The Groups section stores the groups of bars. You can use the LoadXML method to load the chart from these XML files. The XML file does not load EBN files!
The following screen shot shows the chart before performing any change.
The following screen shot shows the chart after moving the bar 2, when the GroupBarsOptions and Options parameters are missing ( by default ). You can notice that the bar 1 and 3 are resized.
The following screen shot shows the chart after moving the bar 2, when the GroupBarsOptions parameter is exPreserveBarLength. You can notice that all bars are moved to preserve their lengths.
The following screen shot shows the chart after moving the bar 2, when the GroupBarsOptions parameter is exPreserveBarLength + exFlexibleInterval. All bars in the group preserves their lengths, and the bar 2 can be moved anywhere to the right of the bar 1
The following screen shot shows the chart after moving the bar 2, when the GroupBarsOptions parameter is exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval, and the Options parameter is "0;1", which means the interval between two bars may be between 0 and 1, with a starting fixed interval being 0.
By default, when grouping, the distance between the margin of the bars being grouped is kept constant. For instance, if we group the end of the bar a with the start of the bar B, the distance between end of the bar a and the start of the bar B is the same when moving or resizing any of the bars A or B.
Let's stay that we have the following chart:
with the keys:
By default ( no bars are grouped ), if we move the bar 2, from Oct 19, to Oct 21 , we get the following ( the bar 1, 3, and M are not moved or resized ):
If we group the bars as follows:
, and we move the bar 2, from Oct 19, to Oct 24 we get the following:
we notice that the bar 2 and M are moved, and bar 1 is resized.