All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.graphics.components.piechart
Class PieChartModel

    com.sas.graphics.components.piechart.PieChartModel

    public class PieChartModel

A PieChartModel encapsulates most of a PieChart's visual display properties. This contrasts with the PieChart's data model, which determines the number and organization of data elements (pie slices) and the use of axes and a legend.

A PieChartModel contains PieChart-specific properties, common graph properties, and a collection of models that control the appearance of the graph's peripheral elements, such as its axes and legends.

A PieChartModel does not allow null values for properties in its contained models. Passing a null parameter to the set method for a contained model property results in an IllegalArgumentException. Guaranteeing non-null properties for a contained model simplifies access to the display properties and ensures that the PieChart's display state is unambiguous.

Topics:
  Explode Slice
  Other Slice
  Donut Hole
  Display Properties
  Line Styles
  Behavior
Samples:
  Swing-based Samples
  Servlet-based Samples

Since:
  SAS 9.1
See Also:
  `Graph`, `GraphConstants`, `PieChart`

Field Summary
`static int` | `STACK_RESPONSE`
`static int` | `STACK_SUBGROUP`

Constructor Summary
`PieChartModel()` default constructor

Method Summary
`void` | `apply(PieChartModel theOtherModel)` Utility method to convey properties contained in "theOtherModel" to this object.
`boolean` | `equals(java.lang.Object obj)` Determines whether another object is equal to this `PieChartModel`.
`int` | `getAcross()` Return the current number of pies to display horizontally in a single cell, when appropriate.
`GraphMatrixAxisModel` | `getColumnAxisModel()` Returns the Graph's column axis model, which contains axis' appearance preferences.
`int` | `getDimension()` Get the rendering to display the graph in 2 or 3 dimensions.
`java.lang.String` | `getDonutHoleLabel()` Return the current text of the central pie label
`AdvancedTextStyle` | `getDonutHoleLabelTextStyle()` Return the current text style of the central pie label.
`int` | `getDonutHoleSize()` Return the current size of the central open area percentage.
`int` | `getDown()` Return the current number of pies to display vertically in a single cell, when appropriate.
`java.lang.String[]` | `getExplodedCategories()` Return the current string array of categories to explode.
`int` | `getInsideSliceLabelContent()` Return the content of the labeled display value appearing inside the pie slice.
`int` | `getInsideSliceLabelPlacement()` Return the current position of the inside display values.
`AdvancedTextStyle` | `getInsideSliceLabelTextStyle()` Return the current text style of the pie inside slice display values.
`java.lang.String[]` | `getInvisibleCategories()` Return the current string array of categories to make invisible.
`LegendModel` | `getLegendModel()` Get the PieChart's color legend model, a compilataion of legend appearance preferences.
`int` | `getMissingPolicy()` Returns the graph behavior for displaying missing values.
`java.awt.Color` | `getOtherColor()` Return the current color used to fill other slices.
`java.lang.String` | `getOtherSliceLabel()` Return the current text used to label other slices.
`OtherThreshold` | `getOtherThreshold()` Return the current other threshold (either in percent or slices).
`int` | `getOutsideSliceLabelContent()` Return the content of the labeled display value appearing outside the pie slice.
`int` | `getOutsideSliceLabelPlacement()` Return the current position of the outside display values.
`AdvancedTextStyle` | `getOutsideSliceLabelTextStyle()` Return the current text style of the pie outside slice display values.
`AdvancedTextStyle` | `getResponseLabelTextStyle()` Return the current text style of the response label.
`int` | `getResponseLabelVisiblePolicy()` Return the current status of response labeling in the pie chart.
`GraphMatrixAxisModel` | `getRowAxisModel()` Returns the Graph's row axis model, which contains axis' appearance preferences.
`int` | `getSkin()` Get the style used to modify the displayed pie slices.
`int` | `getSliceOrder()` Return the current slice ordering method of the pie chart.
`int` | `getStackRole()` Returns stacking behavior of the pie chart.
`double` | `getStartAngle()` Return the current starting angle in degrees of the pie chart.
`PieChartSubgroupModel` | `getSubgroupLabelModel()` Return the current subgroup label properties.
`int` | `hashCode()` Computes the hash code for this `PieChartModel`.
`boolean` | `isReverseDirection()` Return if the current slice rendering direction of the pie chart is standard (clockwise) or reversed (counter-clockwise).
`void` | `setAcross(int newAcross)` Set the highest number of pies to display horizontally in a single cell, when multiple responses have been specified.
`void` | `setColumnAxisModel(GraphMatrixAxisModel newAxis)` Set the Graph's column axis model, which contains axis' appearance preferences.
`void` | `setDimension(int newDimension)` Set the rendering to display the graph in 2 or 3 dimensions.
`void` | `setDonutHoleLabel(java.lang.String newLabel)` Set the text to display centered on the pie.
`void` | `setDonutHoleLabelTextStyle(AdvancedTextStyle newStyle)` Set the style of the text to display in the center of the pie.
`void` | `setDonutHoleSize(int newSize)` Set the interior open area size in the center of the pie.
`void` | `setDown(int newDown)` Set the highest number of pies to display vertically in a single cell, when multiple responses have been specified.
`void` | `setExplodedCategories(java.lang.String[] newCategories)` Set the string array of categories that should be "exploded".
`void` | `setInsideSliceLabelContent(int newSliceLabel)` Set the content of the labeled display value to appear inside the pie slice.
`void` | `setInsideSliceLabelPlacement(int newPos)` Set the placement of the inside display values.
`void` | `setInsideSliceLabelTextStyle(AdvancedTextStyle newStyle)` Set the style of the text to display the pie inside slice display values.
`void` | `setInvisibleCategories(java.lang.String[] newCategories)` Set the string array of categories that should be invisible.
`void` | `setLegendModel(LegendModel newModel)` Set the PieChart's color legend model, a compilataion of legend appearance preferences.
`void` | `setMissingPolicy(int newMissingPolicy)` Sets the graph behavior for displaying missing values.
`void` | `setOtherColor(java.awt.Color newColor)` Set the color to be used for all other slices in the pie chart.
`void` | `setOtherSliceLabel(java.lang.String newSliceLabel)` Set the labeled display value text to be used for all other slices in the pie chart.
`void` | `setOtherThreshold(OtherThreshold newThreshold)` Set the other threshold value and calculation mode.
`void` | `setOutsideSliceLabelContent(int newSliceLabel)` Set the content of the labeled display value to appear outside the pie slice.
`void` | `setOutsideSliceLabelPlacement(int newPos)` Set the position of the outside display values
`void` | `setOutsideSliceLabelTextStyle(AdvancedTextStyle newStyle)` Set the style of the text to display the pie outside slice display values.
`void` | `setResponseLabelTextStyle(AdvancedTextStyle newStyle)` Set the style of the text to display as a response label.
`void` | `setResponseLabelVisiblePolicy(int newLabel)` Set weather a PieChart should display the label of each response over the corresponding pie.
`void` | `setReverseDirection(boolean newDir)` Set if the slices should de displayed in a counter-clockwise direction (default value, so false) or a clockwise direction (true).
`void` | `setRowAxisModel(GraphMatrixAxisModel newAxis)` Set the Graph's row axis model, which contains axis' appearance preferences.
`void` | `setSkin(int newSkin)` Set the style of skin to modify the pie slice appearance.
`void` | `setSliceOrder(int newOrder)` Set the pie's slice ordering.
`void` | `setStackRole(int newStackRole)` Sets desired stacking behavior of the pie charts.
`void` | `setStartAngle(double newAngle)` Set the angle in degrees where the pie should place the leading side of the first slice.
`void` | `setSubgroupLabelModel(PieChartSubgroupModel newModel)` Set the subgroup label properties.

Methods inherited from class com.sas.graphics.components.GraphModel
`apply, getBackgroundFillStyle, getBrushModel, getDataElementStyles, getDataTipModel, getFrameLineStyle, getLogo, getLogoJustification, isAntialiasedGraphics, isAntialiasedText, setAntialiasedGraphics, setAntialiasedText, setBackgroundFillStyle, setBrushModel, setDataElementStyles, setDataTipModel, setFrameLineStyle, setLogo, setLogoJustification`

Methods inherited from class com.sas.graphics.components.ModelBase
`addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel`

Field Detail

### STACK_SUBGROUP

    public static final int STACK_SUBGROUP

See Also:
  Constant Field Values

### STACK_RESPONSE

    public static final int STACK_RESPONSE

See Also:
  Constant Field Values

Constructor Detail

### PieChartModel

    public PieChartModel()

  default constructor

Method Detail

### apply

    public void apply(PieChartModel theOtherModel)

  Utility method to convey properties contained in "theOtherModel" to this object.
  Note: Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.
  Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.

  Parameters:
    `theOtherModel` - properties applied to this instance
  Throws:
    `java.lang.IllegalArgumentException` - if theOtherModel is null.

### setRowAxisModel

    public void setRowAxisModel(GraphMatrixAxisModel newAxis)
                         throws java.lang.IllegalArgumentException

  Set the Graph's row axis model, which contains axis' appearance preferences. The row axis appears when the Graph's "Row" variable is assigned to a valid data column. The row Axis manages groups of rows.

  Parameters:
    `newAxis` - row axis display attributes
  Throws:
    `java.lang.IllegalArgumentException` - if newAxis is null.
  See Also:
    `getRowAxisModel()`, `GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)`

### getRowAxisModel

    public GraphMatrixAxisModel getRowAxisModel()

  Returns the Graph's row axis model, which contains axis' appearance preferences. The row axis appears when the Graph's "Row" variable is assigned to a valid data column. The row Axis manages groups of rows.

  Returns:
    GraphMatrixAxisModel
  See Also:
    `setRowAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)`, `getColumnAxisModel()`

### setColumnAxisModel

    public void setColumnAxisModel(GraphMatrixAxisModel newAxis)
                            throws java.lang.IllegalArgumentException

  Set the Graph's column axis model, which contains axis' appearance preferences. The column axis appears when the Graph's "Column" variable is assigned to a valid data column. The column Axis manages groups of columns.

  Parameters:
    `newAxis` - the column axis display attributes
  Throws:
    `java.lang.IllegalArgumentException` - if newAxis is null.
  See Also:
    `getColumnAxisModel()`, `GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)`

### getColumnAxisModel

    public GraphMatrixAxisModel getColumnAxisModel()

  Returns the Graph's column axis model, which contains axis' appearance preferences. The column axis appears when the Graph's "Column" variable is assigned to a valid data column. The column Axis manages groups of columns.

  Returns:
    GraphMatrixAxisModel
  See Also:
    `setColumnAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)`, `getRowAxisModel()`

### setLegendModel

    public void setLegendModel(LegendModel newModel)
                        throws java.lang.IllegalArgumentException

  Set the PieChart's color legend model, a compilataion of legend appearance preferences. By default, the Pie chart displays a legend if either

       (1) multiple response variables are specified or
       (2) a subgroup varaible is specified.

  Parameters:
    `newModel` - the new repository for the legend display attributes
  Throws:
    `java.lang.IllegalArgumentException` - if newModel is null.
  See Also:
    `getLegendModel()`, `LegendModel.apply(com.sas.graphics.components.LegendModel)`

### getLegendModel

    public LegendModel getLegendModel()

  Get the PieChart's color legend model, a compilataion of legend appearance preferences. By default, the Pie chart displays a legend if either

       (1) multiple response variables are specified or
       (2) a subgroup varaible is specified.

  Returns:
    the LegendModel containing all legend properties
  See Also:
    `setLegendModel(com.sas.graphics.components.LegendModel)`

### setInsideSliceLabelContent

    public void setInsideSliceLabelContent(int newSliceLabel)

  Set the content of the labeled display value to appear inside the pie slice. Valid items are: GraphConstants.DATA_LABEL_AUTOMATIC, GraphConstants.DATA_LABEL_CATEGORY, GraphConstants.DATA_LABEL_RESPONSE, GraphConstants.DATA_LABEL_PERCENT, and GraphConstants.DATA_LABEL_NONE. GraphConstants.DATA_LABEL_CATEGORY_RESPONSE, GraphConstants.DATA_LABEL_RESPONSE_PERCENT, GraphConstants.DATA_LABEL_CATEGORY_PERCENT and GraphConstants.DATA_LABEL_CATEGORY_RESPONSE_PERCENT.

  Parameters:
    `newSliceLabel` - The desired inside contents.
  See Also:
    `getInsideSliceLabelContent()`

### getInsideSliceLabelContent

    public int getInsideSliceLabelContent()

  Return the content of the labeled display value appearing inside the pie slice.

  Returns:
    items to display inside the slices
  See Also:
    `setInsideSliceLabelContent(int)`

### setOutsideSliceLabelContent

    public void setOutsideSliceLabelContent(int newSliceLabel)

  Set the content of the labeled display value to appear outside the pie slice. Valid items are: GraphConstants.DATA_LABEL_AUTOMATIC, GraphConstants.DATA_LABEL_CATEGORY, GraphConstants.DATA_LABEL_RESPONSE, GraphConstants.DATA_LABEL_PERCENT and GraphConstants.DATA_LABEL_NONE. GraphConstants.DATA_LABEL_CATEGORY_RESPONSE, GraphConstants.DATA_LABEL_RESPONSE_PERCENT, GraphConstants.DATA_LABEL_CATEGORY_PERCENT and GraphConstants.DATA_LABEL_CATEGORY_RESPONSE_PERCENT. The option may not be honored in certain cases where it would not make sense, such as outside content in a subgrouped pie.

  Parameters:
    `newSliceLabel` - The desired outside contents.
  See Also:
    `getOutsideSliceLabelContent()`

### getOutsideSliceLabelContent

    public int getOutsideSliceLabelContent()

  Return the content of the labeled display value appearing outside the pie slice.

  Returns:
    items to display outside the slices
  See Also:
    `setOutsideSliceLabelContent(int)`

### setInsideSliceLabelTextStyle

    public void setInsideSliceLabelTextStyle(AdvancedTextStyle newStyle)
                                      throws java.lang.IllegalArgumentException

  Set the style of the text to display the pie inside slice display values. This is a hint, that may be modified to make labeling look better.

  Parameters:
    `newStyle` - The set of properties used to display the slice display values.
  Throws:
    `java.lang.IllegalArgumentException`
  See Also:
    `getInsideSliceLabelTextStyle()`, `setInsideSliceLabelContent(int)`

### getInsideSliceLabelTextStyle

    public AdvancedTextStyle getInsideSliceLabelTextStyle()

  Return the current text style of the pie inside slice display values.

  Returns:
    the AdvancedTextStyle to be applied by all inside and outside values
  See Also:
    `setInsideSliceLabelTextStyle(AdvancedTextStyle)`, `getInsideSliceLabelContent()`

### setOutsideSliceLabelTextStyle

    public void setOutsideSliceLabelTextStyle(AdvancedTextStyle newStyle)
                                       throws java.lang.IllegalArgumentException

  Set the style of the text to display the pie outside slice display values. This is a hint, that may be modified to make labeling look better.

  Parameters:
    `newStyle` - The set of properties used to display the slice display values.
  Throws:
    `java.lang.IllegalArgumentException`
  See Also:
    `getOutsideSliceLabelTextStyle()`, `setOutsideSliceLabelContent(int)`, `setInsideSliceLabelContent(int)`

### getOutsideSliceLabelTextStyle

    public AdvancedTextStyle getOutsideSliceLabelTextStyle()

  Return the current text style of the pie outside slice display values.

  Returns:
    the AdvancedTextStyle to be applied by all inside and outside values
  See Also:
    `setOutsideSliceLabelTextStyle(AdvancedTextStyle)`, `getOutsideSliceLabelContent()`, `getInsideSliceLabelContent()`

### setExplodedCategories

    public void setExplodedCategories(java.lang.String[] newCategories)

  Set the string array of categories that should be "exploded". Any slices whose formatted category matches any string in the list passed in will be displayed slightly radially offset from the center of the pie. This has the effect of pulling out these slices from the pie, emphasizing them, when used with restraint. Exploded slices are ignored in subgrouped pie charts.

  Parameters:
    `newCategories` - A string array of categories to display exploded.
  See Also:
    `getExplodedCategories()`

### getExplodedCategories

    public java.lang.String[] getExplodedCategories()

  Return the current string array of categories to explode.

  Returns:
    string array of slice names that should appear exploded
  See Also:
    `setExplodedCategories(String[])`

### setInvisibleCategories

    public void setInvisibleCategories(java.lang.String[] newCategories)

  Set the string array of categories that should be invisible. Any slices whose formatted category matches any string in the list passed in will not be visible in the pie. Its response value will still be used in the pie calculations, so a gap will appear where an invisible slice would normally appear. SliceLabels of invisible slices are hidden along with the wedges.

  Parameters:
    `newCategories` - A string array of categories to make invisible.
  See Also:
    `getInvisibleCategories()`

### getInvisibleCategories

    public java.lang.String[] getInvisibleCategories()

  Return the current string array of categories to make invisible.

  Returns:
    string array of slice names that should be invisible
  See Also:
    `setInvisibleCategories(java.lang.String[])`

### setStartAngle

    public void setStartAngle(double newAngle)

  Set the angle in degrees where the pie should place the leading side of the first slice. Zero degrees is 3 o-clock and the angle progresses counter-clockwise, regardless of the current reverseDirection setting. So 90 degrees would always start a pie at the top.

  Parameters:
    `newAngle` - The desired start angle in degrees.
  See Also:
    `getStartAngle()`

### getStartAngle

    public double getStartAngle()

  Return the current starting angle in degrees of the pie chart.

  Returns:
    the starting angle of the first pie slice
  See Also:
    `setStartAngle(double)`

### setSliceOrder

    public void setSliceOrder(int newOrder)

  Set the pie's slice ordering. Valid values are:
  - GraphConstants.SORT_NONE
  - GraphConstants.SORT_ASCENDING
  - GraphConstants.SORT_DESCENDING
  SORT_NONE means to follow the sort order defined in the category variable (which will pertains to the category values). SORT_ASCENDING means to order the pie slices based upon increasing response values (i.e. slice size). SORT_DESCENDING means to order the pie slices based upon decreasing response values (i.e. slice size).

  Parameters:
    `newOrder` - the desired ordering method of the pie slices.
  Throws:
    `java.lang.IllegalArgumentException` - if an invalid value is specified
  See Also:
    `getSliceOrder()`

### getSliceOrder

    public int getSliceOrder()

  Return the current slice ordering method of the pie chart.

  Returns:
    the order in which the slices should display
  See Also:
    `setSliceOrder(int)`

### setReverseDirection

    public void setReverseDirection(boolean newDir)

  Set if the slices should de displayed in a counter-clockwise direction (default value, so false) or a clockwise direction (true).

  Parameters:
    `newDir` - Should the slices revesre direction of display arond the pie?
  See Also:
    `isReverseDirection()`

### isReverseDirection

    public boolean isReverseDirection()

  Return if the current slice rendering direction of the pie chart is standard (clockwise) or reversed (counter-clockwise).

  Returns:
    Should the slices revesre direction of display arond the pie?
  See Also:
    `setReverseDirection(boolean)`

### setResponseLabelVisiblePolicy

    public void setResponseLabelVisiblePolicy(int newLabel)

  Set weather a PieChart should display the label of each response over the corresponding pie.

  Parameters:
    `newLabel` - should labels for responses be shown? Valid values are:
    - GraphConstants.AUTOMATIC
    - GraphConstants.TRUE
    - GraphConstants.FALSE
  Throws:
    `java.lang.IllegalArgumentException` - if an invalid value is specified
  See Also:
    `getResponseLabelVisiblePolicy()`

### getResponseLabelVisiblePolicy

    public int getResponseLabelVisiblePolicy()

  Return the current status of response labeling in the pie chart.

  Returns:
    current response labeling policy.
  See Also:
    `setResponseLabelVisiblePolicy(int)`

### setOtherThreshold

    public void setOtherThreshold(OtherThreshold newThreshold)

  Set the other threshold value and calculation mode. If more than one slice in a pie qualifies as an other slice, they will be combined into a single composite slice representing all qualifying slices. This composite slice will be displayed as the last slice of the pie, filled with the color specified in otherColor and the category SliceLabel specified in otherSliceLabel. If only a single category qualifies as an other slice, it will keep its original position, color and display value.
  A unit of "percent" will use the otherThreshold value to determine the maximum percentage of the pie a slice can be to qualify as an other slice. This is the default mode (with a threshold of 4%). For example, if a pie consisted of categories valued: 40, 30, 20, 5, 3, 1, and 1 (total=100), with the default 4% threshold, the 3, 1 and 1 slices would be combined to form the other slice. The valid range for the percent mode is 0 to 100, inclusive. A threshold of 0% can be set to never show the other slice, and force all slices to be displayed, no matter how small.
  A unit of "slices" will use the otherThreshold value to set a maximum total number (n) of slices for each pie. If there are more than n categories in a pie, the largest (n-1) slices will be displayed and the others will be consolidated into the other slice. The value of a slices OtherThreshold must be greater than zero.

  Parameters:
    `newThreshold` - The desired value and mode of other slice calculation.
  Throws:
    `java.lang.IllegalArgumentException` - if an invalid value is specified
  See Also:
    `getOtherThreshold()`, `setOtherColor(java.awt.Color)`, `setOtherSliceLabel(java.lang.String)`

### getOtherThreshold

    public OtherThreshold getOtherThreshold()

  Return the current other threshold (either in percent or slices).

  Returns:
    the other threshold
  See Also:
    `setOtherThreshold(com.sas.graphics.components.piechart.OtherThreshold)`, `getOtherColor()`, `getOtherSliceLabel()`

### setOtherColor

    public void setOtherColor(java.awt.Color newColor)

  Set the color to be used for all other slices in the pie chart.

  Parameters:
    `newColor` - The desired color for other slices.
  See Also:
    `getOtherColor()`, `setOtherThreshold(com.sas.graphics.components.piechart.OtherThreshold)`, `setOtherSliceLabel(java.lang.String)`

### getOtherColor

    public java.awt.Color getOtherColor()

  Return the current color used to fill other slices.

  Returns:
    the other color
  See Also:
    `setOtherColor(java.awt.Color)`, `getOtherThreshold()`, `getOtherSliceLabel()`

### setOtherSliceLabel

    public void setOtherSliceLabel(java.lang.String newSliceLabel)

  Set the labeled display value text to be used for all other slices in the pie chart. The style of text always conforms to all the standard pie display values.

  Parameters:
    `newSliceLabel` - The desired display value for other slices.
  See Also:
    `getOtherSliceLabel()`, `setOtherThreshold(com.sas.graphics.components.piechart.OtherThreshold)`, `setOtherColor(java.awt.Color)`

### getOtherSliceLabel

    public java.lang.String getOtherSliceLabel()

  Return the current text used to label other slices.

  Returns:
    the other slice label value
  See Also:
    `setOtherSliceLabel(java.lang.String)`, `getOtherThreshold()`, `getOtherColor()`

### setAcross

    public void setAcross(int newAcross)

  Set the highest number of pies to display horizontally in a single cell, when multiple responses have been specified. If more pies are called for than can be displayed by the across and down properties, across will be honored and down will be ignored.

  Parameters:
    `newAcross` - The maximum number of pies horizontally in a cell.
  See Also:
    `getAcross()`, `setDown(int)`

### getAcross

    public int getAcross()

  Return the current number of pies to display horizontally in a single cell, when appropriate.

  Returns:
    the number of pies horizontally in a cell in multi-response case
  See Also:
    `setAcross(int)`, `getDown()`

### setDown

    public void setDown(int newDown)

  Set the highest number of pies to display vertically in a single cell, when multiple responses have been specified. If more pies are called for than can be displayed by the across and down properties, across will be honored and down will be ignored.

  Parameters:
    `newDown` - The maximum number of pies vertically in a cell.
  See Also:
    `getDown()`, `setAcross(int)`

### getDown

    public int getDown()

  Return the current number of pies to display vertically in a single cell, when appropriate.

  Returns:
    the number of pies vertically in a cell in multi-response case
  See Also:
    `setDown(int)`, `getAcross()`

### setDonutHoleSize

    public void setDonutHoleSize(int newSize)

  Set the interior open area size in the center of the pie. When greater than zero, this gives pies a donut-like appearance.

  Parameters:
    `newSize` - The radius of the central donut hole radius as a percentage of the entire pie's radius.
  See Also:
    `getDonutHoleSize()`

### getDonutHoleSize

    public int getDonutHoleSize()

  Return the current size of the central open area percentage.

  Returns:
    the size of the donut hole
  See Also:
    `setDonutHoleSize(int)`

### setDonutHoleLabel

    public void setDonutHoleLabel(java.lang.String newLabel)

  Set the text to display centered on the pie. If a positive donutHoleSize has been specified, this will label the central hole. This is just another way to convey information related to the entire pie chart, much like a footnote with a more prominent location.

  Parameters:
    `newLabel` - The text to display at the center of the pie.
  See Also:
    `getDonutHoleLabel()`, `setDonutHoleSize(int)`, `setDonutHoleLabelTextStyle(AdvancedTextStyle)`

### getDonutHoleLabel

    public java.lang.String getDonutHoleLabel()

  Return the current text of the central pie label

  Returns:
    the label of the donut hole
  See Also:
    `setDonutHoleLabel(java.lang.String)`, `getDonutHoleSize()`, `getDonutHoleLabelTextStyle()`

### setDonutHoleLabelTextStyle

    public void setDonutHoleLabelTextStyle(AdvancedTextStyle newStyle)
                                    throws java.lang.IllegalArgumentException

  Set the style of the text to display in the center of the pie.

  Parameters:
    `newStyle` - The set of properties used to display the donutHoleLabel.
  Throws:
    `java.lang.IllegalArgumentException`
  See Also:
    `getDonutHoleLabelTextStyle()`, `setDonutHoleSize(int)`, `setDonutHoleLabel(java.lang.String)`

### getDonutHoleLabelTextStyle

    public AdvancedTextStyle getDonutHoleLabelTextStyle()

  Return the current text style of the central pie label.

  Returns:
    the TextStyle used to display the donut hole label
  See Also:
    `setDonutHoleLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)`, `getDonutHoleSize()`, `getDonutHoleLabel()`

### setResponseLabelTextStyle

    public void setResponseLabelTextStyle(AdvancedTextStyle newStyle)
                                   throws java.lang.IllegalArgumentException

  Set the style of the text to display as a response label.

  Parameters:
    `newStyle` - The set of properties used to display the responseLabel.
  Throws:
    `java.lang.IllegalArgumentException`
  See Also:
    `getResponseLabelTextStyle()`, `setResponseLabelVisiblePolicy(int)`

### getResponseLabelTextStyle

    public AdvancedTextStyle getResponseLabelTextStyle()

  Return the current text style of the response label.

  Returns:
    the TextStyle used to display the response label
  See Also:
    `setResponseLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)`, `setResponseLabelVisiblePolicy(int)`

### setSubgroupLabelModel

    public void setSubgroupLabelModel(PieChartSubgroupModel newModel)

  Set the subgroup label properties.

  The entire subgroup label block may be suppressed if the number of entries and font sizes make it impossible to fit in the available vertical space.

  Parameters:
    `newModel` - The set of properties used to display the subgroup values
  See Also:
    `getSubgroupLabelModel()`

### getSubgroupLabelModel

    public PieChartSubgroupModel getSubgroupLabelModel()

  Return the current subgroup label properties.

  Returns:
    the PieChartSubgroupModel used to display the subgroup values
  See Also:
    `setSubgroupLabelModel(com.sas.graphics.components.piechart.PieChartSubgroupModel)`

### setInsideSliceLabelPlacement

    public void setInsideSliceLabelPlacement(int newPos)

  Set the placement of the inside display values. Automatic placement forces all inside labels. Best fit means to place labels on a slice by slice basis. Labels appear inside their slice unless they don't fit. Those labels move outside their slices.

  Parameters:
    `newPos` - The placement of the inside display values Valid values are:
    - GraphConstants.PLACEMENT_AUTOMATIC
    - GraphConstants.PLACEMENT_BEST
  Throws:
    `java.lang.IllegalArgumentException` - if an invalid value is specified
  See Also:
    `getInsideSliceLabelPlacement()`

### getInsideSliceLabelPlacement

    public int getInsideSliceLabelPlacement()

  Return the current position of the inside display values.

  Returns:
    the position of the inside display values
  See Also:
    `setInsideSliceLabelPlacement(int)`

### setOutsideSliceLabelPlacement

    public void setOutsideSliceLabelPlacement(int newPos)

  Set the position of the outside display values

  Parameters:
    `newPos` - The position of the outside display values Valid values are:
    - GraphConstants.PLACEMENT_AUTOMATIC
    - GraphConstants.PLACEMENT_ARROW
  Throws:
    `java.lang.IllegalArgumentException` - if an invalid value is specified
  See Also:
    `getOutsideSliceLabelPlacement()`

### getOutsideSliceLabelPlacement

    public int getOutsideSliceLabelPlacement()

  Return the current position of the outside display values.

  Returns:
    the position of the outside display values
  See Also:
    `setOutsideSliceLabelPlacement(int)`

### setDimension

    public void setDimension(int newDimension)
                      throws java.lang.IllegalArgumentException

  Set the rendering to display the graph in 2 or 3 dimensions. Valid values are:
  GraphConstants.DIMENSION_2D, GraphConstants.DIMENSION_3D

  The default is GraphConstants.DIMENSION_2D.

  Parameters:
    `newDimension` - how many dimensions the graph will be rendered in
  Throws:
    `java.lang.IllegalArgumentException` - if newDimension is invalid.
  See Also:
    `getDimension()`

### getDimension

    public int getDimension()

  Get the rendering to display the graph in 2 or 3 dimensions.

  Returns:
    how many dimensions the graph will be rendered in
  See Also:
    `setDimension(int)`

### setMissingPolicy

    public void setMissingPolicy(int newMissingPolicy)

  Sets the graph behavior for displaying missing values. (Similar to the server side "missing" statement in prog gchart.)
  Valid values are:
  - GraphConstants.AUTOMATIC (default)
  - GraphConstants.TRUE
  - GraphConstants.FALSE
  GraphConstants.AUTOMATIC is the same as the server side proc gchart default (which is to display all classification variable missing values except category).
  GraphConstants.TRUE is the same as the server side gchart behavior with the "missing" statement (which is to display all all classification variable missing values (including category)). GraphConstants.FALSE means don't display any classification variable missing values.

  Special note:
  The following String values are interpreted as missing values:

  - null
  - zero length string
  - a non-String object in a String data column
  - a string containing only spaces

  The following Number values are interpreted as missing values:

  - null
  - com.sas.MissingValues objects
  - a non-Number object in a Number data column
  - Double.NaN
  - Double.POSITIVE_INFINITY
  - Double.NEGATIVE_INFINITY

  Throws:
    `java.lang.IllegalArgumentException` - if newMissing is invalid.
  See Also:
    `getMissingPolicy()`

### getMissingPolicy

    public int getMissingPolicy()

  Returns the graph behavior for displaying missing values.

  Returns:
    how to display classification variable missing values.
  See Also:
    `setMissingPolicy(int)`

### setStackRole

    public void setStackRole(int newStackRole)

  Sets desired stacking behavior of the pie charts. Valid values are:

       PieChartModel.STACK_SUBGROUP;
       PieChartModel.STACK_RESPONSE;

  The default value is STACK_SUBGROUP, meaning each uniqur subgroup will have a concentric sub-pie, and each response will be displayed in a seperate pie, adjacent to other response's pies.

  Parameters:
    `newStackRole` - the pie stacking preference
  Throws:
    `java.lang.IllegalArgumentException` - if an invalid value is specified
  See Also:
    `getStackRole()`

### getStackRole

    public int getStackRole()

  Returns stacking behavior of the pie chart.

  Returns:
    the pie stacking preference
  See Also:
    `setStackRole(int)`

### setSkin

    public void setSkin(int newSkin)
                 throws java.lang.IllegalArgumentException

  Set the style of skin to modify the pie slice appearance. Skins are not supported with 3D pies. Valid values are:
  GraphConstants.SKIN_AUTOMATIC GraphConstants.SKIN_NONE GraphConstants.SKIN_SATIN GraphConstants.SKIN_MODERN

  The default is GraphConstants.SKIN_AUTOMATIC.

  Parameters:
    `newSkin` - Which skin style to use
  Throws:
    `java.lang.IllegalArgumentException` - if newSkin is invalid.
  See Also:
    `getSkin()`

### getSkin

    public int getSkin()

  Get the style used to modify the displayed pie slices.

  Returns:
    skin style to be used.
  See Also:
    `setSkin(int)`

### equals

    public boolean equals(java.lang.Object obj)

  Determines whether another object is equal to this `PieChartModel`.

  The result is `true` if and only if the argument is not `null` and is a `PieChartModel` object that has the same properties as this object.

  Overrides:
    `equals` in class `GraphModel`
  Parameters:
    `obj` - the object to test for equality with this `PieChartModel`
  Returns:
    `true` if the objects are the same; `false` otherwise.

### hashCode

    public int hashCode()

  Computes the hash code for this `PieChartModel`.

  Overrides:
    `hashCode` in class `GraphModel`
  Returns:
    a hash code value for this object.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.