Visit Gigasoft's Web Site
 ProEssentials v10 Help

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.

 

ProEssentials has no physical upper limit of data but there are pratical iimits based on chart type and rendering engine:

  • 2D general charting and RenderEngine = Direct2D, best if data is 250K or less    
  • 2D Line Charts and RenderEngine = Direct3D and ComputeShader = true, Filter2D3D = true,. best if data is 500M or less. 
  • 3D Surface Charts and 2D Contours/HeatMaps, 6000 x 6000 or 36M vertices. To handle larger amounts, keeping the ui snappy, plot every other point.  

Optionally there is no need to transfer data to ProEssentials.  Data can be referenced via YDataPtr

 

WinForm / Wpf Interfaces

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

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

This example 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, this example set the 5th row, 15th column. Transferring data into a graph is a simple process of filling the appropriate two-dimensional property array.  Note for larger amounts of data, we recommend our PeData.Y.FastCopy methods. 

 

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.