[Lazarus] How to create a chart in code?
Sven Barth
pascaldragon at googlemail.com
Sat Jul 2 16:53:23 CEST 2011
On 02.07.2011 16:22, Florian Klämpfl wrote:
> Am 02.07.2011 16:18, schrieb Alexander Klenin:
>> 2011/7/3 Felipe Monteiro de Carvalho<felipemonteiro.carvalho at gmail.com>:
>>> Ok, I found the answer myself =)
>>>
>>> I should use TChart.AddSeries to add the series not TChart.Series.Lists.Add...
>>
>> Yes. Unfortunately, FPList does not support any notification mechanism,
>> and its Add method is not virtual.
>>
>
> Use TList then. The idea of TFPList to have a simple and fast list.
This is even mentioned in the book "The Tomes of Delphi - Algorithms and
Data Structures". "TList" used to be very fast until Borland introduced
the notification mechanism (I don't remember which version of Delphi it
was).
So if you don't need notifications, but prefer performance you should
use something else like FPC's "TFPList" (or "TFPObjectList"). If you
need the notification mechanism then you use "TList" (or "TObjectList"),
but you'll have a performance impact.
As a sidenote: FPC's "TList" is implemented using a "TFPList" internally.
Regards,
Sven
More information about the Lazarus
mailing list