GINO Graphics Suite - GINOGRAF v9.5  

ggAddPieChartSegment

Syntax

[C/C++:]
void ggAddPieChartSegment(float angfro, float angto, float value,char string[ ], int fill, int line);
[F90:]
subroutine ggAddPieChartSegment(angfro, angto, value, string, fill, line)

real, intent(in) :: angfro, angto, value
character*(*), intent(in) :: string
integer, intent(in) :: fill, line

Arguments

angfro
Number giving the angle (in degrees), measured anticlockwise from the three o'clock position, which defines the start of the segment

angto
Number giving the angle (in degrees), measured anticlockwise from the three o'clock position, which defines the end of the segment

value
Data value associated with segment. The value need not be a percentage as ggAddPieChartSegment() automatically calculates the percentage of the whole pie chart that the segment occupies

string
Text string containing segment label

fill
Fill style to be used to fill the segment

< -1 Specifies no fill and no boundary
= GHOLLOW Specifies boundary only
= GSOLID Specifies a solid fill
= GFINEHORIZONTAL }
= GFINEVERTICAL }
= GFINELEFTDIAGONAL }
= GFINERIGHTDIAGONAL }
= GFINEHORIZONTALGRID }
= GFINEDIAGONALGRID }
= GFINEHORIZONTALMESH } Specifies the hatch
= GFINEDIAGONALMESH } style index
= GCOARSEHORIZONTAL }
= GCOARSEVERTICAL }
= GCOARSELEFTDIAGONAL }
= GCOARSERIGHTDIAGONAL }
= GCOARSEHORIZONTALGRID }
= GCOARSEDIAGONALGRID }
= GCOARSEHORIZONTALMESH }
= GCOARSEDIAGONALMESH }
> 256 Specifies a solid fill for software fill, or the fill style index for hardware fill
line
Integer determining the line style to be used to fill the segment. The value of line is irrelevant where fill has a value less than -1

= GCURRENT Specifies the current line style
= 1 to 256 Specifies the line style index
>256 Specifies the current line style

Description

The routine ggAddPieChartSegment() draws a single annotated, filled Pie Chart segment anticlockwise between the angles angfro and angto, and with a radius and centre to fit the available drawing window or with respect to the Pie Chart frame defined by the most recent call to ggSetPieChartFrame().

The segment consists of the following elements; the background filling, the annotation and associated box and the segment boundary.

The segment is filled in the style determined by the combination of the fill and line style indices fill and line. Where fill is equal to GHOLLOW, only the boundary of the segment is drawn. The segment may be left unfilled by setting fill to -2 or less. Negative values of line cause a warning to be output and the absolute value is used. The default line styles, hatch styles and fill styles appear in Appendix A of this manual (see Defaults). The current line style is left unchanged.

The default annotation for the Pie Chart is to print the segment label horizontally in a masked box within the segment boundary. Other forms of annotation are available including radial and external, each of which may include a combination of the segment label, the percentage value of the segment and the data value itself. All these options are set with the Pie Chart annotation routine ggSetPieChartAnnotation().  The routine ggSetPieChartBoxType() controls the filling/masking and drawing of the annotation box for internal segment annotation.

By default the segment boundary is drawn in the current pen colour, this can be switched off using ggSetPieChartBoundSwitch().

See Also

ggAddPieChartSegment Usage
ggSetPieChartStartAngle
ggSetPieChartAnnotation
ggSetPieChartBoxType
ggSetPieChartBoundSwitch
ggSetPieChartExplosion
ggSetPieChartFrame