Syntax 5 For creating an overlay in a graph
Description
Specifies whether a series is an overlay, meaning that the
series is represented by a line on top of another graph type.
Controls
PowerBuilder DataWindow DataWindow
control
DataWindow Web ActiveX DataWindow
control
Syntax
[PowerBuilder]
|
1 |
integer <span>dwcontrol</span>.<span>SetSeriesStyle</span> ( string <span>graphcontrol</span>, string <span>series</span>, boolean <span>overlaystyle</span> ) |
[Web ActiveX]
|
1 |
number <span>dwcontrol</span>.<span>SetSeriesStyleOverlay</span> ( string <span>graphcontrol</span>, string <span>series</span>, boolean <span>overlaystyle</span> ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to the DataWindow control |
|
graphcontrol |
A string whose value is the name of the |
|
series |
A string (PowerBuilder) or integer (Web |
|
overlaystyle |
A boolean value indicating whether you |
Return Values
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, SetSeriesStyle returns
null.
Usage
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 use the overlay style for a series.
Examples
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):
|
1 |
string SeriesName |
|
1 |
integer SeriesNbr, Data_Point |
|
1 |
boolean overlay_style |
|
1 |
grObjectType MouseHit |
|
1 |
|
1 |
MouseHit = dw_employees.ObjectAtPointer( & |
|
1 |
"gr_depts", SeriesNbr, Data_Point) |
|
1 |
|
1 |
IF MouseHit = TypeSeries! THEN |
|
1 |
SeriesName = & |
|
1 |
 dw_employees.SeriesName("gr_depts",SeriesNbr) |
|
1 |
|
1 |
dw_employees.GetSeriesStyle("gr_depts", & |
|
1 |
SeriesName, overlay_style) |
|
1 |
|
1 |
IF overlay_style THEN & |
|
1 |
dw_employees.<span>SetSeriesStyle</span>("gr_depts", & |
|
1 |
SeriesName, false) |
|
1 |
END IF |