Syntax
[C/C++:]
void ggSetPieChartAnnotation(int type, int txt, int per, int val, float tol);
[F90:]
subroutine ggSetPieChartAnnotation(type, txt, per, val, tol)
integer, intent(in) :: type, txt, per, val
real, intent(in) :: tol
Arguments
type
Pie chart annotation type
txt
Flag determining whether text string is included in annotation
|
= GNOTEXT |
Text string not included |
|
= GTEXT |
Text string included |
per
Flag determining whether calculated percentage is included in annotation
|
= GNOPERCENT |
Percentage value not included |
|
= GPERCENT |
Percentage value included |
val
Flag determining whether data value is included in annotation
|
= GNODATA |
Data value not included |
|
= GDATA |
Data value included |
tol
Tolerance level. The minimum percentage of the whole Pie Chart that the segment must occupy before being annotated
Description
The routine ggSetPieChartAnnotation() sets the Pie Chart annotation type for the complete Pie Chart routines ggPlotPieChart() and ggAddPieChartSegment().
The style and position of the annotation is set by
type. Radial annotation (GRADIAL) outputs a single string, bisecting the Pie Chart segment in such a way that it is readable from left to right when viewed from the 6 o'clock position (Y axis negative direction). Internal annotation (GINTERNAL) is printed horizontally in a masked box within the segment. However, if the required strings do not fit then they are automatically printed outside the segment (as for external annotation). External annotation (GEXTERNAL) prints the required output as a single string horizontally outside the segment with a connecting line.
The annotation may consist of up to three elements: text strings held in the array
string, percentage values calculated from the proportion of the whole pie that each segment occupies, and data values held in the array
value. The inclusion of each of these elements is determined by the three flags
txt,
per and
val.
Pie chart annotation can be suppressed for small segments by setting the value of
tol to a suitable value.
tol is measured as a percentage of a complete circle, therefore if it were set to 1.0 all segments less than 1% of the complete circle (3.6 degrees) would not be annotated.
Percentage values are always followed by a percent symbol. Value output is in the format set by ggSetAxesAnnotation() for the Y axis which by default is with up to 2 decimal places. The value may also include prefix and suffix strings set by ggSetValueTags().
The routine ggSetPieChartBoxType() is used to control the form of the box used with the internal Pie Chart annotation (GINTERNAL).
All the annotation settings are returned to their default with the routine ggRestorePieChartSettings().
See Also
ggSetPieChartAnnotation UsageggSetAxesAnnotationggSetPieChartBoxTypeggPlotPieChartggRestorePieChartSettingsggAddPieChartSegmentggSetValueTags