Class Decimation
- java.lang.Object
-
- org.pepstock.charba.client.configuration.Decimation
-
public class Decimation extends Object
The configuration forDefaultPluginId.DECIMATION
plugin.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecimationAlgorithm
getAlgorithm()
Returns the algorithm used by the plugin.IsChart
getChart()
Returns the chart instanceprotected ExtendedOptions
getConfiguration()
Returns the configuration element.protected ConfigurationOptions
getOptions()
Returns the configuration options.double
getSamples()
If theDecimationAlgorithm.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.double
getThreshold()
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.boolean
isEnabled()
Returnstrue
if decimation are enabled.void
setAlgorithm(DecimationAlgorithm algorithm)
Sets the algorithm used by the plugin.void
setEnabled(boolean enabled)
Setstrue
if decimation are enabled.void
setSamples(double samples)
If theDecimationAlgorithm.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.void
setThreshold(double threshold)
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.
-
-
-
Method Detail
-
setEnabled
public void setEnabled(boolean enabled)
Setstrue
if decimation are enabled.- Parameters:
enabled
-true
if decimation are enabled.
-
isEnabled
public boolean isEnabled()
Returnstrue
if decimation are enabled.- Returns:
true
if decimation are enabled.
-
setAlgorithm
public void setAlgorithm(DecimationAlgorithm algorithm)
Sets the algorithm used by the plugin.- Parameters:
algorithm
- the algorithm used by the plugin
-
getAlgorithm
public DecimationAlgorithm getAlgorithm()
Returns the algorithm used by the plugin.- Returns:
- the algorithm used by the plugin
-
setSamples
public void setSamples(double samples)
If theDecimationAlgorithm.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.- Parameters:
samples
- the number of samples in the output data set
-
getSamples
public double getSamples()
If theDecimationAlgorithm.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.- Returns:
- the number of samples in the output data set
-
setThreshold
public void setThreshold(double threshold)
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.- Parameters:
threshold
- the number of samples in the current axis range is above this value, the decimation will be triggered
-
getThreshold
public double getThreshold()
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.- Returns:
- the number of samples in the current axis range is above this value, the decimation will be triggered
-
getOptions
protected final ConfigurationOptions getOptions()
Returns the configuration options.- Returns:
- the configuration options.
-
getConfiguration
protected final ExtendedOptions getConfiguration()
Returns the configuration element.- Returns:
- the configuration element.
-
getChart
public final IsChart getChart()
Returns the chart instance- Returns:
- the chart
-
-