TiPlotComponent.AddDataArray

TiPlotComponent See Also

Adds data to all channels by passing the channel data as an array to the main plot interface.

procedure AddDataArray(XValue: Double; Data : Variant);

Description

Adds data to all channels (synchronous addition). The way data is added depends on the dimension of the Data passed.

One Dimensional Array

The XValue passed is a fixed X Position for all values added. The Array contains Y Coordinates for each channel.

The array is formatted as (Channel) where there is the same number of elements as channels in the chart.

Two Dimensional Array

The XValue passed is a relative spacing value relative to each previous data point for each channel(first data point in the array is relative to the previously added x data point and the second is relative to the first data point in the array). If the previous X coordinate in the chart is 10 and the XValue is 5, then the X Coordinate for the first data in the array would be 15, the second 20, the third 25,etc. Each channel is independent.

The array is formatted as (Channel, YData Point). The first dimension must be the same size as the number of channels in the chart. The second dimension contains the Y Data Points.

Null and Empty Data Points

Two special Y-Values are set aside to represent null and empty data points. If the Y Data Point value in the second dimension array is 5E-301, then that data point is interpreted to be a Null Data Point. If the Y-Data Point value is 5E-302 then the data point is interpreted to be an Empty Data Point.

Example

Delphi

//Add 1 dimensional Array to Chart at X Value 10

iComponent.AddDataArray(10, Array);

//Add 2 dimensional Array to Chart spaced 5 units apart

iComponent.AddDataArray(5, Array);

C++ Builder

//Add Array to Chart at X Value 10

iComponent->AddDataArray(10, Array);

//Add 2 dimensional Array to Chart spaced 5 units apart

iComponent->AddDataArray(5, Array);

Contents | Index | Previous | Next