Description
Obtains the line style and width for a data point in a graph.
Applies to
PowerBuilder DataWindow
DataWindow control
Syntax
PowerBuilder
integer dwcontrol.GetDataStyle ( string graphcontrol, integer seriesnumber, integer datapointnumber, REF LineStyle linestyle, REF integer linewidth )
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 of the series in which you want the line style and width of a data point. |
datapointnumber |
The number of the data point for which you want the line style and width. |
linestyle |
In PowerBuilder, a variable of type LineStyle in which you want to store the line style. For a list of line style values, see LineStyle. |
linewidth |
In PowerBuilder, an integer variable in which you want to store the width of the line. The width is measured in pixels. |
Return value
Returns 1 if it succeeds and -1 if an error occurs. In PowerBuilder, for the specified series and data point, GetDataStyle stores its line style in linestyle and the line's width in linewidth. If any argument's value is null, GetDataStyle returns null.
Examples
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:
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