Displays a pie chart.
#include <pgchart.h>
short __far _pg_chartpie( _chartenv __far *env,
char __far * __far *categories, float __far *values, short __far *explode,
short n );
env | Chart environment structure | |
categories | Array of category labels | |
values | Array of data values | |
explode | Array of explode flags | |
n | Number of data values to chart |
The _pg_chartpie function displays a pie chart for the data contained in the array values. Pie charts are formed from a single series of data—there is no multiseries version of pie charts as there is for other chart types.
The array explode must be dimensioned so that its length is greater than or equal to the argument n. All entries in explode are either 0 or 1. If an entry is 1, the corresponding pie slice is displayed slightly removed from the rest of the pie.
For example, if the explode array is initialized as
short explode[5] = {0, 1, 0, 0, 0};
the pie slice corresponding to the second entry of the categories array will be displayed “exploded” from the other four slices.
For a discussion of the chart environment and related topics, see “Presentation-Graphics Functions”.
The _pg_chartpie function returns 0 if there were no errors. A nonzero value indicates a failure.
Standards:None
16-Bit:DOS
32-Bit:None
_pg_analyzepie, _pg_defaultchart, _pg_initchart
See the example for _pg_chart.