Syntax 1 For the colors of a data point

Description

Obtains the colors associated with a data point in a graph.

Applies to

PowerBuilder DataWindow

DataWindow control

Syntax

PowerBuilder

integer dwcontrol.GetDataStyle ( string graphcontrol, integer seriesnumber, integer datapointnumber, grColorType colortype, REF long colorvariable )

Argument

Description

dwcontrol

A reference to the DataWindow control containing the graph.

graphcontrol

A string whose value is the name of the graph in the DataWindow control.

seriesnumber

The number of the series in which you want the color of a data point.

datapointnumber

The number of the data point for which you want the color.

colortype

A value of the grColorType enumerated datatype (in PowerBuilder) or an integer (in JavaScript) specifying the aspect of the data point for which you want the color.

For a list of values, see grColorType.

colorvariable

In PowerBuilder, a long variable in which you want to store the color.


Return value

Returns 1 if it succeeds and -1 if an error occurs. In PowerBuilder, GetDataStyle stores an RGB color value in colorvariable. If any argument's value is null, GetDataStyle returns null.

Examples

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:

long color_nbr
integer SeriesNbr
 
// Get the number of the series
SeriesNbr = &
      FindSeries("gr_emp_data", sle_series.Text)
 
// Get the color
dw_emp_data.GetDataStyle("gr_emp_data", &
      SeriesNbr, 6, Background!, color_nbr)

See also

FindSeries

GetSeriesStyle

SetDataStyle

SetSeriesStyle