ProEssentials v9 Help .Net Reference

# Common Question 5

## How do I get data into the graph, and how much can it hold?

Graph Objects need to use YData and commonly PointLabels.

Scientific Graph and Polar/Smith Objects need to use XData and YData, and ZData for 2D contours and bubble charts.

3D Scientific Graphs use XData, YData, and ZData.

Note the 3D Bar Chart Mode only requires YData.

Pie Chart Objects use XData to control slice thickness and optionally YData to control exploding slices. PointLabels will label the slices.

Within the demo, example 000 shows simple code to create a chart.

Pro version

The Pro version has no physical upper limit but a practical one of 5 million data points (we never tried it, let us know.) Though we do frequently hear of customers putting 1 million points into their charts.

Standard version

The Standard version is limited to 8000 data points.  This is per instance of a control.  For example, if you need 4 lines ( subsets ) in a chart, each line would be limited to 2000 points each.

WinForm / WebForm Interfaces

The WinForm/WebForm interfaces support two-dimensional property arrays where you supply the subset and point index along with the value assigned to that location. For example:

• VB.NET  Pego1.PeData.Y(4, 14) = 234.45

• C#.NET  Pego1.PeData.Y[4, 14] = 234.45;

These examples set the 5th subset, 15th point to the data value 234.45. The indices are zero based. If you are more familiar with the concept of rows and columns, these examples set the 5th row, 15th column to 234.45. Transferring data into a graph is a simple process of filling the appropriate two-dimensional property array.

### OCX/VCL Interfaces

The OCX and VCL interfaces support two-dimensional property arrays where you supply the subset and point index along with the value assigned to that location. For example:

• VB/OCX example: Pego1.YData(4, 14) = 234.45

• Delphi VCL example: PEGraph1.YData[4, 14] := 234.45;

These examples set the 5th subset, 15th point to the data value 234.45. The indices are zero based. If you are more familiar with the concept of rows and columns, these examples set the 5th row, 15th column to 234.45. Transferring data into a graph is a simple process of filling the appropriate two-dimensional property array.

### DLL Functions

There are a few DLL functions designed to transfer data into a graph.

• PEvset  Passes an entire property array with one call.

• PEvsetEx  Passes a partial chunk of a property array with one call.

• PEvsetcell  Passes an individual data element given a single one-dimensional index.

• PEvsetcellEx  Passes an individual data element given a subset and point index.

All of these functions work with pointers to your data, or in other words, passing the data by reference. The "v" in the function name stands for void. Thus, these functions work with any property type, single, double, double-word, or null-terminated string. Be sure to pass a pointer or reference to the type of variable expected by the call. Different properties require pointers to different types of variables.

PEvset is by-far the fastest method of transferring data into a graph.

For help finding DLL features, use the Contents Tab at the top-left location within this help system, near the bottom, click Reference, and then Alphabetic Listing.