Roadmap Tutorial API's: XYGraph Axes etc Series Stats

TxyGraph Series

The TSeries object encapsulates data and appearance settings for each series of the graph. Series are created on the fly as required. TSeries is a descendant of TDataSeries, from which it inherits many properties and methods.

Data is maintained internally in a linked list of points, sorted by x value. Each point has an associated index which does not change for the lifetime of the point, and x,y value, and an r value (see statistics below).

There are several properties for accessing the data: ValueAt, AllPoints, PointCount, which are all x value based, and PointbyIndex which is based on the index

These properties generally use the following methods, which are also available: Add, AddPointSeries, AddPoints, GetValue, GetPoint, DeleteValue, DeletePoint. In addition, sequential access to the list is available using the following routines: GetFirstPoint, GetNextPoint, UpdateCurrentPoint, DeleteCurrentPoint

Statistical analyses and regression are only available if the conditional define STATISTICS is turned on in the code. This conditional define does not affect published properties. The conditional define is present to remove the stats routines from the compiled code.

There is a theoretical limit on the number of points in a series of 2,147,483,647 points, but since this is >40,000 Mb of data, it's probably not a problem. Effectively then, the only limit on the amount of data is available memory. Each point takes 22 bytes of memory. Spline and DWLS regression require additional memory, 22 x RegControl2 bytes. Passing/Bablok regression can require exorbitant amounts of memory 8 x (number of points)^2 + more.

Internal maintenance

Drawing

All the properties from here on are shared with TDataSeries

To use TDataSeries, add xydata to the programs uses clause, and create it like so:

dataseries1 := TDataSeries.create(nil);

use it as you would use a series in a TxyGraph. When you have finished with it, call dataseries1.free;

General Admin

Data Manipulation

pgPoint = ^tgPoint;
tgPoint = record
   i: longint;
   xv, yv, rv: Double;
   next: pgPoint;
end;

Filing Procedures

Stats

The following properties are only available if STATISTICS is defined

See Statistics for further information

Memory protection

Hooks

see Hooking for further info

Data Acquisition

(see tutorial 2 for further info)