The Pie Chart component stores pie chart data in the form of label/value pairs. Each pair represents a sector of the pie; the component should be invoked repeatedly, once for each sector, until all required data is stored in it.
When the Pie Chart component lands in the Workspace, it takes the following form:
Here the label slot accepts procedure variables or database table fields of TEXT type, the value slot accepts numeric data of FLOAT, MONEY or INTEGER type, and the chart handle is a variable that carries all plot data accumulated by the Pie Chart component; it should be passed to the Print component as shown in the following example:
Run-time parameters
The following Pie Chart parameters can be changed at the run time through the Inspector:
Explosion index and factor
The Pie Chart can have one or more of its sectors "exploded" - i.e. moved out of the pie by the preset amount of space (specified as a percentage relative to the radius of the pie circle). The index of the exploded sector can be set to a fixed value, or passed through a variable. In the latter case, the variable carrying the index must be assigned the index value before execution of the Pie Chart component.
The sector index count starts with 1.
Chart title
By default, the chart title is inherited from the Print Template where the Pie Chart field is set. However, the Report Procedure can set the chart title to a specified text, or pass it through a variable. As in the case of explosion index, if the variable is used, it must be assigned the text before execution of the Pie Chart component.
The following pie chart graphic was created by the above report, with the settings of the Pie Chart Inspector as shown: