Page 1 of 1
How do I manually add points to a TeeChart in QRDesign?
Posted: Wed Feb 01, 2006 10:15 pm
by 9345040
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.
Posted: Mon Feb 13, 2006 3:55 pm
by Pep
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;