Page 1 of 1

Assigning array to TChartValueList

Posted: Tue Oct 07, 2008 10:26 pm
by 9245460
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

Posted: Wed Oct 08, 2008 8:22 am
by narcis
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.