Syntax 3: For the fill pattern and symbol of a data point
Description
Specifies the fill pattern and symbol for a data point in a
graph.
Applies to
Graph controls in windows and user objects, and graphs in
DataWindow controls
Syntax
|
1 |
controlname.SetDataStyle ( { graphcontrol, } seriesnumber, datapointnumber, enumvalue ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the graph in which you want to set the |
|
graphcontrol (DataWindow control only) (optional) |
A string whose value is the name of the graph in the |
|
seriesnumber |
The number of the series in which you want to set the |
|
datapointnumber |
The number of the data point for which you want to set |
|
enumvalue |
An enumerated datatype specifying the appearance setting To change the fill pattern, use a FillPattern Bdiagonal! — Lines from lower left to upper Diamond! Fdiagonal! — Lines from upper left to lower Horizontal! Solid! Square! Vertical! To change the symbol type, use a grSymbolType NoSymbol! SymbolHollowBox! SymbolX! SymbolStar! SymbolHollowUpArrow! SymbolHollowCircle! SymbolHollowDiamond! SymbolSolidDownArrow! SymbolSolidUpArrow! SymbolSolidCircle! SymbolSolidDiamond! SymbolPlus! SymbolHollowDownArrow! SymbolSolidBox! |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, SetDataStyle returns null.
Usage
To change the appearance of a series, use SetSeriesStyle. The
settings you make for the series are the defaults for all data points in
the series.
For a graph in a DataWindow, you can specify the appearance of a
data point in the graph before PowerBuilder draws the graph. To do so,
define a user event for pbm_dwngraphcreate and call SetDataStyle in the
script for that event. The event pbm_dwngraphcreate is triggered just
before a graph is created in a DataWindow object.
Using SetDataStyle with DirectX 3D Graphs
You cannot use a fill pattern or specify specific symbols for
the data point.
Examples
This example checks the fill pattern used for data point 10 in the
series named Costs in the graph gr_product_data. If it is diamond, then
SetDataStyle changes it to solid:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
integer SeriesNbr FillPattern data_pattern // Get the number of the series SeriesNbr = gr_product_data.FindSeries("Costs") // Get the current fill pattern gr_product_data.GetDataStyle(SeriesNbr, 10, & data_pattern) // If the pattern is diamond, change it to solid IF data_pattern = Diamond! THEN & gr_product_data.SetDataStyle(SeriesNbr, & 10, Solid!) |
See also