How do I manually add points to a TeeChart in QRDesign?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bpetty
Newbie
Newbie
Posts: 7
Joined: Fri Jan 20, 2006 12:00 am
Location: Texas
Contact:

How do I manually add points to a TeeChart in QRDesign?

Post by bpetty » Wed Feb 01, 2006 10:15 pm

My data is stored in a Blob in a Paradox database so I don't think I could easily use the Data Aware method of drawing curves. How do I access the Chart pointer within QRDesign to be able to add to the series? Or is there a better way?

Thank you in advance for your help.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Feb 13, 2006 3:55 pm

Hi,

you can use a regular stream to save/load the chart.
Here is an example how you can save/load Chart to/from a BLOB field (an
example is for ADOTable):

Code: Select all

Uses ..., TeeStore;
var tmp: TStream;
begin
    { ...}
    ADOTable1.Append;
    tmp :=

ADOTable1.CreateBlobStream(Table1.FieldByName('BlobFieldName'),bmWrite);
    try
        SaveChartToStream(Chart1,tmp);
    finally
        tmpStream.Free;
    end;

Similarly you can load chart from blob field :

var tmp: TStream;
begin
{ ...}
tmp :=

ADOTable1.CreateBlobStream(Table1.FieldByName('BlobFieldName'),bmRead);
try
    LoadChartFromStream(Chart1,tmp);
finally
    tmpStream.Free;
end;

Post Reply