Low pass filter on TLineSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Lenfors
Newbie
Newbie
Posts: 49
Joined: Thu Sep 20, 2007 12:00 am

Low pass filter on TLineSeries

Post by Lenfors » Tue Apr 14, 2009 6:57 pm

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

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Apr 15, 2009 9:54 am

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;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Lenfors
Newbie
Newbie
Posts: 49
Joined: Thu Sep 20, 2007 12:00 am

Post by Lenfors » Wed Apr 15, 2009 10:14 am

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

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Apr 15, 2009 11:05 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Apr 15, 2009 11:29 am

Hi Mikael,

In addition, if you meant FFT (Fast Fourier Transform), maybe you will be interested in testing MtxVec that is compatible with TeeChart.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

dave novo
Newbie
Newbie
Posts: 25
Joined: Tue Oct 23, 2007 12:00 am

Post by dave novo » Fri May 01, 2009 9:58 am

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.

Post Reply