Products Downloads


French version


 

This method can be used to set a color for each slice in a pie chart. The color change will be included the next time the DRAW_DATA method is called.

Syntax

CALL_METHOD NamePieObject DEFINE_DATA_COLORS SliceNb ArrColors

Parameters

SliceNb ( I)

NUM_BIN_4 type

Number of slices in the pie chart.

ArrColors (I)

NUM_BIN_4 type

Color array or the special value _PIE_COLOR_RANDOM.

If this parameter is specified as _PIE_COLOR_RANDOM, the object chooses colors for its constituent slices itself. In this case, the object works with a palette of 16 colors.

Possibles values :

_PIE_SLICE_COL_BLACK

_PIE_SLICE_COL_BLUE

_PIE_SLICE_COL_GREEN

_PIE_SLICE_COL_CYAN

_PIE_SLICE_COL_RED

_PIE_SLICE_COL_MAGENTA

_PIE_SLICE_COL_BROWN

_PIE_SLICE_COL_LIGHTGRAY

_PIE_SLICE_COL_DARKGRAY

_PIE_SLICE_COL_LIGHTBLUE

_PIE_SLICE_COL_LIGHTGREEN

_PIE_SLICE_COL_LIGHTCYAN

_PIE_SLICE_COL_LIGHTRED

_PIE_SLICE_COL_LIGHTMAGENTA

_PIE_SLICE_COL_YELLOW

_PIE_SLICE_COL_WHITE

_PIE_SLICE_COL_PASTELRED

_PIE_SLICE_COL_PASTELGREEN

_PIE_SLICE_COL_PASTELBLUE

_PIE_SLICE_COL_PASTELCYAN

_PIE_SLICE_COL_PASTELMAGENTA

_PIE_SLICE_COL_PASTELYELLOW

_PIE_SLICE_COL_SHADE

 

The values _PIE_SLICE_COL_PASTELRED, _PIE_SLICE_COL_PASTELGREEN, _PIE_SLICE_COL_PASTELBLUE, _PIE_SLICE_COL_PASTELCYAN, _PIE_SLICE_COL_PASTELMAGENTA and _PIE_SLICE_COL_PASTELYELLOW can be superimposed between 1 and 15 times to produce a color gradient (with constant + 15 being the palest tone in the gradient).

The _PIE_SLICE_COL_SHADE value can be superimposed on the constants _PIE_SLICE_COL_BLUE to _PIE_SLICE_COL_WHITE (see above) to add a black tint to the color.

 

Conditions for use none.

 

The array ArrColors must contain at least as many elements as there are slices.

 

Detaches any slices in the graphic whose values are set to "*TRUE" in the array ArrSlices.

 

Example: If ArrSlices(1) and ArrSlices(3) are set to "*TRUE", slices 1 and 3 of the graphic will be detached from the pie chart.

 

Syntax

CALL_METHOD NamePieObject DETACH_SLICES ArrSlices

Parameters

ArrSlices (I)

BOOL type array

Conditions for use none.
 

The array ArrSlices must contain at least as many elements as there are slices.

 

Draws a pie chart with:

- the number of slices NbSlices.

- the values stored in the array ArrValues.

- the legends stored in the array ArrLegends.

 

Syntax

CALL_METHOD NamePieObject DRAW_DATA NbSlices ArrValues ArrLegends

Parameters

NbSlices (I)

NUM_BIN_4 type

ArrValues (I)

NUM_E(15, 4) type array

ArrLegends (I)

ALPHA(250) type array

ArrLegends (I)

ALPHA(250) type array

Conditions for use none.
 

The ArrValues and ArrLegends arrays must contain at least as many elements as there are slices.

 

Example >>

 

Prints the pie chart.

Syntax

CALL_METHOD NamePieObject PRINT_GRAPHIC PrinterName Mode

Parameters

PrinterName ( I)

ALPHA(250) type

Name of the printer used to print the chart.

If this parameter is not specified, the computer's default printer is used.

Mode (I)

NUM_BIN_4 type

Print mode used to print the chart.

Possibles values:

_PIE_PRINT_PROPERTIES

Displays the printer selection box and provides access to the printer's properties.

_PIE_PRINT_PORTRAIT

Prints in portrait mode.

_PIE_PRINT_LANDSCAPE

Prints in landscape mode.

Conditions for use none.

 

 

 

 

 

↑ Top of page