If I understood right setting the smoothed property of a lineseries to true should smooth the line series.
What can be the reason if this does not happen in my case?
What can be the reason for smooth not working
Re: What can be the reason for smooth not working
Hello,
It seems to work fine for me here in RAD XE7 and TeeChart Pro v2015.14.
I've dropped a TChart in a new "Multi-Device Application - Delphi" and using this code I see the series has 1000 points at the start, and 601 after pressing the button.
It seems to work fine for me here in RAD XE7 and TeeChart Pro v2015.14.
I've dropped a TChart in a new "Multi-Device Application - Delphi" and using this code I see the series has 1000 points at the start, and 601 after pressing the button.
Code: Select all
uses FMXTee.Series;
var Series1: TLineSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=False;
Chart1.Legend.Visible:=False;
Series1:=Chart1.AddSeries(TLineSeries) as TLineSeries;
Series1.FillSampleValues(1000);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Series1.Smoothed:=True;
end;
procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
Caption:='Number of points: ' + IntToStr(Series1.Count);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: What can be the reason for smooth not working
Hi Yeray,
in the setup you described this is also working for me.
In my "real"-application I have however the prroblem hat it is not working like that (I found a workarround though).
The workaround in my case is to do it as follows ...
sf := TSmoothingFunction.Create(self);
ChartSeriesSmoothed.FunctionType := TTeeFunction(sf);
ChartSeriesSmoothed.DataSource := ChartSeriesUnsmoothed;
ChartSeriesUnsmoothed.Active := false;
ChartSeriesSmoothed.Active := true;
But I do not know why I need to do it like this. Right before the code snippet above I fill the charseriesunsmoothed with data, using the AddXY method.
in the setup you described this is also working for me.
In my "real"-application I have however the prroblem hat it is not working like that (I found a workarround though).
The workaround in my case is to do it as follows ...
sf := TSmoothingFunction.Create(self);
ChartSeriesSmoothed.FunctionType := TTeeFunction(sf);
ChartSeriesSmoothed.DataSource := ChartSeriesUnsmoothed;
ChartSeriesUnsmoothed.Active := false;
ChartSeriesSmoothed.Active := true;
But I do not know why I need to do it like this. Right before the code snippet above I fill the charseriesunsmoothed with data, using the AddXY method.
Re: What can be the reason for smooth not working
Hi Roland,
I'm glad to hear you found a way to make it work as you wish!
On the other hand, we'll be glad to investigate why the smoothed property isn't working as expected. However, to further investigate this we'd need to get a simple example project we can use to reproduce the situation here.
I'm glad to hear you found a way to make it work as you wish!
On the other hand, we'll be glad to investigate why the smoothed property isn't working as expected. However, to further investigate this we'd need to get a simple example project we can use to reproduce the situation here.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: What can be the reason for smooth not working
What is the best way to provide you the sample project?- I could get one done.
Re: What can be the reason for smooth not working
Hi,
If it contains information you don't want to make public, you can post your files at our upload page.
You can attach your files here in the forums.Roland wrote:What is the best way to provide you the sample project?- I could get one done.
If it contains information you don't want to make public, you can post your files at our upload page.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |