GRAPH.Color

Previous  Next

 

nStatus = GRAPH.Color( BYVAL nControl AS INTEGER,

                       BYVAL type     AS INTEGER,

                       BYVAL element  AS INTEGER,

                       BYVAL color    AS INTEGER ) AS INTEGER

 


 

Sets or returns the color of the specified graph element.  If last parameters is omitted, then the function will return the current value.

 

The following CONSTs are defined in MyBASIC2_Graph.BIS

 

NG_Graph     = 0    Graph Area

NG_Plot      = 1    Plot Area

NG_Axis      = 2    Axis

NG_Grid      = 3    Grid

NG_Labels    = 4    Labels

NG_Cursor    = 5    Cursor

NG_Line      = 6    Element Line

NG_Symbol    = 7    Element Symbol

 

Example:

 

GRAPH.Color( nControl, NG_Plot, 0, RGB( 255, 255, 255 ) )

GRAPH.Color( nControl, NG_Axis, NG_Axis_1, RGB( 0, 0, 0 ) )

GRAPH.Color( nControl, NG_Axis, NG_Axis_2, RGB( 0, 0, 0 ) )

 

' Sets element line 1,2 and 3 to Red, Green and Blue

GRAPH.Color( nControl, NG_Line, 1, RGB( 255, 0, 0 ) )

GRAPH.Color( nControl, NG_Line, 2, RGB( 0, 255, 0 ) )

GRAPH.Color( nControl, NG_Line, 3, RGB( 0, 0, 255 ) )