Syntax 1 For
setting a data point’s colors
Description
Specifies the colors of a data point in a graph.
Applies to
PowerBuilder DataWindow
DataWindow control
Syntax
PowerBuilder
|
1 |
integer dwcontrol.SetDataStyle ( string graphcontrol, integer seriesnumber, integer datapointnumber, grColorType colortype, long color ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to the DataWindow control containing |
|
graphcontrol |
A string whose value is the name of the graph in |
|
seriesnumber |
The number of the series in which you want to set |
|
datapointnumber |
The number of the data point for which you want to |
|
colortype |
A value of the grColorType enumerated datatype (in For a list of values, see |
|
color |
A long whose value is the new color for |
Return value
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.
To reset the color of individual points back to the series color,
call ResetDataColors.
You can specify the appearance of a data point in the graph before
the application 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 can only set the color for the foreground. Background, line
color, and shade are not supported.
Examples
PowerBuilder
These statements set the text (foreground) color to black for data
point 6 in the series named Salary in the graph gr_depts in the
DataWindow control dw_employees:
|
1 2 3 4 5 6 7 8 9 |
integer SeriesNbr // Get the number of the series SeriesNbr = & dw_employees.FindSeries("gr_depts" , "Salary") // Set the background color dw_employees.SetDataStyle("gr_depts" , SeriesNbr, & 6, Background!, 0) |
See also