Page 1 of 1

Low pass filter on TLineSeries

Posted: Tue Apr 14, 2009 6:57 pm
by 10546756
Hello!

Are there any low pass filters available in TChart?

We use TLineSeries with several thousand values on them. There are a lot of disturbances in the data and it is almost unusable without filtering.
If we use an analysis program to look at the data it look fine, but we would like to do it directly in TChart.

Regards, Mikael

Posted: Wed Apr 15, 2009 9:54 am
by yeray
Hi Mikael,

I'm afraid that you should use your custom filter. And you have different ways to do this. One could be adding filtering your data before adding the points to your series to only add the relevant points. And another could be adding your filter at OnAfterAdd series' event. something like following:

Code: Select all

procedure TForm1.Series1AfterAdd(Sender: TChartSeries;
  ValueIndex: Integer);
begin
  if ((Series1.YValue[ValueIndex] < 50) or (Series1.YValue[ValueIndex] > 450)) then
    Series1.Delete(ValueIndex);
end;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Series1.Clear;

  for i:=0 to 50 do
    Series1.Add(random*500);
end;

Posted: Wed Apr 15, 2009 10:14 am
by 10546756
Ok, thanks.

It's not how to apply the filter that's my issue. It's the filter itself. I would like to apply some kind of FTT filter and need code for this.

Regards, Mikael

Posted: Wed Apr 15, 2009 11:05 am
by yeray
Hi Mikael,

Could you please give us some info or some links where we could find explanations of what exactly this filter is used for? Maybe it would be an interesting new feature for a future release.

Thanks in advance.

Posted: Wed Apr 15, 2009 11:29 am
by yeray
Hi Mikael,

In addition, if you meant FFT (Fast Fourier Transform), maybe you will be interested in testing MtxVec that is compatible with TeeChart.

Posted: Fri May 01, 2009 9:58 am
by 10047094
Hello,

For my 2 cents, please do not waste time supporting filters natively in TChart. There are dozens of implementations of FFT on the web, both free and for sale. Numerical Recipes in Pascal has a version. IMHO I would rather you guys concentrated on charting than implementing tools that are available in dozens of other ways.