GetDataValue – PB Docs 125

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]

[Web ActiveX]

Argument

Description

dwcontrol

A reference to the DataWindow control
containing the graph.

graphcontrol

A string whose value is the name of the
graph in the DataWindow control.

seriesnumber

The number that identifies the series
from which you want data.

datapoint

The number of the data point for which
you want the value.

datavariable

The name of a variable that will hold
the data value. The variable’s datatype can be date, DateTime,
double, string, or time. The variable must have the same datatype
as the values axis of the graph.

In the Web ActiveX, call the GetDataDateVariable, GetDataNumberVariable,
or GetDataStringVariable to get the value, instead
of using the reference variable.

xory
(scatter
graph only)
(optional)

A value of the grDataType enumerated
datatype (in PowerBuilder) or an integer (in the Web ActiveX) specifying whether
you want the x or y value of the data point in a scatter graph.

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:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x