GRAPH.Element |
nStatus = GRAPH.Element( BYVAL nControl AS INTEGER, BYVAL element AS INTEGER, BYVAL width AS INTEGER, [BYVAL line AS INTEGER = 1], [BYVAL symbol AS INTEGER = 0], [BYVAL color AS INTEGER = CR_Default] ) AS INTEGER
nProperty = GRAPH.Element( BYVAL nControl AS INTEGER, BYVAL element AS INTEGER BYVAL property AS INTEGER ) AS INTEGER
nElements = GRAPH.Element( BYVAL nControl AS INTEGER ) AS INTEGER
Sets or returns properties of the specified element. If the element number is omitted or is set to 0, the current number of elements in the graph is returned. If both width and symbol are 0 then the element is hidden. Note; Element numbers always starts at 1. The OPTION BASE doesn't affect the element numbering.
The following CONSTs are defined in MyBASIC2_Graph.BIS
Line Types NG_None = 0 No Grid NG_Solid = 1 Solid Line NG_Dashed = 2 Dashed Line NG_Dotted = 3 Dotted Line NG_DashDot = 4 Dashed Dotted Line NG_DashDotDot = 5 Dashed Dotted Line
Symbol Types NG_None = 0 No Symbol NG_Dot = 1 Dots NG_Rectangle = 2 Rectangles NG_Diamond = 3 Diamonds NG_Asterisk = 4 Asterisk NG_DTriangle = 5 Down Triangles NG_UTriangle = 6 Up Triangles NG_LTriangle = 7 Left Triangle NG_RTriangle = 8 Right Triangles
Colors CR_Default = 0xFF000000
Return Properties NG_LineType = -1 NG_LineWidth = -2 NG_SymbolType = -3 NG_Name = -4
Example:
nElement = GRAPH.AddElement( nControl, data_x, data_y ) GRAPH.Element( nControl, nElement, 1, NG_Solid, NG_Asterisk, RGB( 200, 128, 0 ) ) . . .
' Hide all the elements FOR i = 1 TO GRAPH.Element( nControl ) GRAPH.Element( nControl, i, NG_Hide ) ENDFOR
|