Structures of type _legendtype contain size, location, and colors of the chart legend. The PGCHART.H file defines the structure type as the following:
typedef struct
{
short legend; /* TRUE=draw legend;
FALSE=no legend */
short place; /* _PG_RIGHT, _PG_BOTTOM,
_PG_OVERLAY */
short textcolor; /* Palette color for text*/
short autosize; /* TRUE=system calculates
legend size */
_windowtype legendwindow; /* Window definition for
legend */
} _legendtype;
The following list describes _legendtype member variables:
autosize
A Boolean true/false variable that determines whether presentation graphics is to automatically calculate the size of the legend. If autosize equals FALSE, the legend window must be specified in the legendwindow structure (see the following).
legend
A Boolean true/false variable that determines whether a legend is to appear on the chart. The legend variable is ignored by functions that graph single-series charts.
legendwindow
A _windowtype structure that defines coordinates, background color, and border frame for the legend. Coordinates given in legendwindow are ignored if autosize is set to TRUE.
place
An integer that specifies the location of the legend relative to the data window. Setting place equal to the constant _PG_RIGHT positions the legend to the right of the data window. Setting place to _PG_BOTTOM positions the legend below the data window. Setting place to _PG_OVERLAY positions the legend within the data window.
These settings influence the size of the data window. If place equals _PG_RIGHT or _PG_BOTTOM, presentation graphics automatically sizes the data window to accommodate the legend. If place equals _PG_OVERLAY, the data window is sized without regard to the legend.
textcolor
An integer between 1 and _PG_PALETTELEN that specifies the color of text within the legend window.