Page 1 of 1

TDownSampling and X logarithimc scale

Posted: Wed May 13, 2015 11:10 am
by 16569743
Hello,
I use your function for downsampling series TDownSampling and it can be perfect for me. I need to show many points >1E6 in graph with MIN/MAX reduction procedure. It works fine but....
It works good for linear bottom axis. If I change to log scale I can see that on start on bottom axis there are missing points in resampled series. I think you calculate one reduce value (how many points will be reduced in one pixel) for whole axis range. This reduce value is valid only for linear scale not for log scale.
IS there any way how to use variable reduce value?
How to use TDownSampling with log scale correctly?

Re: TDownSampling and X logarithimc scale

Posted: Thu May 14, 2015 8:39 am
by yeray
Hello,

From the Features demo:
TDownSampling function reduces the number of points in series by using several different methods:

dsDouglas : Douglas-Peuckler reduction
dsAverage : Replace group of points with group average values
dsMax : Replace group of points with group maximum values
dsMin : Replace group of points with group minimum values
dsMinMax : Replace group of points with group minimum AND maximum values
Note of the methods of this function reduce the number of points considering the values on the series, not the pixel positions where they are drawn.

If you are using a TFastLineSeries you may want to give it a try at the DrawAllPoints feature (set it to false) instead of using TDownSampling function. This feature reduces the number of points considering the pixel positions where the points are being drawn.

If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.