Class NoSelectedDatasetTicksCallback
- java.lang.Object
- 
- org.pepstock.charba.client.impl.callbacks.NoSelectedDatasetTicksCallback
 
- 
- All Implemented Interfaces:
- TickCallback
 
 public final class NoSelectedDatasetTicksCallback extends Object implements TickCallback Implementation of tick callback in order to avoid that when all datasets are hidden, the ticks will get a wrong double precision.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_PRECISIONDefault precision, 1.
 - 
Constructor SummaryConstructors Constructor Description NoSelectedDatasetTicksCallback()Creates the callback using theDEFAULT_PRECISION.NoSelectedDatasetTicksCallback(int precision)Creates the callback using the argument as amount of decimals places to apply to ticks.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPrecision()Returns the precision applied to ticks.StringonCallback(Axis axis, double value, int index, List<Double> values)Changes the tick marks to include information about the data type.
 
- 
- 
- 
Field Detail- 
DEFAULT_PRECISIONpublic static final int DEFAULT_PRECISION Default precision, 1.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
NoSelectedDatasetTicksCallbackpublic NoSelectedDatasetTicksCallback() Creates the callback using theDEFAULT_PRECISION.
 - 
NoSelectedDatasetTicksCallbackpublic NoSelectedDatasetTicksCallback(int precision) Creates the callback using the argument as amount of decimals places to apply to ticks.- Parameters:
- precision- amount of decimals places
 
 
- 
 - 
Method Detail- 
getPrecisionpublic int getPrecision() Returns the precision applied to ticks.- Returns:
- the precision applied to ticks.
 
 - 
onCallbackpublic String onCallback(Axis axis, double value, int index, List<Double> values) Description copied from interface:TickCallbackChanges the tick marks to include information about the data type.- Specified by:
- onCallbackin interface- TickCallback
- Parameters:
- axis- axis instance where this callback as been defined
- value- value of tick
- index- index of tick
- values- list of all tick values
- Returns:
- the tick to apply or if the callback returns nullthe associated grid line will be hidden.
 It can return aListof strings (for multiple lines) or a string (for single line).
 
 
- 
 
-