Syntax 1 For the colors of a data point
Description
Obtains the colors associated with a data point in a graph.
Controls
Graph controls in windows and user objects, and graphs in
DataWindow controls
Syntax
|
1 |
<span>controlname</span>.<span>GetDataStyle </span>( { <span>graphcontrol</span>, } <span>seriesnumber</span>,<br> <span>datapointnumber</span>, <span>colortype</span>, <span>colorvariable</span> ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the graph for which you want |
|
graphcontrol |
(Optional) When controlname is |
|
seriesnumber |
The number of the series in which you |
|
datapointnumber |
The number of the data point for which |
|
colortype |
A value of the grColorType enumerated
|
|
colorvariable |
A long variable in which you want to |
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs. Stores a color value in colorvariable.
If any argument’s value is null, GetDataStyle returns null.
Examples
This example gets the text (foreground) color used
for data point 6 in the series named Salary in the graph gr_emp_data.
It stores the color value in the variable color_nbr:
|
1 |
long color_nbr |
|
1 |
integer SeriesNbr |
|
1 |
|
1 |
// Get the number of the series |
|
1 |
SeriesNbr = gr_emp_data.FindSeries("Salary") |
|
1 |
|
1 |
// Get the color |
|
1 |
gr_emp_data.<span>GetDataStyle</span>(SeriesNbr, 6, & |
|
1 |
Foreground!, color_nbr) |
This example gets the background color used for data
point 6 in the series entered in the SingleLineEdit sle_series in
the DataWindow graph gr_emp_data.
It stores the color value in the variable color_nbr:
|
1 |
long color_nbr |
|
1 |
integer SeriesNbr |
|
1 |
|
1 |
// Get the number of the series |
|
1 |
SeriesNbr = FindSeries("gr_emp_data", sle_series.Text) |
|
1 |
// Get the color |
|
1 |
dw_emp_data.<span>GetDataStyle</span>("gr_emp_data", & |
|
1 |
SeriesNbr, 6, Background!, color_nbr) |