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.
Applies to
PowerBuilder DataWindow
DataWindow control
Syntax
PowerBuilder
|
1 |
integer dwcontrol.SetSeriesStyle ( string graphcontrol, string series, boolean overlaystyle ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to the DataWindow control containing |
|
graphcontrol |
A string whose value is the name of the graph in |
|
series |
A string whose value is the name of the series |
|
overlaystyle |
A boolean value indicating whether you want the |
Return value
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, 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.
Using SetSeriesStyle with DirectX 3D Graphs
You cannot use the overlay style for a series.
Examples
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):
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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 |
See also