The function sets preferences for the selected trend chart. If more than one trend chart is defined and no chart is selected, this call returns an error.
Note: | Before calling CB.TrendPrefsND, run a simulation. |
Table 190. Parameters for CB.TrendPrefsND
Parameter | VBA Data Type | Value | Description |
---|
Index | Integer | See Table 191 | Works with the other parameters to set trend chart preferences |
Value1 | Variant | See Table 192 | Works with the other parameters to set trend chart preferences |
Value2 (Optional) | Variant | See Table 193 | Works with the other parameters to set trend chart preferences |
Value3 (Optional) | Variant | See Table 194 | Works with the other parameters to set trend chart preferences |
Value4 (Optional) | For Index = 8: Integer | Any integer between 0 and 100 (inclusive) | Sets a fourth certainty band to display. Use this with Value1 through Value3 |
Value5, Value6, Value7 (All optional) | Integer | Any integer between 0 and 100 (inclusive) | Sets up to three more certainty bands to display. Use this with Value1 through Value4 |
Table 191, following, describes the Index parameter.
Table 191. CB.TrendPrefsND Index Parameter Values — Required, Integer
Named Constant Value | Index Value | Description |
---|
cbTrdTitle | 1 | Gives the trend chart a title, as defined by Value1 |
cbTrdChooseFore | 2 | Clears and selects the forecasts for the trend chart, according to Value1 |
cbTrdVertGridLines | 4 | Turns on and off the vertical grid lines, according to Value1 |
cbTrdHorzGridLines | 5 | Turns on and off the horizontal grid lines, according to Value1 |
cbTrdChartType | 6 | Sets the trend chart type, according to Value1 |
cbTrdValueAxis | 7 | Sets options for the value axis, according to Value1 |
cbTrdCertaintyBands | 8 | Sets up to 7 certainty bands to display, according to Value1 through Value7 |
Note: | Index = cbTrdForeTitleAxis [3] is now obsolete. |
Table 192, following, describes the Value1 parameter.
Table 192. CB.TrendPrefsND Value1 Parameter Values — Required, Variant
Used With Specified Values of Index | Named Constant or Other Value | Index Value | Description |
---|
For Index = 1: String | Title in quotes ("") | n/a | Defines the trend chart title |
For Index = 2: Integer | cbChfAdd | 4 | Adds the forecast in the selected cell to the list of chosen forecasts |
For Index = 2: Integer | cbChfClearList | 5 | Clears the list of chosen forecasts |
For Index = 4: Boolean | True or False | n/a | True turns on vertical grid lines. False turns them off. |
For Index = 5: Boolean | True or False | n/a | True turns on horizontal grid lines. False turns them off. |
For Index = 6: Integer | cbTypReverseCumulCert | 1 | Displays the reverse cumulative certainties view of the chart |
For Index = 6: Integer | cbTypCumulCert | 3 | Displays the cumulative certainties view of the chart |
For Index = 6: Integer | cbTypCertCenteredOnMedian | 4 | Displays the chart with certainties centered on the median |
For Index = 7: Integer | cbValZeroBased | 1 | Uses zero-based value axes, normalizing the lowest forecast value to 0. This constant is included for compatibility with Crystal Ball 2000.x (5.x). |
For Index = 7: Integer | cbValRelative | 2 | Uses relative value axes (the actual minimum and maximum values) |
For Index = 7: Integer | cbValMinMaxDiv | 3 | Uses value axes by setting a minimum (Value2) and a maximum (Value3) so you can focus on a particular value range |
For Index = 8: Integer | Any integer between 0 and 100 (inclusive) | n/a | Sets the first certainty band to display. Use this with Value2 through Value7 |
Note: | cbTypCertCenteredOnMean [2] is now obsolete. |
Table 193, following, describes the Value2 parameter.
Table 193. CB.TrendPrefsND Value2 Parameter Values — Optional, Variant
Used With Specified Parameters and Values | Value | Description |
---|
For Index = 7 and Value1 = 3: Double | Any number | Defines the minimum value for the value axis |
For Index = 8: Integer | Any integer between 0 and 100 (inclusive) | Sets a second certainty band to display. Use this with Value1. |
Table 194, following, describes the Value3 parameter.
Table 194. CB.TrendPrefsND Value3 Parameter Values — Optional, Variant
Used With Specified Parameters and Values | Value | Description |
---|
For Index = 7 and Value1 = 3: Double | Any number | Defines the maximum value for the value axis |
For Index = 8: Integer | Any integer between 0 and 100 (inclusive) | Sets a third certainty band to display. Use this with Value1 and Value2. |
When Value1 is cbChfAdd, the active cell must contain a forecast; otherwise, CB.MacroResult returns cbErrNoForecastInCell. Crystal Ball adds the selected cell to the list of forecasts to appear in the trend chart.
To display a specific set of forecasts in a certain order on the trend chart, first clear the list of selected cells by calling this macro with Value1 set to cbChfClearList. Then, for each forecast, use Range.Select to highlight the desired forecast cell and call this macro with Value1 set to cbChfAdd.
You can set the percentage values of as many as seven certainty bands. Set Index to cbTrdCertaintyBands and supply the percentage values in Value1 through Value7. They will appear in the trend chart in the order that you define them, so define them from smallest to largest or from largest to smallest.
See the Oracle Crystal Ball User's Guide for more information on how to customize the trend chart.