Assigning array to TChartValueList

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
PoLabs
Newbie
Newbie
Posts: 28
Joined: Wed Jun 06, 2007 12:00 am

Assigning array to TChartValueList

Post by PoLabs » Tue Oct 07, 2008 10:26 pm

Dear Sir,

I have problem using TFastLineSeries. I need to do fast drawings as it is possible. In TeeChart help I found those lines of codes:

This property stores values into an internal dynamic array that can be assigned directly for advanced uses that need full speed when adding or modifying points.

var MyArray : Array of Double;
....
(initialize and fill the array with values)
...
Series1.YValues.Count := 1000;
Series1.YValues.Value := MyArray;
Series1.YValues.Modified:=True;


Ok so I did this. I set array for YValues and XValues as is:
srMain.YValues.Value := Buffer;
srMain.YValues.Modified := true;
srMain.XValues.Value := XAX;
srMain.XValues.Modified := true;


but i cannot repaint this... i tried to use srMain.repaint or Chart1.repaitn...

What am I doing wrong?

thank you in advance,

best regards,
Aljosa

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Oct 08, 2008 8:22 am

Hi Aljosa,

Yes, this should work fine. You should do it exactly as shown in the Real-time Charting article available here. Code in the article works fine for me here.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply