SetColorArray method: Chart class

Syntax

SetColorArray(&Array_of_Color)

Description

PeopleSoft charts are delivered with a default color sequence. If you want to specify a different sequence, use the SetColorArray method to set the colors for a series. You can specify only a one-dimensional array for the parameter.

This method applies to the base chart and to the overlay chart. Color values are applied first to the base chart, then to the overlay chart. For example, if the base chart contains four series, then the fifth color value is applied to the first series in the overlay chart, and so on.

The type of array can be any of the following:

  • String

  • Number

  • Integer

  • Decimal

Use the SetColorArray method for line charts instead of SetDataColor because SetDataColor does not work with line charts. Individual line segments cannot be colored because there are fewer line segments than points. Use SetColorArray instead to color each complete line (series).

Parameters

Parameter Description

&Array_of_Color

Specify an already instantiated array that contains the color values that you want for the series. You can specify either a constant or a number.

The following lists all the values you can specify. You can use either the numeric or constant value.

Numeric Value Constant Value Description

-1

%ChartColor_Series_Default

Default series color. When a data point is set to this, the default series color or the color that has been set by the programmer for that series is used instead. This value works only with the SetColorArray method of the Chart class.

0

%ChartColor_Black

Black

1

%ChartColor_Blue

Blue

2

%ChartColor_Cyan

Cyan

3

%ChartColor_DarkGray

Dark gray

4

%ChartColor_Gray

Gray

5

%ChartColor_Green

Green

6

%ChartColor_LightGray

Light gray

7

%ChartColor_Magenta

Magenta

8

%ChartColor_Orange

Orange

9

%ChartColor_Pink

Pink

10

%ChartColor_Red

Red

11

%ChartColor_White

White

12

%ChartColor_Yellow

Yellow

13

%ChartColor_Red_Orange

Red-orange

14

%ChartColor_Yellow_Green

Yellow-green

15

%ChartColor_Blue_Violet

Blue-violet

16

%ChartColor_Purple

Purple

17

%ChartColor_Yellow_Orange

Yellow-orange

Returns

None.

Example

The following example sets the four series in the chart:

&NumArray = CreateArray(1, 3, 6, 9);

&oChart.SetColorArray(&NumArray);