Syntax 2: For the line style and width used by a data
point
Description
Obtains the line style and width for a data point in a
graph.
Applies to
Graph controls in windows and user objects, and graphs in
DataWindow controls
Syntax
|
1 |
controlname.GetDataStyle ( { graphcontrol, } seriesnumber, datapointnumber, linestyle, linewidth ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the graph for which you want the line style |
|
graphcontrol (DataWindow control only) |
(Optional) A string whose value is the name of the graph |
|
seriesnumber |
The number of the series in which you want the line |
|
datapointnumber |
The number of the data point for which you want the line |
|
linestyle |
A variable of type LineStyle in which you want to store |
|
linewidth |
An integer variable in which you want to store the width |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. For the
specified series and data point, stores its line style in linestyle and
the line’s width in linewidth. If any argument’s value is null,
GetDataStyle returns null.
Usage
For the enumerated datatype values that GetDataStyle will store in
linestyle, see SetDataStyle.
Examples
This example gets the line style and width of data point 10 in the
series named Costs in the graph gr_product_data. It stores the
information in the variables line_style and line_width:
|
1 2 3 4 5 6 7 |
integer SeriesNbr, line_width LineStyle line_style // Get the number of the series SeriesNbr = gr_product_data.FindSeries("Costs") gr_product_data.GetDataStyle(SeriesNbr, 10, & line_style, line_width) |
This example gets the line style and width for data point 6 in the
series entered in the SingleLineEdit sle_series in the graph gr_depts in
the DataWindow control dw_employees. The information is stored in the
variables line_style and line_width:
|
1 2 3 4 5 6 7 8 9 10 |
integer SeriesNbr, line_width LineStyle line_style // Get the number of the series SeriesNbr = dw_employees.FindSeries( & " gr_depts " , sle_series.Text) // Get the line style and width dw_employees.GetDataStyle("gr_depts", SeriesNbr, & 6, line_style, line_width) |
See also