Chapter 11:
Pie Chart Attributes (API_)

ATTRIBUTE

Description

API_AUTOFIT_LBLPIE

Autofit Label Pie

API_DEPTH

Depth of Pie chart

API_DRAW_CLOCKWISE

Draw Clockwise Pie chart

API_FORMAT_DATATEXT

Format Data Text in a Pie Chart

API_FORMAT_DATATEXT_ADV

Format Data Text Advanced in a Pie Chart

API_FORMAT_RINGTEXT

Format Ring Text in a ring pie chart

API_FORMAT_RINGTEXT_ADV

Format Ring Text Advanced in a ring pie chart

API_HOLESIZE

Hole size of center ring in a ring pie chart

API_INSET_LBLPIE

Inset Label Pie

API_INSET_PIE

Inset Pie (margins around a pie)

API_PIESPERROW

Pies-Per-Row in a multiple pie chart

API_PLACE_DATALABEL

Place Data Label in a Pie Chart

API_PLACE_VALUELABEL

Place Value Label in a Pie Chart

API_ROTATE

Rotate Pie Chart

API_SHOW_AS_COLUMN

Show As Column a series in a pie chart

API_SHOW_FEELER

Show/Hide Feelers in a pie chart

API_SHOW_LBLFEELER

Show/Hide Label Feeler in a pie chart

API_SHOW_LBLPIE

Show/Hide Label Pie in a pie chart

API_SHOW_LBLRING

Show/Hide Label Ring in a ring pie chart

API_SLICE_DELETE

Slice Delete in a pie chart

API_SLICE_MOVE

Slice Move in a pie chart

API_SLICE_RESTORE

Slice Restore slices deleted or moved in a pie chart

API_TILT

Tilt a pie chart

API_TILT_ON

Tilt On/Off

API_AUTOFIT_LBLPIE

 

This attribute enables/disables autofitting of the group label in the box defined by API_INSET_LBLPIE. If autofitting is disabled, the font size currently defined for group labels is used to draw the label.

Type:

BOOLEAN16

Valid Range:

TRUE/FALSE

 

TRUE=

Group label text is autofitted in the box

 

FALSE=

No autofitting

Default:

TRUE

Example:

/* Disable group label autofit */
BOOLEAN bPieAutofitGroup = FALSE;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_AUTOFIT_LBLPIE ,
      (void FAR *) &bPieAutofitGroup);

Notes:

If API_AUTOFIT_LBLPIE is disabled, A_FONTSIZE_VC could be used to modify the size of the group label font. It is recommended that your application not modify the font size in this manner because the detection box for the label would not be the same size as the label itself. It is recommended that you use API_INSET_LBLPIE to change the size of the group label box to indirectly change the size of the font.

Also See:

API_INSET_LBLPIE, API_SHOW_LBLPIE

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_DEPTH

 

This attribute controls the apparent depth of the pie, that is, thickness of the crust. A value of zero is used to create a pie with no crust, 2-D. A value of 300 creates a crust thickness equal to the height of the frame.

Type:

INT16

Valid Range:

0...300

Default:

15

Example:

INT16 nPieDepth = 75;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_DEPTH,(void FAR *)&nPieDepth);

 

Notes:

1.

Aesthetically good values range from 10 to 50. Greater than 50 and the pie begins to look disproportionate.

 

2.

The value is the number of virtual coordinates divided by 10. For example, a setting of 30 is equivalent to 300 virtual pixels.

Also See:

API_TILT

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_DRAW_CLOCKWISE

 

This attribute determines the direction pie slices are drawn beginning from the rotation angle defined by API_ROTATE. The slices of a pie are drawn in order either clockwise or counter clockwise. This attribute determines the drawing direction.

Type:

BOOLEAN16

Valid Range:

TRUE/FALSE

 

TRUE=

Slices are drawn clockwise (CW) from the starting angle. The example assumes starting angle of 90 degrees

 

 

FALSE=

Slices are drawn counter clockwise (CCW) from the starting angle. The example assumes a starting angle of 90 degrees.

 

Default:

TRUE

Example:

/* Set to Counter Clockwise */
BOOLEAN bPieDrawDirection = FALSE;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_DRAW_CLOCKWISE ,
      (void FAR *) &bPieDrawDirection);

Notes:

The attribute API_ROTATE sets the starting angle of the first slice.

Also See:

API_ROTATE

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_FORMAT_DATATEXT

 

This attribute sets the format that will be used to draw the data labels at the end of the pie slice feelers.

 

Type:

INT16

Valid Range:

1...55 selects one of the following formats. Use a value greater than 60 to trigger the RealToString Callback Function.

 

1=

General

19=

0.000E+00

37=

#,##0M

 

2=

0

20=

0.0e+00

38=

#,##0.00M

 

3=

0.0

21=

0.00e+00

39=

M0

 

4=

0.00

22=

0.000e+00

40=

M0.00

 

5=

#,##0

23=

0K

41=

M#,##0

 

6=

#,##0.00

24=

0.00K

42=

M#,##0.00

 

7=

$0

25=

#,##0K

43=

$0M

 

8=

$0.00

26=

#,##0.00K

44=

$0.00M

 

9=

$#,##0

27=

K0

45=

$#,##0M

 

10=

$#,##0.00

28=

K0.00

46=

$#,##0.00M

 

11=

0%

29=

K#,##0

47=

hh:mm AM/PM

 

12=

0.0%

30=

K#,##0.00

48=

hh:mm:ss AM/PM

 

13=

0.00%

31=

$0K

49=

HH:mm

 

14=

%0

32=

$0.00K

50=

LOCALE_SSHORTDATE

 

15=

%0.0

33=

$#,##0K

51=

LOCALE_SLONGDATE

 

16=

%0.00

34=

$#,##0.00K

52=

MMM yy or yy MMM

 

17=

0.0E+00

35=

0M

53=

MMM dd yy, dd MMM yy, or yy MMM dd

 

18=

0.00E+00

36=

0.00M

54=

MMM dd, dd MMM

         

55=

MMM dd yy hh:mm AM/PM, dd MMM yy HH:mm, or

           

yy MMM dd HH:mm

Default:

11 (%)

Notes:

This attribute modifies the same variable as A2D_FORMATDTXT_Y1. Therefore, changes you make here are also seen in other chart data labels.

Also See:

A2D_FORMATDTXT_Y1, API_SHOW_LBLFEELER

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_FORMAT_DATATEXT_ADV

 

This attribute can be used to define a custom format string for data labels in a pie chart. Use API_FORMAT_DATATEXT if you want to select one of the predefined formats.

Type:

typedef struct _AdvFormatStruct {
     AdvFormatTypes formatType;
     UINT iLZero;
     UINT iDigits;
     UINT iGrouping;
     UINT iNegNumber;
     _TCHAR szScientificSymbol[3];
     _TCHAR szDecimal[5];
     _TCHAR szThousand[5];
     UINT iCurrDigits;
     UINT iMonGrouping;
     UINT iNegCurr;
     UINT iPosCurr;
     _TCHAR szCurrency[5];
     _TCHAR szMonDecimalSep[5];
     _TCHAR szMonThousandSep[5];
     _TCHAR szTimeFormat[32];
     _TCHAR szDateFormat[32];
     _TCHAR szPrefixText[20];
     _TCHAR szPostfixText[20];
     _TCHAR szNumColor[20];
     _TCHAR szNegColor[20];
     _TCHAR szZeroColor[20];
     BOOL bPrefixPercentSymbol;
     double dScaleFactor;
     BOOL bNoNegSign;
     LCID localeID;
     _TCHAR szCustomFormat[256];
} AdvFormatStruct, *AdvFormatPtr;

Valid Range:

See AdvFormatStruct in Appendix A for information about how to fill in the fields in this data structure to define the custom numer format.

Notes:

Use the InitAdvFormat() API to initialize the AdvFormatStruct before you apply this attribute.

Also See:

API_FORMAT_DATATEXT, InitAdvFormat()

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

API_FORMAT_RINGTEXT

 

This attribute sets the format of data text (total value) that can be drawn in the center of the pie.

Type:

INT16

Valid Range:

See API_FORMAT_DATATEXT

Default:

11 (0%)

Example:

INT16 nTotalFormat = 11;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_FORMAT_RINGTEXT,
      (void FAR *)&nTotalFormat);

 

Also See:

API_FORMAT_DATATEXT, API_SHOW_LBLRING

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_FORMAT_RINGTEXT_ADV

 

This attribute can be used to define a custom format string for the data value that can be displayed in the center of a ring pie chart. Use API_FORMAT_RINGTEXT if you want to select one of the predefined formats.

Type:

typedef struct _AdvFormatStruct {
     AdvFormatTypes formatType;
     UINT iLZero;
     UINT iDigits;
     UINT iGrouping;
     UINT iNegNumber;
     _TCHAR szScientificSymbol[3];
     _TCHAR szDecimal[5];
     _TCHAR szThousand[5];
     UINT iCurrDigits;
     UINT iMonGrouping;
     UINT iNegCurr;
     UINT iPosCurr;
     _TCHAR szCurrency[5];
     _TCHAR szMonDecimalSep[5];
     _TCHAR szMonThousandSep[5];
     _TCHAR szTimeFormat[32];
     _TCHAR szDateFormat[32];
     _TCHAR szPrefixText[20];
     _TCHAR szPostfixText[20];
     _TCHAR szNumColor[20];
     _TCHAR szNegColor[20];
     _TCHAR szZeroColor[20];
     BOOL bPrefixPercentSymbol;
     double dScaleFactor;
     BOOL bNoNegSign;
     LCID localeID;
     _TCHAR szCustomFormat[256];
} AdvFormatStruct, *AdvFormatPtr;

Valid Range:

See AdvFormatStruct in Appendix A for information about how to fill in the fields in this data structure to define the custom numer format.

Notes:

Use the InitAdvFormat() API to initialize the AdvFormatStruct before you apply this attribute.

Also See:

API_FORMAT_RINGTEXT, InitAdvFormat()

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

API_HOLESIZE

 

This attribute determines the relative size of the ring (inner circle) in a ring pie.

Type:

INT16

Valid Range:

0...100

Default:

55

Example:

INT16 nRingSize = 10;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_HOLESIZE , (void FAR *)&nRingSize);

 

 

INT16 nRingSize = 60;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_HOLESIZE ,(void FAR *)&nRingSize);

 

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_INSET_LBLPIE

 

This attribute defines the margins around the area for the group title. The BoxInstRec defines the margins on the four sides around the group title label. The margins are defined as a percentage of the width/height of the frame. For example, to create a group label whose width is 20% of the frame width, centered horizontally, set 40% left and right margin.

 

Type:

typedef struct {
     INT xULC;
     INT yULC;
     INT xLRC;
     INT yLRC;
} BoxInstRec;

Valid Range:

xULC: Left margin. % of frame width from left of frame to start of group label.

 

yULC: Top margin. % of frame height from top of frame to top of group label.

 

xLRC: Right margin. % of frame width from right of frame to right side of group label.

 

yLRC: Bottom margin. % of frame height from bottom of frame to bottom of group label.

Default:

xULC = 35, xLRC = 35, yULC = 80, yLRC = 10

Example:

BoxInstRec bxGroup;
bxGroup.xULC = 40; /* 40% left margin */
bxGroup.xLRC = 40; /* 40% right margin */
bxGroup.yULC = 90; /* 90% top margin */
/* 0% puts group label at bottom of frame */
bxGroup.yLRC = 0;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_INSET_LBLPIE,(void FAR *) &bxGroup);

Also See:

API_AUTOFIT_LBLPIE, API_INSET_PIE, API_SHOW_LBLPIE

 

ObjectID

SeriesID

GroupID

GraphTypes

 

No

No

No

Pie

API_INSET_PIE

 

This attribute defines the margins around a pie. The margins are defined as a percentage of the width/height of the frame. For example, to create a pie whose width is 80% of the frame width, centered horizontally would be 10% left margin and 10% right margin.

 

Type:

typedef struct {
     INT xULC;
     INT yULC;
     INT xLRC;
     INT yLRC;
} BoxInstRec;

Valid Range:

xULC: Left margin.% of frame width from left of frame to start of pie.

 

yULC: Top margin.% of frame height from top of frame to top of pie.

 

xLRC: Right margin.% of frame width from right of frame to right side of pie.

 

yLRC: Bottom margin.% of frame height from bottom of frame to bottom of pie.

Default:

xULC = 20, xLRC = 20, yULC = 20, yLRC = 20

Notes:

1.

For a single pie chart, the amount of space available is the entire frame. For a multiple pie chart the amount of space available is the portion of the frame allocated for each pie.

 

2.

The margins set by API_INSET_PIE are applied to each pie in a multiple pie chart.

Also See:

A_LOCATE_FRAME, API_INSET_LBLPIE

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

API_PIESPERROW

 

This attribute controls the number of pies per row (in a multiple pie graph) that will be imaged before jumping down and beginning on the next row of pies.

Type:

INT16

Valid Range:

0 to (number of groups in data range). 0 = Automatically calculate the best number of pies per row based on the number of groups in the chart.

Default:

2

Example:

INT16 nPiesPerRow = 3;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_PIESPERROW,(void FAR *) &nPiesPerRow);

 

Notes:

It is possible to set API_PIESPERROW to a value greater than the number of groups in the chart. In this case, space is allocated for each pie, only valid pies are drawn.

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_PLACE_DATALABEL

 

When API_SHOW_LBLFEELER is set to DATATEXT_TEXT or DATATEXT_BOTH, this attribute controls the placement of data labels on or next to slices in a pie chart.

Type:

INT16

Valid Range:

One of the following #defines:

 

#define

Value

Description

 

DTXT_CENTER

0

Data label is placed in CENTER of slice.

 

DTXT_OUT_MIN

1

Not currently used

 

DTXT_IN_MIN

2

Not currently used

 

DTXT_IN_MAX

3

Not currently used

 

DTXT_OUT_MAX

4

Data label is placed just OUTSIDE the slice

Default:

0 (Data label is placed in CENTER of slice)

Also See:

API_PLACE_VALUELABEL, API_SHOW_LBLFEELER

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_PLACE_VALUELABEL

 

When API_SHOW_LBLFEELER is set to DATATEXT_VALUE or DATATEXT_BOTH, this attribute controls the placement of value labels on or next to slices in a pie chart.

Type:

INT16

Valid Range:

One of the following #defines:

 

#define

Value

Description

 

DTXT_CENTER

0

Value label is placed in CENTER of slice.

 

DTXT_OUT_MIN

1

Not currently used

 

DTXT_IN_MIN

2

Not currently used

 

DTXT_IN_MAX

3

Not currently used

 

DTXT_OUT_MAX

4

Value label is placed just OUTSIDE the slice

Default:

0 (Value label is placed in CENTER of slice)

Also See:

API_PLACE_DATALABEL, API_SHOW_LBLFEELER

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_ROTATE

 

This attribute is used to rotate a pie. A pie with zero degrees rotation begins drawing slices at the 3 o'clock position. The rotation angle causes the pie to rotate counter clockwise (CCW). Applying a 90 degree rotation causes the slices to begin drawing at the 12 o'clock position.

Type:

INT16

Valid Range:

0...359.

 

0=

No rotation. First slice begins at 3 o'clock position

 

90 =

The pie rotates counter clockwise 90 degrees. The starting angle to draw the first slice of the pie is at 12 o'clock position.

 

359 =

The pie rotates counter clockwise 359 degrees.

Default:

Zero

Example:

INT16 nPieRotation = 90;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_ROTATE,(void FAR *) &nPieRotation);

 

Notes:

The attribute API_DRAW_CLOCKWISE determines the direction that slices are drawn around the pie.

Also See:

API_DRAW_CLOCKWISE

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_SHOW_AS_COLUMN

 

Sets a particular pie to draw as a stacked column instead. Mostly useful in a multiple-pie chart, since you can have some pies draw regular and some draw as stacks.

Type:

typedef struct _TDG_GroupDepBOOLEAN16 {
     INT16 nGroupID;
     BOOLEAN16 bValue;
} TDG_GroupDepBOOLEAN16,FAR * TDG_GroupDepBOOLEAN16Ptr;

Valid Range:

nGroupID: 0...Number of groups

 

bValue: TRUE/FALSE

 

TRUE=

Show as column

 

FALSE=

Show as regular pie

Default:

FALSE

Example:

TDG_GroupDepBOOLEAN16 ShowAsColumn;
ShowAsColumn.nSeriesID = 2;
ShowAsColumn.bValue = TRUE;
SetGraphAttr (pGraph, GRAPH_LAYER,
     OPI_FEELER,NULL_SERIESID,NULL_GROUPID,
     API_SHOW_AS_COLUMN,(void FAR *) &ShowAsColumn);

 

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

Yes, specify in nGroupID

Pie

   

API_SHOW_FEELER

 

This attribute enables/disables drawing of a pie slice feeler.

 

Type:

typedef struct _TDG_SerDepBOOLEAN16 {
     INT16 nSeriesID;
     BOOLEAN bValue;
} TDG_SerDepBOOLEAN16, FAR * TDG_SerDepBOOLEAN16Ptr;

Valid Range:

nSeriesID: seriesID number of slice to apply attribute

 

bValue: TRUE/FALSE

 

TRUE=

Draw pie slice feeler

 

FALSE=

Do not draw pie slice feeler

Default:

TRUE

Example:

TDG_SerDepBOOLEAN16 noshowfeeler;
noshowfeeler.nSeriesID = SERCON_DOALL;
noshowfeeler.bValue = FALSE;
SetGraphAttr (pGraph, GRAPH_LAYER,
     OPI_FEELER,NULL_SERIESID,NULL_GROUPID,
     API_SHOW_FEELER,(void FAR *) &noshowfeeler);

Notes:

API_SHOW_LBLFEELER must be set to display a label, otherwise the feeler is not displayed. It is not possible to display a feeler with no label, unless you set API_SHOW_LBLFEELER to DATATEXT_TEXT and use a NULL string as the series header.

Also See:

API_SHOW_LBLFEELER

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

Yes, specify in nSeriesID

No

Pie

   

API_SHOW_LBLFEELER

 

This attribute determines the label information displayed at the end of the pie slice feeler. Use the API_PLACE_VALUELABEL and API_PLACE_DATALABEL attributes to specify where the information is displayed.

 

Type:

typedef struct _TDG_SerDepINT16 {
     INT16 nSeriesID;
     INT16 nValue;
} TDG_SerDepINT16, FAR * TDG_SerDepINT16Ptr;

Valid Range:

nSeriesID: seriesID of slice to apply attribute

 

nValue: One of the following #defines:

 

#define

Value

Description

 

DATATEXT_NONE

0

Do not display pie slice feeler label.

 

DATATEXT_VALUE

1

Display the value of the pie slice.

 

DATATEXT_TEXT

2

Display the series header label for the slice.

 

DATATEXT_BOTH

3

Display both the value and the series header label

Default:

DATATEXT_VALUE

Example:

TDG_SerDepINT16 feelerlabel;
feelerlabel.nSeriesID = SERCON_DOALL;
feelerlabel.nValue = DATATEXT_BOTH;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_SHOW_LBLFEELER, (void FAR *) &feelerlabel);

Notes:

Use SERCON_DOALL to apply the distance to all the slices. Use SERCON_USESELLIST to apply the distance to all the slices in a selection list.

Also See:

API_SHOW_FEELER, API_PLACE_VALUELABEL, API_PLACE_DATALABEL

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

Yes, specify in nSeriesID

No

Pie

API_SHOW_LBLPIE

 

This attribute enables/disables drawing of the group title for the pie.

 

Type:

BOOLEAN16

Valid Range:

TRUE/FALSE

 

TRUE=

Draw group title

 

FALSE=

Do not draw group title

Default:

TRUE (title display enabled.)

Example:

/* Disable pie group title */
BOOLEAN bPieTitle = FALSE;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_SHOW_LBLPIE,(void FAR *) &bPieTitle)

Notes:

The API_INSET_LBLPIE attribute sets the size and position of the group title. The application must provide a text string for the title. For a normal pie chart these are the group labels for a column of data.

Also See:

API_INSET_LBLPIE, API_AUTOFIT_LBLPIE

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_SHOW_LBLRING

 

This attribute enables (true) / disables (false) the display of a total value in the center of a pie ring chart.

Type:

BOOLEAN16

Valid Range:

TRUE/FALSE

 

TRUE=

Draw value in ring

 

FALSE=

Do not draw value

Default:

FALSE

Also See:

API_FORMAT_RINGTEXT

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_SLICE_DELETE

 

This attributes deletes or restores a pie slice. A deleted slice is not drawn on the chart, the space the slice would have occupied is empty.

Type:

typedef struct _TDG_SerDepBOOLEAN16 {
     INT16 nSeriesID;
     BOOLEAN bValue;
} TDG_SerDepBOOLEAN16, FAR * TDG_SerDepBOOLEAN16Ptr;

Valid Range:

nSeriesID: seriesID number of slice to apply attribute

 

bValue: TRUE / FALSE

 

TRUE=

Delete a slice. (The slice is not drawn)

 

FALSE=

Undelete a slice. If a slice is not deleted this has no impact.

Default:

FALSE

Example:

TDG_SerDepBOOLEAN16 noslice;
/* Delete first slice */
noslice.nSeriesID = 0;
noslice.bValue = TRUE;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_SLICE_DELETE, (void FAR *)&noslice);
/* to restore a slice */
noslice.bValue = FALSE;
/* to restore all slices */
noslice.nSeriesID = SERCON_DOALL;
noslice.bValue = FALSE;

Notes:

1.

A detnode is not created for a deleted slice.

 

2.

API_SLICE_RESTORE can be used to restore all deleted slices. However, it also reattaches any previously detached slices, API_SLICE_DELETE does not move a slice when it is undeleted.

 

3.

Use SERCON_DOALL to delete/restore all of the slices. Use SERCON_USESELLIST to delete all the slices in a selection list.

Also See:

API_SLICE_RESTORE

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

Yes, specify in nSeriesID

No

Pie

   

API_SLICE_MOVE

 

This attribute can be used to detach a pie slice from the pie. The amount of detachment is a percentage of the distance from the center of the pie to the edge of the pie. 100% would cause the center point of the slice to image at the edge of the pie.

Type:

typedef struct _TDG_SerDepINT16 {
     INT16 nSeriesID;
     INT16 nValue;
} TDG_SerDepINT16, FAR * TDG_SerDepINT16Ptr;

Valid Range:

nSeriesID: seriesID number of slice to move

 

nValue: 0...100

Default:

Zero

Example:

TDG_SerDepINT16 serveslice;
/* Detach first slice */
serveslice.nSeriesID = 0;
/* 10% detachment */
serveslice.nValue = 10;
SetGraphAttr(pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_SLICE_MOVE,
      (void FAR *)&serveslice);
/* to detach all the slices the same amount */
serveslice.nSeriesID = SERCON_DOALL;

Notes:

1.

Detaching the slice too much may cause the slice to image outside the chart frame.

 

2.

Use SERCON_DOALL to detach all of the slices the same amount. Use SERCON_USESELLIST to detach all the slices in a selection list.

Also See:

API_SLICE_RESTORE

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

Yes, specify in nSeriesID

No

Pie

   

API_SLICE_RESTORE

 

This attribute restores all slices deleted with API_SLICE_DELETE. Restores all detached slices, sets API_SLICE_MOVE to 0 for all slices.

Type:

BOOLEAN16

Valid Range:

TRUE / FALSE

 

TRUE=

Restore all deleted or detached slices

 

FALSE=

Retain deleted/detached slices

Default:

TRUE

Example:

BOOLEAN baDummy;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_SLICE_RESTORE ,
      (void FAR *) &baDummy);

Also See:

API_SLICE_DELETE, API_SLICE_MOVE

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_TILT

 

This attribute defines the amount of tilt applied to the pie. A pie with zero degrees tilt is drawn as a regular 2-D pie. As tilt is applied, the pie is rotated backward on the x-axis. The tilting creates a 3-D effect, especially when used in conjunction with API_DEPTH. Tilting must be enabled using the API_TILT_ON attribute.

Type:

INT16

Valid Range:

0...89. 0 = No tilt. Pie is drawn as a 2-D pie.

Default:

40

Notes:

1.

The attribute API_TILT_ON must be enabled to display the tilt.

 

2.

When a pie is tilted, it's apparent height is reduced to create the tilt effect. By increasing the crust thickness, the size of the pie can be increased to better fill the space between the pie and the frame. The crust thickness is controlled by the attribute API_DEPTH.

Also See:

API_TILT_ON, API_DEPTH

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie

   

API_TILT_ON

 

Enables pie tilting to create a 3-D effect. The amount of pie tilt is defined by API_TILT.

Type:

BOOLEAN16

Valid Range:

TRUE / FALSE

 

TRUE=

Tilt is enabled

 

FALSE=

No tilt. Pie is drawn as a 2-D pie

Default:

TRUE

Example:

/* DISABLE PIE TILT */
BOOLEAN bPieTilt = FALSE;
SetGraphAttr (pGraph, GRAPH_LAYER,
     NULL_OBJECTID,NULL_SERIESID,NULL_GROUPID,
     API_TILT_ON, (void FAR *)&bPieTilt);

Notes:

Setting API_TILT to 0 has the same effect as disabling pie tilt with this attribute

Also See:

API_TILT

Usage

ObjectID

SeriesID

GroupID

GraphTypes

Requirements:

No

No

No

Pie