GetData method (Graphs in DataWindows)
Description
Gets the value of a data point in a series in a graph when
the values axis has numeric values.
For handling all datatypes and for getting values in the DataWindow
Web ActiveX, see GetDataValue.
Controls
PowerBuilder DataWindow DataWindow
control
Syntax
[PowerBuilder]
|
1 |
double <span>dwcontrol</span>.<span>GetData</span> ( string <span>graphcontrol</span>, integer <span>seriesnumber</span>, long <span>datapoint</span> , { grDataType <span>datatype</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 |
|
datatype |
A value of the grDataType enumerated Values are:
For more information, see grDataType. |
Return Values
Returns the value of the data in datapoint if
it succeeds, 0 if the series does not exist, and -1 if an error
occurs. If any argument’s value is null, GetData returns null.
Usage
You can use GetData only for graphs whose
values axis is numeric. For graphs with other types of values axes,
use the GetDataValue method instead.
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 |
|
1 |
double data_value |
|
1 |
|
1 |
// Get the number of the series. |
|
1 |
SeriesNbr = & |
|
1 |
dw_equipment.FindSeries("gr_computers", "Costs") |
|
1 |
data_value = dw_equipment.<span>GetData</span>( & |
|
1 |
"gr_computers" <span>,</span> SeriesNbr, 3) |
These statements obtain the x value of the data point
in the scatter graph gr_sales_yr in the DataWindow
dw_sales and store it in data_value:
|
1 |
integer SeriesNbr, ItemNbr |
|
1 |
double data_value |
|
1 |
|
1 |
dw_sales.ObjectAtPointer("gr_sales_yr", SeriesNbr, & |
|
1 |
ItemNbr) |
|
1 |
data_value = dw_sales.<span>GetData</span>("gr_sales_yr", & |
|
1 |
SeriesNbr, ItemNbr, xValue!) |