Hi,
I use some Teechart function based on main serie (like Moving Average). I use the anti-aliasing tools to render.
But the result on moving average is not so good, the result is not a nice curve...How can I obtain a nice moving average curve ? I hope my sample is more clear than my words
Thanks for your help,
Guilz
Nice Moving Average Curve
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Nice Moving Average Curve
Hi Guilz,
You can add a smoothing function to your chart having the moving average series as source series and make it invisible.
Hope this helps.
You can add a smoothing function to your chart having the moving average series as source series and make it invisible.
Hope this helps.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Nice Moving Average Curve
Hi Narcis,
I try what you suggest but the result is not fantastic (not a lot difference between smooth serie based on moving average serie and the moving average serie)
changing factor of smooth serie as not a big impact...
Guilz
I try what you suggest but the result is not fantastic (not a lot difference between smooth serie based on moving average serie and the moving average serie)
changing factor of smooth serie as not a big impact...
Guilz
Re: Nice Moving Average Curve
Hi Guilz,
Take a look at the following example. There is a Point series (source), a moving average function and a smoothing function.
If you zoom in, you'll see how the smoothed function is smoother than the moving average function.
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Take a look at the following example. There is a Point series (source), a moving average function and a smoothing function.
If you zoom in, you'll see how the smoothed function is smoother than the moving average function.
Code: Select all
Private Sub Form_Load()
TeeCommander1.ChartLink = TChart1.ChartLink
TChart1.Legend.Visible = False
TChart1.Aspect.View3D = False
TChart1.AddSeries scPoint
TChart1.Series(0).FillSampleValues 100
TChart1.Series(0).asPoint.Pointer.HorizontalSize = 2
TChart1.Series(0).asPoint.Pointer.VerticalSize = 2
TChart1.AddSeries scLine
TChart1.Series(1).SetFunction tfMovavg
TChart1.Series(1).DataSource = TChart1.Series(0)
TChart1.Series(1).FunctionType.Period = 5
'TChart1.Series(1).Active = False
TChart1.AddSeries scLine
TChart1.Series(2).asLine.LinePen.Width = 2
TChart1.Series(2).SetFunction tfSmoothing
TChart1.Series(2).DataSource = TChart1.Series(1)
TChart1.Series(2).FunctionType.Period = 5
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |