GetDataValue method (Graphs in DataWindows)
Description
Obtains the value of a data point in a series in a graph.
In the Web ActiveX, there are several methods, each handling
a different datatype.
Controls
PowerBuilder DataWindow DataWindow
control
DataWindow Web ActiveX DataWindow
control
Syntax
[PowerBuilder]
|
1 |
integer <span>dwcontrol</span>.<span>GetDataValue</span> ( string <span>graphcontrol</span>, <br> integer <span>seriesnumber</span>, long <span>datapoint</span>, REF date <span>datavariable</span> <br> {, grDataType <span>XorY</span> } )<br>integer <span>dwcontrol</span>.<span>GetDataValue</span> ( string <span>graphcontrol</span>, <br> integer <span>seriesnumber</span>, long <span>datapoint</span>, REF datetime <span>datavariable</span> <br> {, grDataType <span>XorY</span> } )<br>integer <span>dwcontrol</span>.<span>GetDataValue</span> ( string <span>graphcontrol</span>, <br> integer <span>seriesnumber</span>, long <span>datapoint</span>, REF double <span>datavariable</span> <br> {, grDataType <span>XorY</span> } )<br>integer <span>dwcontrol</span>.<span>GetDataValue</span> ( string <span>graphcontrol</span>, <br> integer <span>seriesnumber</span>, long <span>datapoint</span>, REF string <span>datavariable</span> <br> {, grDataType <span>XorY</span> } )<br>integer <span>dwcontrol</span>.<span>GetDataValue</span> ( string <span>graphcontrol</span>, <br> integer <span>seriesnumber</span>, long <span>datapoint</span>, REF time <span>datavariable</span> <br> {, grDataType <span>XorY</span> } ) |
[Web ActiveX]
|
1 |
number <span>dwcontrol</span>.<span>GetDataDate</span> ( string <span>graphcontrol</span> , <br> number <span>seriesnumber</span>, number <span>datapoint</span> , number <span>XorY</span> )<br>number <span>dwcontrol</span>.<span>GetDataNumber</span> ( string <span>graphcontrol</span> , <br> number <span>seriesnumber</span>, number <span>datapoint</span> , number <span>XorY</span> )<br>number <span>dwcontrol</span>.<span>GetDataString</span> ( string <span>graphcontrol</span> , <br> number <span>seriesnumber</span>, number <span>datapoint</span> , number <span>XorY</span> ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to the DataWindow control |
|
graphcontrol |
A string whose value is the name of the |
|
seriesnumber |
The number that identifies the series |
|
datapoint |
The number of the data point for which |
|
datavariable |
The name of a variable that will hold In the Web ActiveX, call the GetDataDateVariable, GetDataNumberVariable, |
|
xory |
A value of the grDataType enumerated For values, see grDataType. |
Return Values
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 |
integer SeriesNbr, rtn |
|
1 |
double data_value |
|
1 |
|
1 |
// Get the number of the series. |
|
1 |
SeriesNbr = dw_equipment.FindSeries( & |
|
1 |
"gr_computers", "Costs") |
|
1 |
rtn = dw_equipment.<span>GetDataValue</span>( & |
|
1 |
<span> </span> "gr_computers" <span>,</span> SeriesNbr, 3, data_value) |