Chapter Contents

Previous

Next
SAS/AF Software: Class Dictionary

Specifying Data Dimensions and Variables for a Pie Control

A Pie control can analyze one, two, or three independent variables. The number of data dimensions must correspond to the number of independent variables in the analysis. To set the data dimension, use the dataDimensions attribute.

To specify the variables for a Pie control, use the attributes sliceVariable to specify the independent variable and the sizeVariable to specify the response (dependent) variable. The independent variable determines what slices are in the pie, and the response variable determines the sizes of the slices. The control supports long variable names, and mixed-case variable names.

For a Pie control named pie1, the following code sets a slice variable and a size variable:

pie1.dataDimensions = '1d';
pie1.sliceVariable = 'country';
pie1.sizeVariable  = 'sales';

Additional Response Variables. To add a second response variable to the analysis, use the heightVariable attribute, which determines the height of each pie slice. This attribute is not available if the viewMode attribute is set to 2D. You can use color as a response variable with the colorVariable attribute, available in both two- and three-dimensional viewing modes. The color variable's values determine the slice colors. For more information, see Using a Color Variable in a Pie Control.

Additional Independent Variables. To add a second independent variable to the analysis, use the rowVariable attribute. A separate pie chart is displayed for each of the row variable's values, and the charts are organized in a row. To add a third independent variable, use the columnVariable attribute. A separate pie chart is displayed for each of the column variable's values, and the charts are organized in a grid.

The number of independent variables must correspond to the pie chart's data dimensions. For analyzing two data dimensions, you must use the rowVariable attribute for the second independent variable. If you specify more independent variables than are set on the dataDimensions attribute, the additional independent variables are not used in the pie chart.

The following table summarizes the Pie control's variable attributes.

Attribute Sets Determines
sliceVariable first independent variable pie slices
sizeVariable first response variable size of pie slices
colorVariable additional response variable color of pie slices
heightVariable additional response variable (not available if viewMode is 2D) height of pie slices
rowVariable second independent variable number of pie charts in a row of charts
columnVariable third independent variable number of columns in a grid of pie charts


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.