Elem

Declaration: ChartBook.Tables[].Elem [ACol, ARow: longint]: ShortString;
The array property Elem contains the strings of the table. The parameters ACol and ARow specify the number of the column and row to be read or written (valid range 0..NrOfColumns, and 1..NrOfRows, respectively). If ACol and/or ARow is outside the range of the string array, the array is left unchanged in case of writing to the array, or the returned value is an empty string when reading from the array.

The column 0 is invisible and can be used to store additional hidden information for each row of the table.

Sample
program:
The following sample code displays a number of data points both as a diagram and a table:
program ChartsTablesMemos;

const
  NData = 30;  // number of data points

var
  i         : integer;
  x, v      : double;

begin
ChartBook.Reset;
ChartBook.Configure (1,true,true,true,200,300);
ChartBook.Tables[1].CommonHeader := 'Table of Sines';
ChartBook.Tables[1].NrOfColumns := 2;
ChartBook.Tables[1].NrOfRows := NData;
ChartBook.Tables[1].Header[1] := 'Argument';
ChartBook.Tables[1].Header[2] := 'sin(x)';
with ChartBook.Charts[1] do
  begin
  MoveTo (0,0);
  for i:=1 to NData do
    begin
    x := 0.3*i;
    v := sin(x);
    DrawTo (x,v);
    MarkAt (x,v,26);
    ChartBook.Tables[1].Elem[1,i] := strff(x,1,2);
    ChartBook.Tables[1].Elem[2,i] := strff(v,1,4);
    end;
  AutoRange(0,2);
  Update;
  end;
ChartBook.Tables[1].FitAllColWidths (2, true, 4, 100, 1);
ChartBook.Memos[1].Text := 'This examples shows how to '+
            'display a set of data points both as a '+
            'graph and in tabular form.';
ChartBook.Memos[1].Scrollbars := ssVertical;
ChartBook.Memos[1].WordWrap := true;
ChartBook.Memos[1].Color := $CCFFEE;
end.