Package 

Class SampledXYSeries

  • All Implemented Interfaces:
    com.androidplot.Series , com.androidplot.xy.FastXYSeries , com.androidplot.xy.OrderedXYSeries , com.androidplot.xy.XYSeries

    
    public class SampledXYSeries
     implements FastXYSeries, OrderedXYSeries
                        

    An implementation of FastXYSeries that samples its self into multiple levels to achieve faster rendering / zoom behavior. By default, uses LTTBSampler as it's sampling algorithm. Note that this algorithm does not yet support null values. Sampling behavior is controlled by two values: Ratio: A value greater than 1; controls the sampling ratio of each successive series. For example, a step of 2 would mean that each successive series contains 2x fewer points than the previous. Threshold: A value < the original series size; controls the lower limit at which point sampling should stop. For example, sampling a series with size 1000 given a ratio of 2 and a threshold of 100, three sampled resolutions will be generated: 500 - 2x sampling 250 - 4x sampling 125 - 8x sampling

    • Constructor Detail

      • SampledXYSeries

        SampledXYSeries(XYSeries rawData, OrderedXYSeries.XOrder xOrder, float ratio, int threshold)
        Parameters:
        xOrder - If your data is in ascending or descending order, specifying it here speed upoptimize render times.
        ratio - The ratio used to determine the size of each new sampled series.
        threshold - The desired size of the smallest sample series.
      • SampledXYSeries

        SampledXYSeries(XYSeries rawData, float ratio, int threshold)
        Generate a SampledXYSeries from the input series.
        Parameters:
        rawData - The original series to be downsampled
        ratio - The ratio used to determine the size of each new sampled series.
        threshold - The desired size of the smallest sample series.