Visit Gigasoft's Web Site
 ProEssentials v9 Help

XData

Scope

Pego, Pesgo, Pepso, Pe3do, Pepco

Type

Single

Default

empty

.NET

PeData.X

Ocx|Vcl

XData

DLL

PEP_faXDATA

 

Purpose

This property is used to transfer data into the object. The format of the data is defined by the SubsetByPoint property.

 

Comments

PeData.X members of Pego.PeData, Pesgo.PeData, Pepso.PeData, Pe3do.PeData, Pepco.PeData

 

The Scientific Graph and 3D Scientific Graph Objects use XData to identify the data measured against the x axis of the object. If implementing a Scientific Graph and greater precision is needed, set UsingXDataII to TRUE and use XDataII instead of this property.

 

The Polar/Smith Object uses XData to identify the degree in degrees (0-360).

 

The Pie Chart Object uses XData to identify values to be assigned to pie slices. The Pie Chart Object will determine the percentages to be used as slice labels.

 

The Graph Object only uses XData in conjunction with DateTimeMode.

 

When used with PEvget, the destination buffer must be large enough to hold all of the information. For property arrays, calling PEvget with lpDest equal to NULL will return the number of bytes needed to hold the data.

 

See Also: ScaleForXData, YData, ZData.

 

Refer to the example 100 for more information on the use of this property.

 

Note these examples only pass x data, you also need to pass ydata.

 

WinForm VB.NET Example

'** For a Scientific Graph Object placed into a form **'

Pesgo1.PeData.Subsets = 4

Pesgo1.PeData.Points = 20

 

'** make some random data **'

For s = 0 To 3

  For p = 0 To 19

    Pesgo1.PeData.X(s, p) = (p + 1) * 5 + (Rnd * (25))

  Next p

Next s

Pesgo1.PeFunction.ReinitializeResetImage

 

OCX Example

'** For a Scientific Graph Object placed into a form **'

PESGraph1.Subsets = 4

PESGraph1.Points = 20

 

' ** make some random data **'

For s = 0 To 3

  For p = 0 To 19

    PESGraph1.XData(s, p) = (p + 1) * 5 + (Rnd * (25))

  Next p

Next s

PESGraph1.PEactions = 0 resets the object

 

VCL Example

{ ** For a Scientific Graph Object placed into a form **}

PESGraph1.Subsets := 4;

PESGraph1.Points := 20;

 

{ ** make some random data **}

for s := 0 to 3 do

  for p := 0 To 19 do

    PESGraph1.XData[s, p] := (p + 1) * 5 + (Random * (25));

 

PESGraph1.PEactions := sgReinitAndReset; {resets the object}

 

C / C++ Example

hWndPE = PEcreate (PECONTROL_SGRAPH, WS_VISIBLE, &rect, hWnd, 1);

PEnset (hWndPE, PEP_nSUBSETS, 4); /* Object has 4 subsets */

PEnset (hWndPE, PEP_nPOINTS, 20); /* Object has 20 points */

 

float fData[4][20]; /* first place data into fData */

/* set data, 4 subsets * 20 points = 80 elements */

PEvset (hWndPE, PEP_faXDATA, fData, 80);

 

PEreinitialize(hWndPE);

PEresetimage(hWndPE, 0, 0);