TiPlotChannelCustom.AddXYArrays

TiPlotChannelCustom

procedure AddXYArrays(XData: Variant; YData : Variant);

Description

Adds data to a channel from two variant arrays, each containing x and y values (synchronous addition). The number of elements in each array must be identical (i.e. if XData contains 100 elements, YData must contain 100 elements), otherwise an exception will be generated.

This procedure is able to handle variant arrays that start at element 0 or any value that you require. If you array starts at element XData[10], then that value will be used to add the first data point.

Note: it is recommended that you loop through your array and use the AddXY method to add data to the chart as that is much faster than using the AddXYArrays procedure due to the use of Variants. This procedure has been added as a convenient way of passing arrays to the channel to add data, but is slower than simply looping through the array in your program.

Note: If your data is already in Variant array format (i.e. not a double array), then there is no performance penalty by using the AddXYArrays procedure.

Example

Delphi

iComponent.Channel[0].AddXYArrays(XDataArray, YDataArray);

C++ Builder

iComponent->Channel[0]->AddXYArrays(XDataArray, YDataArray);

Contents | Index | Previous | Next