GetDataValue
method (Graphs in DataWindows)
Description
Obtains the value of a data point in a series in a graph.
Applies to
PowerBuilder DataWindow
DataWindow control
Syntax
PowerBuilder
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
integer dwcontrol.GetDataValue ( string graphcontrol, integer seriesnumber, long datapoint, REF date datavariable {, grDataType XorY } ) integer dwcontrol.GetDataValue ( string graphcontrol, integer seriesnumber, long datapoint, REF datetime datavariable {, grDataType XorY } ) integer dwcontrol.GetDataValue ( string graphcontrol, integer seriesnumber, long datapoint, REF double datavariable {, grDataType XorY } ) integer dwcontrol.GetDataValue ( string graphcontrol, integer seriesnumber, long datapoint, REF string datavariable {, grDataType XorY } ) integer dwcontrol.GetDataValue ( string graphcontrol, integer seriesnumber, long datapoint, REF time datavariable {, grDataType XorY } ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to the DataWindow control containing the |
|
graphcontrol |
A string whose value is the name of the graph in the |
|
seriesnumber |
The number that identifies the series from which you |
|
datapoint |
The number of the data point for which you want the |
|
datavariable |
The name of a variable that will hold the data value. |
|
xory (scatter graph (optional) |
A value of the grDataType enumerated datatype (in For values, see grDataType. |
Return value
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, GetDataValue returns null.
Usage
GetDataValue retrieves data from any graph. The data is stored in
datavariable, whose datatype must match the datatype of the graph’s
values axis, or returned by a method that corresponds to the axis
datatype. If the values axis is numeric, you can also use the GetData
function.
Calling GetDataValue when the datatype of datavariable is not the
same as the datatype of the data produces undefined results.
If a variable’s datatype is non-numeric and the datatype of
datavariable is double, GetDataValue returns the number of the datapoint
in datavariable.
If a variable’s datatype is date, time, or DateTime,
GetDataValue returns 1 when the datatype of datavariable is any of those
datatypes. However, if the variable’s datatype is time and the datatype of
datavariable is date, GetDataValue returns 00/00/00 in datavariable, and
if the variable’s datatype is date and the datatype of datavariable is
time, GetDataValue returns 00:00:00 in datavariable.
Examples
These statements obtain the data value of data point 3 in the series
named Costs in the graph gr_computers in the DataWindow control
dw_equipment:
|
1 2 3 4 5 6 7 8 |
integer SeriesNbr, rtn double data_value // Get the number of the series. SeriesNbr = dw_equipment.FindSeries( & "gr_computers", "Costs") rtn = dw_equipment.GetDataValue( & "gr_computers" , SeriesNbr, 3, data_value) |
See also