Finds out the appearance of a series in a graph. The appearance settings for individual data points can override the series settings, so the values obtained from GetSeriesStyle might not reflect the current state of the graph. There are several syntaxes, depending on what settings you want.
GetSeriesStyle provides information about a series. The data points in the series can have their own style settings. Use SetSeriesStyle to change the style values for a series. Use GetDataStyle to get style information for a data point and SetDataStyle to override series settings and set style information for individual data points.
The graph stores style information for properties that do not apply to the current graph type. For example, you can find out the fill pattern for a data point or a series in a two-dimensional line graph, but that fill pattern will not be visible.
Description
Obtains the colors associated with a series in a graph.
Applies to
PowerBuilder DataWindow
DataWindow control
Syntax
PowerBuilder
integer dwcontrol.GetSeriesStyle ( string graphcontrol, string seriesname, grColorType colortype, REF long colorvariable )
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. |
seriesname |
A string whose value is the name of the series for which you want the color. |
colortype |
A value of the grColorType enumerated datatype (in PowerBuilder) specifying the aspect of the series for which you want the color. For a list of values, see grColorType. |
colorvariable |
In PowerBuilder, a long variable in which you want to store the color's RGB value. |
Return value
Returns 1 if it succeeds and -1 if an error occurs. In PowerBuilder, stores in colorvariable the RGB value of the specified series and item. If any argument's value is null, GetSeriesStyle returns null.
Examples
These statements store in the variable color_nbr the background color used for the series PCs in the graph gr_computers in the DataWindow control dw_equipment:
long color_nbr // Get the color. dw_equipment.GetSeriesStyle("gr_computers", & "PCs", Background!, color_nbr)
See also
Description
Obtains the line style and width for a series in a graph.
Applies to
PowerBuilder DataWindow
DataWindow control
Syntax
PowerBuilder
integer dwcontrol.GetSeriesStyle ( string graphcontrol, string seriesname, 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. |
seriesname |
A string whose value is the name of the series for which you want the line style information. |
linestyle |
In PowerBuilder, a variable of type LineStyle in which you want to store the line style of seriesname. For a list of values, see LineStyle. |
linewidth (optional) |
In PowerBuilder, an integer variable in which you want to store the line width for seriesname. The width is measured in pixels. |
Return value
Returns 1 if it succeeds and -1 if an error occurs. In PowerBuilder, stores in linestyle a value of the LineStyle enumerated datatype and in linewidth the width of the line used for the specified series. If any argument's value is null, GetSeriesStyle returns null.
Examples
These statements store in the variables line_style and line_width the line style and width for the series under the mouse pointer in the graph gr_product_data:
string SeriesName integer SeriesNbr, Data_Point, line_width LineStyle line_style grObjectType MouseHit MouseHit = dw_equipment.ObjectAtPointer & ("gr_product_data", SeriesNbr, Data_Point) IF MouseHit = TypeSeries! THEN SeriesName = & dw_equipment.SeriesName("gr_product_data", & SeriesNbr) dw_equipment.GetSeriesStyle ("gr_product_data", & SeriesName, line_style, line_width) END IF
See also
Description
Obtains the fill pattern of a series in a graph.
Applies to
PowerBuilder DataWindow
DataWindow control
Syntax
PowerBuilder
integer dwcontrol.GetSeriesStyle ( string graphcontrol, string seriesname, REF FillPattern fillvariable )
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. |
seriesname |
A string whose value is the name of the series for which you want the style information. |
fillvariable |
In PowerBuilder, a variable of type FillPattern in which you want to store the fill pattern value. For a list of values, see FillPattern. |
Return value
Returns 1 if it succeeds and -1 if an error occurs. In PowerBuilder, stores in fillvariable identifying the fill pattern for the specified series. If any argument's value is null, GetSeriesStyle returns null.
Examples
This example stores in the variable data_pattern the fill pattern for the series under the pointer in the graph gr_depts in the DataWindow control dw_employees. It then sets the fill pattern for the series Total Salary in the graph gr_dept_data to that pattern:
string SeriesName integer SeriesNbr, Data_Point FillPattern data_pattern grObjectType MouseHit MouseHit = dw_employees.ObjectAtPointer("gr_depts" , & SeriesNbr, Data_Point) IF MouseHit = TypeSeries! THEN SeriesName = & dw_employees.SeriesName("gr_depts" , SeriesNbr) dw_employees.GetSeriesStyle("gr_depts" , & SeriesName, data_pattern) gr_dept_data.SetSeriesStyle("Total Salary", & data_pattern) END IF
See also
Description
Obtains the symbol used for data points in a series in a graph.
Applies to
PowerBuilder DataWindow
DataWindow control
Syntax
PowerBuilder
integer dwcontrol.GetSeriesStyle ( string graphcontrol, string seriesname, REF grSymbolType symbolvariable )
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. |
seriesname |
A string whose value is the name of the series for which you want the style information. |
symbolvariable |
In PowerBuilder, the variable of type grSymbolType in which you want to store the symbol value. For a list of values, see grSymbolType. |
Return value
Returns 1 if it succeeds and -1 if an error occurs. In PowerBuilder, stores in symbolvariable a value of the grSymbolType enumerated datatype for the symbol used for the specified series. If any argument's value is null, GetSeriesStyle returns null.
Examples
This example stores in the variable data_pattern the fill pattern for the series under the pointer in the graph gr_depts in the DataWindow control dw_employees. It then sets the fill pattern for the series Total Salary in the graph gr_dept_data to that pattern:
string SeriesName integer SeriesNbr, Data_Point grSymbolType symbol grObjectType MouseHit MouseHit = dw_employees.ObjectAtPointer("gr_depts" , & SeriesNbr, Data_Point) IF MouseHit = TypeSeries! THEN SeriesName = & dw_employees.SeriesName("gr_depts" , SeriesNbr) dw_employees.GetSeriesStyle("gr_depts" , & SeriesName, symbol gr_dept_data.SetSeriesStyle("Total Salary", & symbol) END IF
See also
Description
Reports whether a series in a graph is an overlay -- whether it is shown as a line on top of another graph type.
Applies to
PowerBuilder DataWindow
DataWindow control
Syntax
PowerBuilder
integer dwcontrol.GetSeriesStyle ( string graphcontrol, string seriesname, REF boolean overlayindicator )
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. |
seriesname |
A string whose value is the name of the series for which you want the overlay status. |
overlayindicator |
In PowerBuilder, a boolean variable in which you want to store a value indicating whether the series is an overlay. GetSeriesStyle sets overlayindicator to true if the series is an overlay and false if it is not. |
Return value
Returns 1 if it succeeds and -1 if an error occurs. In PowerBuilder, stores in overlayindicator true if the specified series is an overlay and false if it is not. If any argument's value is null, GetSeriesStyle returns null.
See also