Pie Object Class


Overview

A Chart Object creates a Plot object of type Pie when the chart type resource is set to XintCHART_TYPE_PIE. The Pie chart graphs data as a proportional slice of a circular pie. The resulting chart is useful in the comparison of the relative contribution of parts to a whole.

Data

The Pie class only handles data objects of type DataSampled. It creates a WedgeSeries for each DataSampled, with as many Wedges as the number of samples in the data object. No wedges are created for missing or null values. All the DataSampled objects should have the same increment, but can have different starting values (see resource XmNsampledRange to specify a non default start and increment).

The Wedge class supports transposition. If Chart resource XmNtranspose is False, each wedge of a Wedge Series is placed in a different pie. If XmNtranspose is True, all the wedges of a WedgeSeries are placed in one pie (A DataSampled object defines an entire pie).


Inherited Behavior and Resources

The Pie object class inherits behavior and resources from the Xt Object, Graphic, Group and Plot2D object classes.
The following resources are defined by the Pie object class:
NameTypeDefaultAccess
XmNdrawShadowBooleanFalseCSG
XmNinclinationint0CSG
XmNpieSizeint75CSG
XmNperspectiveDepthint25CSG
XmNshowPieNameBooleanFalseCSG
XmNshowWedgeLabelsBooleanFalseCSG


XmNdrawShadow

Specifies whether or not to draw the side of the pie with a darker color.

XmNinclination

Specifies the inclination of the pie in degrees. You must specify an integer value between 0 and 45 for this resource

XmNpieSize

Each pie is centered in a square whose size is based on the number of pies and the width and height of the plot area. Resource XmNpieSize specifies how much of the square the pie occupies, as a percentage between 0 and 100.

XmNperspectiveDepth

Specifies the depth of the pie as a percentage of the Plot width. This resource has no effect if resource XmNinclination is 0.

XmNshowPieName

Specifies whether or not to display the name of each pie.

XmNshowWedgeLabels

Specifies whether or not to display the name of the series next to each wedge. The name of the series corresponds to the name of the DataSampled object to which each wedge corresponds.

Plot2D Object Inherited Resources

See
Plot2D Object Class for a complete listing of the inherited resources for the Pie object class.

Functions

Function XintPieExplodeWedge is used to explode a wedge in a pie.

     Boolean XintPieExplodeWedge (...)

ObjectobjectID of the Pie object.
ObjectdataID of the DataSampled object that contains the wedge.
intsample_indexIndex of the sample inside the DataSampled object (starts at 0).
intseries_indexNot used.
intpercentDistance of explosion as a percentage of the pie radius.


Macros

Macro XintIsPie returns True if the specified object is a Pie object.

     Boolean XintIsPie (Object object)


Pie Series

The Pie object class displays its data using WedgeSeries objects. This object class inherits its resources from the Graphic class. The following is a list of the applicable resources for this class. See class
Graphic for a complete description of these resources.

WedgeSeries Resources
NameTypeDefaultAccess
XmNcolorPixel"black"CSG
XmNdashListchar *NULLCSG
XmNfillColorPixelassigned from color listCSG
XmNfillFilenamechar *NULLCSG
XmNfillPixmapPixmapNULLCSG
XmNfillStyleintXintFILL_OPAQUE_STIPPLEDCSG
XmNlineStyleintXintLINE_SOLIDCSG
XmNlineThicknessint1CSG
XmNsensitiveBooleanTrueCSG
XmNstippleColorPixel"black"CSG