Class DefaultDecimation

  • All Implemented Interfaces:
    IsDefaultDecimation

    public final class DefaultDecimation
    extends Object
    implements IsDefaultDecimation
    CHART.JS default values for DECIMATION plugin element.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Description copied from interface: IsDefaultDecimation
        Returns true if decimation are enabled.
        Specified by:
        isEnabled in interface IsDefaultDecimation
        Returns:
        true if decimation are enabled.
      • getSamples

        public double getSamples()
        Description copied from interface: IsDefaultDecimation
        If the DecimationAlgorithm.LTTB algorithm is used, this is the number of samples in the output data set.
        Defaults to the canvas width to pick 1 sample per pixel.
        Specified by:
        getSamples in interface IsDefaultDecimation
        Returns:
        the number of samples in the output data set
      • getThreshold

        public double getThreshold()
        Description copied from interface: IsDefaultDecimation
        If the number of samples in the current axis range is above this value, the decimation will be triggered.
        Defaults to 4 times the canvas width.
        The number of point after decimation can be higher than the threshold value.
        Specified by:
        getThreshold in interface IsDefaultDecimation
        Returns:
        the number of samples in the current axis range is above this value, the decimation will be triggered