D6Pro TChart Pro 7.07 smoothing function
Posted: Mon Oct 16, 2006 3:04 pm
I am using a moothing function against a Tlineseries to draw both the raw and smoothed data. The raw data is a variable, array of some 2000 points, y-varies inside +/-100 as x-increments 1 to 2000. I want the smoothing function to be a rolling average, plotting the mean of 40 samples of the raw data, so smooth[20] would be average of raw[1]..raw[40].
I thought this was the way the smoothing function would work if I set period to 40, and periodalign to pacenter. However, it doesn't appear to be that way. If I set periodstyle at design time to either pafirst, pacenter or palast it has no effect, the curve appears as if it is palast - ie. the smooth has a distinct lag and loses the first 40 samples. If I add a control to alter period at run time, the sampes dropped from the start f the smooth curve tracks the period, indicating it is palast.
If I try and alter period align at run-time, the compiler complains that pacenter conflicts with a property in the Delphi menus unit. I wonder if this is related to loss of tacenter functionality.
thanks
Sean
I thought this was the way the smoothing function would work if I set period to 40, and periodalign to pacenter. However, it doesn't appear to be that way. If I set periodstyle at design time to either pafirst, pacenter or palast it has no effect, the curve appears as if it is palast - ie. the smooth has a distinct lag and loses the first 40 samples. If I add a control to alter period at run time, the sampes dropped from the start f the smooth curve tracks the period, indicating it is palast.
If I try and alter period align at run-time, the compiler complains that pacenter conflicts with a property in the Delphi menus unit. I wonder if this is related to loss of tacenter functionality.
thanks
Sean