Specifies the appearance of a series in a graph. There are several syntaxes, depending on what settings you want to change.
To |
Use |
---|---|
Set the series’ colors For the Web ActiveX, called SetSeriesStyleColor |
|
Set the line style and width For the Web ActiveX, called SetSeriesStyleLine |
|
Set the fill pattern for the series For the Web ActiveX, called SetSeriesStyleFill |
|
Set the symbol for the series For the Web ActiveX, called SetSeriesStyleSymbol |
|
Specify that the series is an overlay For the Web ActiveX, called SetSeriesStyleOverlay |
Specifies the colors of a series in a graph.
PowerBuilder DataWindow DataWindow control
DataWindow Web ActiveX DataWindow control
integer dwcontrol.SetSeriesStyle ( string graphcontrol, string seriesname, grColorType colortype, long color )
number dwcontrol.SetSeriesStyleColor ( string graphcontrol, string seriesname, number colortype, number color )
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 to set the color. |
colortype |
A value of the grColorType enumerated datatype specifying the item for which you want to set the color. For a list of values, see grColorType. |
color |
A long specifying an RGB value for the new color. |
Returns 1 if it succeeds and -1 if an error occurs. If any argument’s value is null, SetSeriesStyle returns null.
Data points in a series can have their own style settings. Settings made with SetDataStyle set the style of individual data points and override series settings.
The graph stores style information for properties that do not apply to the current graph type. For example, you can set the fill pattern in a two-dimensional line graph or the line style in a bar graph, but that fill pattern or line style will not be visible.
You can specify the appearance of a series in the graph before the application draws the graph. To do so:
PowerBuilder Define a user event for pbm_dwngraphcreate and call SetSeriesStyle in the script for that event. The event pbm_dwngraphcreate is triggered just before a graph is created in a DataWindow object.
Web ActiveX Call any of the SetSeriesStyle methods in the onGraphCreate event.
Using SetSeriesStyle with DirectX 3D Graphs You can only set the color for the foreground. Background, line color, and shade are not supported.
PowerBuilder This statement sets the background color of the series named Salary in the graph gr_depts in the DataWindow control dw_employees to black:
dw_employees.SetSeriesStyle("gr_depts", &
"Salary", Background!, 0)
These statements in the Clicked event of the graph control gr_product_data coordinate line color between it and the graph gr_sales_data. The script stores the line color for the series under the mouse pointer in the graph gr_product_data in the variable line_color. Then it sets the line color for the series Northeast in the graph gr_sales_data within the DataWindowcontrol dw_sales to that color:
string SeriesName
integer SeriesNbr, Series_Point
long line_color
grObjectType MouseHit
MouseHit = This.ObjectAtPointer( &
SeriesNbr,Series_Point)
IF MouseHit = TypeSeries! THEN
SeriesName = &
gr_product_data.SeriesName(SeriesNbr)
gr_product_data.GetSeriesStyle(SeriesName, &
LineColor!, line_color)
dw_sales.SetSeriesStyle("gr_sales_data", &
"Northeast", LineColor!, line_color)
END IF
Specifies the style and width of a series’ lines in a graph.
PowerBuilder DataWindow DataWindow control
DataWindow Web ActiveX DataWindow control
integer dwcontrol.SetSeriesStyle ( string graphcontrol, string seriesname, LineStyle linestyle {, integer linewidth } )
number dwcontrol.SetSeriesStyleLine ( string graphcontrol, string seriesname, number linestyle, number 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 to set the line style and width. |
linestyle |
A value of the LineStyle enumerated datatype (in PowerBuilder) or an integer (for the Web ActiveX) specifying the line style. For a list of values, see LineStyle. |
linewidth (optional for PowerBuilder) |
An integer specifying the width of the line in pixels. |
Returns 1 if it succeeds and -1 if an error occurs. If any argument’s value is null, SetSeriesStyle returns null.
Data points in a series can have their own style settings. Settings made with SetDataStyle set the style of individual data points and override series settings.
The graph stores style information for properties that do not apply to the current graph type. For example, you can set the fill pattern in a two-dimensional line graph or the line style in a bar graph, but that fill pattern or line style will not be visible.
You can specify the appearance of a series in the graph before the application draws the graph. To do so:
PowerBuilder Define a user event for pbm_dwngraphcreate and call SetSeriesStyle in the script for that event. The event pbm_dwngraphcreate is triggered just before a graph is created in a DataWindow object.
Web ActiveX Call any of the SetSeriesStyle methods in the onGraphCreate event.
PowerBuilder This statement sets the line style and width for the series named Costs in the graph gr_product_data in the DataWindow dw_prod:
dw_prod.SetSeriesStyle("gr_product_data", "Costs", &
Dot!, 5)
Specifies the fill pattern for data markers in a series.
PowerBuilder DataWindow DataWindow control
DataWindow Web ActiveX DataWindow control
integer dwcontrol.SetSeriesStyle ( string graphcontrol, string seriesname, FillPattern fillvalue )
number dwcontrol.SetSeriesStyleFill ( string graphcontrol, string seriesname, number fillvalue )
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 in which you want to set the appearance. |
fillvalue |
A value of the FillPattern enumerated datatype (PowerBuilder) or an integer (Web ActiveX) specifying the fill pattern for the series. For a list of values, see FillPattern. |
Returns 1 if it succeeds and -1 if an error occurs. If any argument’s value is null, SetSeriesStyle returns null.
Data points in a series can have their own style settings. Settings made with SetDataStyle set the style of individual data points and override series settings.
The graph stores style information for properties that do not apply to the current graph type. For example, you can set the fill pattern in a two-dimensional line graph or the line style in a bar graph, but that fill pattern or line style will not be visible.
You can specify the appearance of a series in the graph before the application draws the graph. To do so:
PowerBuilder Define a user event for pbm_dwngraphcreate and call SetSeriesStyle in the script for that event. The event pbm_dwngraphcreate is triggered just before a graph is created in a DataWindow object.
Web ActiveX Call any of the SetSeriesStyle methods in the onGraphCreate event.
PowerBuilder This statement sets the fill pattern used for the series named Costs in the graph gr_computers in the DataWindow control dw_equipment to Horizontal:
dw_equipment.SetSeriesStyle("gr_computers", &
"Costs", Horizontal!)
Specifies the symbol for data markers in a series.
PowerBuilder DataWindow DataWindow control
DataWindow Web ActiveX DataWindow control
integer dwcontrol.SetSeriesStyle ( string graphcontrol, string seriesname, grSymbolType symbolvalue )
number dwcontrol.SetSeriesStyleSymbol ( string graphcontrol, string seriesname, number symbolvalue )
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 in which you want to set the appearance. |
symbolvalue |
A value of the grSymbolType enumerated datatype (PowerBuilder) or an integer (Web ActiveX) specifying the symbol for the series. For a list of values, see grSymbolType. |
Returns 1 if it succeeds and -1 if an error occurs. If any argument’s value is null, SetSeriesStyle returns null.
Data points in a series can have their own style settings. Settings made with SetDataStyle set the style of individual data points and override series settings.
The graph stores style information for properties that do not apply to the current graph type. For example, you can set the fill pattern in a two-dimensional line graph or the line style in a bar graph, but that fill pattern or line style will not be visible.
You can specify the appearance of a series in the graph before the application draws the graph. To do so:
PowerBuilder Define a user event for pbm_dwngraphcreate and call SetSeriesStyle in the script for that event. The event pbm_dwngraphcreate is triggered just before a graph is created in a DataWindow object.
Web ActiveX Call any of the SetSeriesStyle methods in the onGraphCreate event.
Using SetSeriesStyle with DirectX 3D Graphs You cannot specify specific symbols for the data markers in a series.
PowerBuilder This statement sets the symbol for the series named Costs in the graph gr_computers in the DataWindow control dw_equipment to X:
dw_equipment.SetSeriesStyle("gr_computers", &
"Costs", SymbolX!)
Specifies whether a series is an overlay, meaning that the series is represented by a line on top of another graph type.
PowerBuilder DataWindow DataWindow control
DataWindow Web ActiveX DataWindow control
integer dwcontrol.SetSeriesStyle ( string graphcontrol, string series, boolean overlaystyle )
number dwcontrol.SetSeriesStyleOverlay ( string graphcontrol, string series, boolean overlaystyle )
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. |
series |
A string (PowerBuilder) or integer (Web ActiveX) whose value is the name of the series whose overlay status you want to change. |
overlaystyle |
A boolean value indicating whether you want the series to be an overlay, meaning that the series is shown in front as a line. Set overlaystyle to true to make the specified series an overlay. Set it to false to remove the overlay setting. |
Returns 1 if it succeeds and -1 if an error occurs. If any argument’s value is null, SetSeriesStyle returns null.
You can specify the appearance of a series in the graph before the application draws the graph. To do so:
PowerBuilder Define a user event for pbm_dwngraphcreate and call SetSeriesStyle in the script for that event. The event pbm_dwngraphcreate is triggered just before a graph is created in a DataWindow object.
Web ActiveX Call any of the SetSeriesStyle methods in the onGraphCreate event.
PowerBuilder These statements in the Clicked event of the DataWindow control dw_employees store the style of the series under the pointer in the graph gr_depts in the variable style_type. If the style of the series is overlay (true), the script changes the style to normal (false):
string SeriesName
integer SeriesNbr, Data_Point
boolean overlay_style
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, overlay_style)
IF overlay_style THEN &
dw_employees.SetSeriesStyle("gr_depts", &
SeriesName, false)
END IF