AGPieChart / AGPieChartObj


Synopsis

define a pie chart


AGGeometryPrimitive AGPieChart
{
geometry = {0,0};
AGFloat angleInterval[2] = {0.0,360.0};
AGColor arrowColor = "antibackground";
AGColor colors[] ={"red","green","cyan",
   "orange","purple", "yellow",
   "brown","turquoise",
   "magenta"};
AGDistance diameter = 80.0;
AGDistance explodeOffset = 5.0;
AGColor frameColor = "antibackground";
AGDistance frameWidth = 0.25;
AGColor labelBoxFillColor = "background";
AGColor labelBoxFrameColor = "antibackground";
AGDistance labelBoxFrameWidth = 0.25;
AGColor labelColor = "antibackground";
AGPieLabelContentEnum labelContent = "value";
AGInt labelDecimals;
AGFont labelFont = "Helvetica";
AGDistance labelHeight = 2.7;
AGPieLabelJustificationEnum labelJustification = "left";
AGPieLabelPositionEnum labelPosition = "circular";
AGString labelPrefix;
AGString labelStrings[];
AGString labelSuffix;
AGFloat+IPort2 values[] = {3,2,1.573,6.33,-2.5};
};

Description

AGPieChart produces a pie chart of up to 30 sectors. You can label the individual pie sectors with actual values and/or percent-plus text labels.

Subobjects

visibility
priority

Inherited from AGPrimitive through AGGeometryPrimitive.

geometry

Inherited from AGGeometryPrimitive.

angleInterval

Defines how much of a full circle is used for an entire pie chart. This value is measured in degrees counterclockwise, where 0 degrees is at 3 o'clock.

arrowColor

The color of the arrows that connect pie sectors with label boxes.

colors

An array of colors that determine the colors of individual pie sectors. If you supply fewer colors than data values, the colors are repeated cyclically.

diameter

The diameter of the circle that encloses the pie chart.

explodeOffset

The offset of exploded pie sectors, given from the center of the pie chart to the corner of the sectors. A pie sector is exploded if its value is negative.

frameColor
frameWidth

The color and width of the frames of the individual pie sectors.

labelBoxFillColor
labelBoxFrameColor
labelBoxFrameWidth

The fill color, frame color, and frame width of the label boxes.

labelContent

Determines the content of the label boxes. The legal values are as follows:

•      "text" shows only text labels.

•      "percent" shows text labels and percent.

•      "value" shows text labels and actual data values.

•      "valuepercent" shows text labels, value, and percent, in that order.

•      "percentvalue" shows text labels, percent, and value, in that order.

labelDecimals
labelFont
labelHeight
labelColor

The number of decimal places, the font, the color, and the height of the labels.

labelJustification

The horizontal justification of the labels inside the label boxes. The legal values are "right", "center", and "left".

labelPosition

Determines the position of the label boxes. The legal values are as follows:

•      "circular" places label boxes that do not fit inside the pie sectors circularly around the pie chart.

•      "aligned" places label boxes that do not fit inside the pie sectors outside the pie chart and aligns them vertically.

•      "inside" places label boxes inside the pie sectors even if they do not fit.

•      "outsidecircular" places all label boxes circularly around the pie chart.

•      "outsidealigned" places all label boxes outside the pie chart and aligns them vertically.

labelPrefix
labelSuffix

Text strings that are placed before and after the values, if the values are plotted in the label boxes.

labelStrings

An array of strings that are used as label text inside the label boxes. If you supply fewer strings than there are pie sectors, the excess pie sectors do not include label text in the label boxes.

values

An array of floating-point values that determine the size of each pie sector. Only the absolute values are used; any sector whose value is negative is drawn exploded. If you supply more than 30 values, only the first 30 values are used to produce the pie chart.

Examples

Libraries.Examples.Annotation_Graphing.piechart
examples/piechart.v

File

v/ag.v

See Also

Related modules

•      AGGeometryPrimitive / AGRenderPrimitive

•      AGPrimitive