T
- The type of axis valuespublic abstract class RangeCalculationHelperBase<T extends java.lang.Comparable<T>> extends java.lang.Object implements IRangeCalculationHelper<T>
IRangeCalculationHelper
Modifier and Type | Field and Description |
---|---|
protected IAxis |
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 ISciChartSurface |
parentSurface |
protected static double |
ZERO_RANGE_GROW_BY |
Modifier | Constructor and Description |
---|---|
protected |
RangeCalculationHelperBase(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
RangeCalculationHelperBase class |
Modifier and Type | Method and Description |
---|---|
void |
attachTo(com.scichart.core.IServiceContainer services) |
protected void |
coerceZeroRange(com.scichart.data.model.IRange<T> visibleRange)
Coerces visible range if calculated visible 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
|
com.scichart.data.model.IRange<T> |
getWindowedYRange(java.util.Map<java.lang.String,ICoordinateCalculator> xCoordCalcs)
Returns the max range only for that axis (by the data-series on it), based on
xRanges |
protected void |
growBy(com.scichart.data.model.IRange<T> range,
com.scichart.data.model.IRange<java.lang.Double> growBy) |
boolean |
isAttached() |
protected static boolean |
isValidSeriesForXAxis(IRenderableSeries rs,
java.lang.String xAxisId)
Checks if specified series is valid for data range update of XAxis with
xAxisId |
protected static boolean |
isValidSeriesForYAxis(IRenderableSeries rs,
java.lang.String yAxisId)
Checks if specified series is valid for data range update of YAxis with
yAxisId |
void |
onDataRangeChanged()
Called internally when data range changes
|
protected void |
updateMaximumRange(boolean forceCacheUpdate)
Updates maximum range for attached axis
|
protected void |
updateXDataRange(RenderableSeriesCollection renderableSeries)
Updates data range of attached axis in X direction
|
protected void |
updateYDataRange(RenderableSeriesCollection renderableSeries)
Updates data range of attached axis in Y direction
|
protected static final double ZERO_RANGE_GROW_BY
protected IAxis axis
protected ISciChartSurface parentSurface
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 RangeCalculationHelperBase(com.scichart.data.model.IRange<T> maximumRange, com.scichart.data.model.IRange<T> dataRange, com.scichart.data.numerics.math.IMath<T> math)
RangeCalculationHelperBase
classmaximumRange
- The IRange
instance for storing maximum rangedataRange
- The IRange
instance for storing data rangemath
- The IMath
instance used for calculationspublic void attachTo(@NonNull 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 com.scichart.data.model.IRange<T> getDataRange(boolean forceCacheUpdate)
getDataRange
in interface IRangeCalculationHelper<T extends java.lang.Comparable<T>>
forceCacheUpdate
- if true forces full recalculation of data range even if data hasn't changedpublic com.scichart.data.model.IRange<T> getMaximumRange(boolean forceCacheUpdate)
getMaximumRange
in interface IRangeCalculationHelper<T extends java.lang.Comparable<T>>
forceCacheUpdate
- if true forces full recalculation of maximum range even if data hasn't changedprotected void updateMaximumRange(boolean forceCacheUpdate)
forceCacheUpdate
- Flag indicating whether the cached results should be updatedprotected void growBy(com.scichart.data.model.IRange<T> range, com.scichart.data.model.IRange<java.lang.Double> growBy)
public com.scichart.data.model.IRange<T> getWindowedYRange(java.util.Map<java.lang.String,ICoordinateCalculator> xCoordCalcs)
xRanges
"windowed" = "displayed in current viewport"
Note:uses GrowBy()
getWindowedYRange
in interface IRangeCalculationHelper<T extends java.lang.Comparable<T>>
xCoordCalcs
- Calculates the max range based on corresponding x coordinate calculatorsprotected void coerceZeroRange(com.scichart.data.model.IRange<T> visibleRange)
visibleRange
- The visible range to coerceprotected void updateXDataRange(RenderableSeriesCollection renderableSeries)
renderableSeries
- The renderable series collectionprotected static boolean isValidSeriesForXAxis(IRenderableSeries rs, java.lang.String xAxisId)
xAxisId
rs
- The IRenderableSeries
instance to check.xAxisId
- The X-Axis id.IRenderableSeries
instance is valid. Otherwise - false.protected void updateYDataRange(RenderableSeriesCollection renderableSeries)
renderableSeries
- The renderable series collectionprotected static boolean isValidSeriesForYAxis(IRenderableSeries rs, java.lang.String yAxisId)
yAxisId
rs
- The IRenderableSeries
instance to check.yAxisId
- The Y-Axis id.IRenderableSeries
instance is valid. Otherwise - false.public void onDataRangeChanged()
onDataRangeChanged
in interface IRangeCalculationHelper<T extends java.lang.Comparable<T>>