public abstract class RangeCalculatorHelperBase<T extends java.lang.Comparable<T>,TAxis extends IAxisCore> extends java.lang.Object implements IRangeCalculationHelperBase<T>
Modifier and Type | Field and Description |
---|---|
protected TAxis |
axis |
protected com.scichart.data.model.IRange<T> |
dataRange |
protected com.scichart.data.numerics.math.IMath<T> |
math |
protected com.scichart.data.model.IRange<T> |
maximumRange |
protected static double |
ZERO_RANGE_GROW_BY |
Modifier | Constructor and Description |
---|---|
protected |
RangeCalculatorHelperBase(java.lang.Class<TAxis> axisType,
com.scichart.data.model.IRange<T> maximumRange,
com.scichart.data.model.IRange<T> dataRange,
com.scichart.data.numerics.math.IMath<T> math)
Creates a new instance of
RangeCalculatorHelperBase class |
Modifier and Type | Method and Description |
---|---|
void |
attachTo(com.scichart.core.IServiceContainer services) |
protected void |
coerceUndefinedRange(com.scichart.data.model.IRange<T> range) |
protected void |
coerceZeroRange(com.scichart.data.model.IRange<T> range)
Coerces range if calculated range has zero value
|
void |
detach() |
com.scichart.data.model.IRange<T> |
getDataRange(boolean forceCacheUpdate)
Gets data range(full extents of the data) of the Axis
|
com.scichart.data.model.IRange<T> |
getMaximumRange(boolean forceCacheUpdate)
Gets the maximum range of the axis, based on the data-range of all series
|
protected void |
growBy(com.scichart.data.model.IRange<T> range,
com.scichart.data.model.IRange<java.lang.Double> growBy) |
boolean |
isAttached() |
void |
onDataRangeChanged()
Called internally when data range changes
|
protected abstract void |
updateDataRange(com.scichart.data.model.IRange<T> dataRange) |
protected void |
updateMaximumRange(com.scichart.data.model.IRange<T> maximumRange,
boolean forceCacheUpdate) |
protected static final double ZERO_RANGE_GROW_BY
protected final com.scichart.data.model.IRange<T extends java.lang.Comparable<T>> maximumRange
protected final com.scichart.data.model.IRange<T extends java.lang.Comparable<T>> dataRange
protected RangeCalculatorHelperBase(java.lang.Class<TAxis> axisType, com.scichart.data.model.IRange<T> maximumRange, com.scichart.data.model.IRange<T> dataRange, com.scichart.data.numerics.math.IMath<T> math)
RangeCalculatorHelperBase
classmaximumRange
- The IRange
instance for storing maximum rangedataRange
- The IRange
instance for storing data rangemath
- The IMath
instance used for calculationspublic void attachTo(com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
public final boolean isAttached()
isAttached
in interface com.scichart.core.framework.IAttachable
public final com.scichart.data.model.IRange<T> getDataRange(boolean forceCacheUpdate)
IRangeCalculationHelperBase
getDataRange
in interface IRangeCalculationHelperBase<T extends java.lang.Comparable<T>>
forceCacheUpdate
- if true forces full recalculation of data range even if data hasn't changedprotected abstract void updateDataRange(com.scichart.data.model.IRange<T> dataRange)
public final com.scichart.data.model.IRange<T> getMaximumRange(boolean forceCacheUpdate)
IRangeCalculationHelperBase
getMaximumRange
in interface IRangeCalculationHelperBase<T extends java.lang.Comparable<T>>
forceCacheUpdate
- if true forces full recalculation of maximum range even if data hasn't changedprotected void updateMaximumRange(com.scichart.data.model.IRange<T> maximumRange, boolean forceCacheUpdate)
protected void coerceZeroRange(com.scichart.data.model.IRange<T> range)
range
- The range to coerceprotected void growBy(com.scichart.data.model.IRange<T> range, com.scichart.data.model.IRange<java.lang.Double> growBy)
protected void coerceUndefinedRange(com.scichart.data.model.IRange<T> range)
public void onDataRangeChanged()
onDataRangeChanged
in interface IRangeCalculationHelperBase<T extends java.lang.Comparable<T>>