The Cdk graph widget creates a graph widget. This widget can draw a graph in
both plot mode and line mode. The following are functions which create or
manipulate the Cdk graph box widget.
.SHAVAILABLEFUNCTIONS
CDKGRAPH *newCDKGraph (CDKSCREEN *\f2screen\f1, int \f2xpos\f1, int \f2ypos\f1, int \f2height\f1, int \f2width\f1, char *\f2title\f1, char *\f2xtitle\f1, char *\f2ytitle\f1);
.RS3
This function creates a pointer to a graph widget. The \f2screen\f1 parameter
is the screen you wish this widget to be placed in. The parameter \f2xpos\f1
controls the placement of the object along the horizontal axis. This parameter
can accept an integer value or one of the pre-defined values of \f4LEFT\f1,
\f4RIGHT\f1, and \f4CENTER\f1. The parameter \f2ypos\f1 controls the placement
of the object along the vertical axis. This parameter can accept an integer
value or one of the pre-defined values of \f4TOP\f1, \f4BOTTOM\f1, and \f4CENTER\f1.
The parameters \f2height\f1 and \f2width\f1 control the height and width of the
widget. If you provide a value of zero for either of the height or the width,
the widget will be created with the full width and height of the screen. If
you provide a negative value, the widget will be created the full height or
width minus the value provided. The three parameters: \f2title\f1, \f2xtitle\f1,
and \f2ytitle\f1, are the graph title, the X axis title, and the Y axis title
respectively. The graph title can be more than one line; just provide a
carriage return character at the line break. If the widget could not be
created then a \f4NULL\f1 pointer is returned.
.RE
void setCDKGraph (CDKGRAPH *\f2graph\f1, int *\f2values\f1, int \f2valueCount\f1, chtype *\f2graphCharacters\f1, boolean \f2startAtZero\f1, EGraphDisplayType \f2displayType\f1);
.RS3
This function lets the programmer set the specific values of the graph widget.
The parameter \f2values\f1 is an integer array of the values to display in the
widget; \f2valueCount\f1 is the number of values in the array. The parameter
\f2graphCharacters\f1 is an array of the characters to use for each graph point.
The parameter \f2startAtZero\f1 states whether you want the graph to start at
zero or the lowest values of the X and Y axis'. The parameter \f2displayType\f1
accepts either \f4vPLOT\f1, to make the graph draw the values as a plot graph,
or \f4vLINE\f1 to draw the values as a line graph.
.RE
void setCDKGraphValues (CDKGRAPH *\f2graph\f1, int *\f2values\f1, int \f2valueCount\f1, boolean \f2startAtZero\f1);
.RS3
This function lets the programmer set the specific values of the graph widget.
The parameter \f2values\f1 is an integer array of the values to display in the
widget; where \f2valueCount\f1 is the number of values in the array. The
parameter \f2startAtZero\f1 states whether you want the graph to start at
zero or the lowest values of the X and Y axis'.
.RE
char *getCDKGraphValues (CDKGRAPH *\f2graph\f1);
.RS3
This returns all the values currently in the graph widget.
.RE
void setCDKGraphValue (CDKGRAPH *\f2graph\f1, int \f2value\f1, boolean \f2startAtZero\f1);
.RS3
This function lets the programmer set a specific value of the graph widget.
The parameter \f2value\f1 is the new value, while \f2index\f1 is the
index where the new value will be stored. The parameter \f2startAtZero\f1
states whether you want the graph to start at zero or the lowest values of
the X and Y axis'.
.RE
char getCDKGraphValue (CDKGRAPH *\f2graph\f1, int \f2index\f1);
.RS3
This returns the value in the graph at the given index.