CB.ChartPrefsND

This subroutine sets chart preferences for the forecast or assumption corresponding to the selected cell without displaying the Chart Preferences dialog. The default for any preference is the previous setting in the Chart Preferences dialog.

Note:

You must select a forecast or assumption cell before calling this subroutine to change the chart preferences for a single forecast or assumption. If you call this subroutine to change a single forecast or assumption chart (All is False) when no forecast or assumption cell is selected, CB.MacroResultDetail.NewValue returns error code -5102.

Table 22. CB.ChartPrefsND Parameters

Parameter

VBA Data Type

Description

Index

Integer

Sets basic forecast and assumption chart preferences, according to the Value parameter settings. For constant and index values, see Table 23.

Value

Variant

Works with the Index parameter to set forecast and assumption chart preferences. For available value settings, see Table 24.

All (Optional)

Variant

True applies settings to all assumptions or forecasts. False applies settings only to the selected assumption or forecast. The default is False.

Note:

Optional parameters SeriesAxisIndex, Value2, and Value3 are currently not supported.

The Index parameter (Table 23) works with the Value parameter (Table 24) to set basic forecast and assumption chart preferences.

Table 23. CB.ChartPrefsND Index Parameter Values — Required, Integer

Named Constant Value

Index Value

Description

cbChtChartType

1

Sets the chart type, according to the Value setting

cbChtDistType

2

Sets the distribution type, according to the Value setting

cbChtGroups

3

Sets the grouping in the histogram, according to the Value setting

cbChtMeanLine

5

Turns on and off the mean line, according to the Value setting

cbChtHorizGrids

6

Turns on and off horizontal grid lines, according to the Value setting

Note:

The following Index constant is obsolete in Crystal Ball 7.x and later (including 11.x): cbChtRedrawFrequency, Index = 4.

The Value parameter (Table 24) works with the Index parameter (Table 23) to set forecast and assumption chart preferences.

Table 24. CB.ChartPrefsND Value Parameter Values — Required Variant

Used With Specified Values of Index

Named Constant or Boolean Value

Index Value

Description

For Index = 1, cbChtChartType: Integer

cbTypArea

1

Changes the assumption or forecast chart type to an area chart

For Index = 1, cbChtChartType: Integer

cbTypOutline

2

Changes the assumption or forecast chart type to an outline chart

For Index = 1, cbChtChartType: Integer

cbTypColumn

3

Changes the assumption or forecast chart type to a column chart

For Index = 2, cbChtDistType: Integer

cbDstFrequency

1

Changes the distribution type to a frequency distribution

For Index = 2, cbChtDistType: Integer

cbDstCumulative

2

Changes the distribution type to a cumulative frequency distribution

For Index = 2, cbChtDistType: Integer

cbDstReverseCumul

3

Changes the distribution type to a reverse cumulative frequency distribution

For Index = 3, cbChtGroups: Boolean

cbGrp15

1

Equivalent to the Chart Bins Density setting of Lowest on the General tab of the Chart Preferences dialog

For Index = 3, cbChtGroups: Boolean

cbGrp25

2

Equivalent to the Chart Bins Density setting of Low on the General tab of the Chart Preferences dialog

For Index = 3, cbChtGroups: Boolean

cbGrp50

3

Equivalent to the Chart Bins Density setting of Low on the General tab of the Chart Preferences dialog

For Index = 3, cbChtGroups: Boolean

cbGrp75

4

Equivalent to the Chart Bins Density setting of Medium on the General tab of the Chart Preferences dialog

For Index = 3, cbChtGroups: Boolean

cbGrp100

5

Equivalent to the Chart Bins Density setting of High on the General tab of the Chart Preferences dialog

For Index = 3, cbChtGroups: Boolean

cbGrp150

6

Equivalent to the Chart Bins Density setting of High on the General tab of the Chart Preferences dialog

For Index = 3, cbChtGroups: Boolean

cbGrp300

7

Equivalent to the Chart Bins Density setting of Highest on the General tab of the Chart Preferences dialog

For Index = 5, cbChtMeanLine: Boolean

True or False

n/a

Turns on (True) or off (False) the mean line

For Index = 6, cbChtHorizGrids: Boolean

True or False

n/a

Turns on (True) or off (False) the horizontal grid lines

Note:

See the Oracle Crystal Ball User's Guide for more information on how to customize assumption and forecast charts.