T
- The type of data used by axispublic abstract class AxisBase<T extends java.lang.Comparable<T>> extends AxisCore<T> implements IAxis, ISciChartSurfaceProvider
AxisCore.InvalidateElementCallback, AxisCore.RedrawElementCallback
Modifier and Type | Field and Description |
---|---|
protected com.scichart.core.framework.SmartPropertyBoolean |
autoFitMarginLabelsProperty |
protected com.scichart.core.framework.SmartProperty<AxisTickLabelStyle> |
axisTickLabelStyleProperty |
protected com.scichart.core.framework.SmartPropertyInteger |
axisTitleGravityProperty |
protected com.scichart.core.framework.SmartProperty<AxisTitleOrientation> |
axisTitleOrientationProperty |
protected com.scichart.core.framework.SmartProperty<AxisTitlePlacement> |
axisTitlePlacementProperty |
protected ICoordinateCalculator |
currentCoordinateCalculator |
protected IAxisInteractivityHelper |
currentInteractivityHelper |
static java.lang.String |
DEFAULT_AXIS_ID |
static AxisTickLabelStyle |
DEFAULT_AXIS_TICK_LABEL_STYLE |
protected com.scichart.core.framework.SmartPropertyBoolean |
isLabelCullingEnabledProperty |
protected com.scichart.core.framework.SmartPropertyBoolean |
isPrimaryAxisProperty |
protected boolean |
isProvidersDirty |
protected boolean |
isRenderersDirty |
autoRangeProperty, autoTicksProperty, axisBandsStyleProperty, axisTitleProperty, cursorTextFormattingProperty, drawLabelsProperty, drawMajorBandsProperty, drawMajorGridLinesProperty, drawMajorTicksProperty, drawMinorGridLinesProperty, drawMinorTicksProperty, flipCoordinatesProperty, majorDeltaProperty, majorGridLineStyleProperty, majorTickLineLengthProperty, majorTickLineStyleProperty, maxAutoTicksProperty, minorDeltaProperty, minorGridLineStyleProperty, minorsPerMajorProperty, minorTickLineLengthProperty, minorTickLineStyleProperty, textFormattingProperty, tickLabelStyleProperty, titleStyleProperty
Modifier | Constructor and Description |
---|---|
protected |
AxisBase(com.scichart.data.model.IRange<T> defaultNonZeroRange,
IAxisModifierSurface axisModifierSurface) |
Modifier and Type | Method and Description |
---|---|
void |
attachTo(com.scichart.core.IServiceContainer services) |
protected int |
calculateAxisOffset()
Calculates axis offset relative to
IRenderableSeriesArea in pixels |
protected int |
calculateAxisViewportDimension()
Calculates axis viewport dimension in pixels
|
protected ICoordinateCalculator |
createCoordinateCalculator(AxisParams axisParams,
double visibleRangeMin,
double visibleRangeMax)
Creates new
ICoordinateCalculator based on axis params values and double representation of visible range |
ICoordinateCalculator |
createCoordinateCalculatorFrom(com.scichart.data.model.IRange visibleRange)
Creates a coordinate calculator from specified visible range
|
protected IAxisInteractivityHelper |
createInteractivityHelper(ICoordinateCalculator currentCoordinateCalculator)
Creates a new
IAxisInteractivityHelper instance for this axis |
void |
detach() |
java.lang.CharSequence |
formatCursorText(java.lang.Comparable value)
Formats
value using the CursorTextFormatting of current Axis as formatting string |
java.lang.CharSequence |
formatText(java.lang.Comparable value)
Formats
value using the TextFormatting of current Axis as formatting string |
boolean |
getAutoFitMarginalLabels()
Gets a value indicating whether marginal labels get shifted to fit inside an axis when too long.
|
AxisAlignment |
getAxisAlignment()
Gets the
AxisAlignment for this Axis. |
java.lang.String |
getAxisId()
Gets the string Id of this Axis.
|
IAxisInfoProvider |
getAxisInfoProvider()
Gets the
IAxisInfoProvider instance associated with this axis. |
AxisLayoutState |
getAxisLayoutState()
Gets current
AxisLayoutState for this axis instance |
IAxisModifierSurface |
getAxisModifierSurface()
Gets the axis modifier surface, which is used to place tooltips on this Axis
|
int |
getAxisOffset()
Gets offset, which is used by
ICoordinateCalculator of this Axis |
IReadWriteLock |
getAxisParamsLock()
Gets the lock for current axis params.
|
AxisTickLabelStyle |
getAxisTickLabelStyle()
Gets style for axis tick labels
|
int |
getAxisTitleGravity()
Gets axis title gravity
|
int |
getAxisTitleMarginBottom()
Gets the bottom margin of the
IAxis instance in pixels. |
int |
getAxisTitleMarginLeft()
Gets the left margin of the
IAxis instance in pixels. |
int |
getAxisTitleMarginRight()
Gets the right margin of the
IAxis instance in pixels. |
int |
getAxisTitleMarginTop()
Gets the top margin of the
IAxis instance in pixels. |
AxisTitleOrientation |
getAxisTitleOrientation()
Gets axis title orientation
|
AxisTitlePlacement |
getAxisTitlePlacement()
Gets axis title placement
|
int |
getAxisViewportDimension()
Gets the axis viewport dimension, which is used by
ICoordinateCalculator of the Axis |
boolean |
getBoundsRelativeTo(android.graphics.RectF bounds,
com.scichart.core.framework.IHitTestable hitTestable) |
boolean |
getBoundsRelativeTo(android.graphics.Rect bounds,
com.scichart.core.framework.IHitTestable hitTestable) |
android.content.Context |
getContext() |
ICoordinateCalculator |
getCurrentCoordinateCalculator()
Gets the current
ICoordinateCalculator for this Axis, based on current Visible Range and axis type |
IAxisInteractivityHelper |
getCurrentInteractivityHelper()
Gets the current
IAxisInteractivityHelper for this Axis |
com.scichart.data.model.IRange<T> |
getDataRange()
Gets the data range(full extents of the data) of the Axis
|
com.scichart.data.model.IRange<T> |
getDataRange(boolean forceCacheUpdate)
Gets the data range(full extents of the data) of the Axis
|
boolean |
getIsAxisFlipped()
Gets whether this axis is flipped (e.g YAxis on the bottom or top, or XAxis on the left or right)
|
boolean |
getIsLabelCullingEnabled()
Gets a value indicating whether Label Culling is enabled (when labels overlap) on this axis instance
|
boolean |
getIsPrimaryAxis()
Gets whether current Axis is the main one in axis collection.
|
int |
getLayoutHeight()
Get height of layout placement rect
|
android.graphics.Rect |
getLayoutRect()
Gets
Rect with layout placement |
int |
getLayoutWidth()
Get width of layout placement rect
|
com.scichart.data.model.IRange<T> |
getMaximumRange()
Gets the maximum range of the axis, based on the data-range of all series
|
com.scichart.data.model.IRange<T> |
getMaximumRange(boolean forceCacheUpdate)
Gets the maximum range of the axis, based on the data-range of all series
|
int |
getOrientation()
Gets the Axis Orientation, e.g.
|
ISciChartSurface |
getParentSurface()
Gets the parent surface that this instance is associated with
|
android.view.View |
getView() |
int |
getVisibility()
Get visibility of this axis
|
com.scichart.data.model.IRange<T> |
getWindowedYRange(java.util.Map<java.lang.String,ICoordinateCalculator> xCoordCalcs)
Called by the SciChartSurface internally.
|
AxisInfo |
hitTest(java.lang.Comparable value)
Perform a HitTest on this Axis at specified data point
|
void |
invalidateElement(boolean isAxisDirty)
Invalidate current axis
|
boolean |
isCategoryAxis()
Gets the value indicating whether this instance is a category axis
|
boolean |
isCenterAxis()
Gets whether current Axis should placed in the center of chart or not
|
boolean |
isHorizontalAxis()
Gets whether this axis is horizontal or not
|
boolean |
isPointWithinBounds(float x,
float y) |
boolean |
isPointWithinBounds(float x,
float y,
com.scichart.core.framework.IHitTestable hitTestable) |
boolean |
isXAxis()
Gets whether this axis is an X-Axis or not
|
void |
layoutArea(int left,
int top,
int right,
int bottom)
Places this instance relative to parent
SciChartSurface |
void |
onDataRangeChanged()
Used internally for notification of axis when data range changes
|
void |
onDraw(com.scichart.drawing.common.IRenderContext2D renderContext,
com.scichart.drawing.common.IAssetManager2D assetManager) |
void |
onDraw(com.scichart.drawing.common.IRenderContext2D renderContext,
com.scichart.drawing.common.IAssetManager2D assetManager,
RenderOperationLayers drawingLayers)
Draws axis grid lines in the center of the chart
|
void |
onRenderSurfaceChanged()
Called when new
IRenderSurface instance is set for parent ISciChartSurface |
protected void |
onSizeChanged(int w,
int h,
int oldw,
int oldh)
This method is called when axis size has changed during its layout
|
protected void |
onUpdateMeasure()
Updates axis parts which should be updated before measure
|
protected void |
onVisibleRangeChanged(com.scichart.data.model.IRange oldRange,
com.scichart.data.model.IRange newRange,
boolean isAnimating)
Called when VisibleRange changes
|
protected void |
recreateCalculator()
Recreates coordinate calculator for current axis
|
void |
scroll(float pixelsToScroll,
ClipMode clipMode)
Scrolls current Visible Range by the specified number of pixels
|
void |
scroll(float pixelsToScroll,
ClipMode clipMode,
ClipModeTarget clipTarget)
Scrolls current Visible Range by the specified number of pixels with the specified animation duration
|
void |
scroll(float pixelsToScroll,
ClipMode clipMode,
ClipModeTarget clipTarget,
long duration)
/**
Scrolls current Visible Range by the specified number of pixels with the specified animation duration
|
void |
scroll(float pixelsToScroll,
ClipMode clipMode,
long duration)
Scrolls current Visible Range by the specified number of pixels with the specified animation duration
|
void |
setAutoFitMarginalLabels(boolean autoFitMarginalLabels)
Sets a value indicating whether marginal labels get shifted to fit inside an axis when too long.
|
void |
setAxisAlignment(AxisAlignment axisAlignment)
Sets the
AxisAlignment for this Axis. |
void |
setAxisId(java.lang.String axisId)
Sets the string Id of this Axis.
|
void |
setAxisInfoProvider(IAxisInfoProvider axisInfoProvider)
Sets the
IAxisInfoProvider instance associated with this axis. |
protected void |
setAxisLayoutManager(IAxisLayoutManager axisLayoutManager)
Sets
IAxisLayoutManager which will be used for layout of this axis |
protected void |
setAxisRenderer(IAxisRenderer axisRenderer)
Sets
IAxisRenderer instance which will be used for rendering of this axis |
void |
setAxisTickLabelStyle(AxisTickLabelStyle axisTickLabelStyle)
Sets style for axis tick labels
|
void |
setAxisTitleGravity(int axisTitleGravity)
Sets axis title gravity
|
void |
setAxisTitleMargins(int margin)
Sets the axis title margins, in pixels
|
void |
setAxisTitleMargins(int left,
int top,
int right,
int bottom)
Sets the axis title margins, in pixels
|
void |
setAxisTitleOrientation(AxisTitleOrientation axisTitleOrientation)
Sets axis title orientation
|
void |
setAxisTitlePlacement(AxisTitlePlacement axisTitlePlacement)
Sets axis title placement
|
protected void |
setAxisTitleRenderer(IAxisTitleRenderer axisTitleRenderer)
Sets
IAxisTitleRenderer instance which will be used for rendering of axis title |
protected void |
setGridLinesRenderer(IAxisGridLinesRenderer gridLinesRenderer)
Sets
IAxisGridLinesRenderer instance which will be used for rendering of grid lines for this axis |
void |
setIsCenterAxis(boolean isCenterAxis)
Sets whether current Axis should placed in the center of chart or not
|
void |
setIsLabelCullingEnabled(boolean isLabelCullingEnabled)
Sets a value indicating whether Label Culling is enabled (when labels overlap) on this axis instance
|
void |
setIsPrimaryAxis(boolean isPrimaryAxis)
Sets whether current Axis is the main one in axis collection.
|
void |
setIsXAxis(boolean isXAxis)
Sets whether this axis is an X-Axis or not
|
void |
setMargins(int margin)
Deprecated.
use
setAxisTitleMargins(int) instead |
void |
setMargins(int left,
int top,
int right,
int bottom)
Deprecated.
use
setAxisTitleMargins(int, int, int, int) instead |
void |
setOrientation(int orientation)
Sets the Axis Orientation, e.g.
|
protected void |
setRangeCalculationHelper(IRangeCalculationHelper<T> rangeCalculationHelper)
Sets
IRangeCalculationHelper instance which will be used for range calculations in this axis |
void |
setVisibility(int visibility)
Sets visibility of this axis
|
boolean |
translatePoint(android.graphics.PointF point,
com.scichart.core.framework.IHitTestable hitTestable) |
void |
update(com.scichart.drawing.common.IAssetManager2D assetManager,
RenderPassState renderPassState)
Updates the state of this
IUpdatable before rendering |
void |
updateAxisMeasurements()
Updates measurements of axis for proper layout of its content
|
protected void |
updateAxisParams(AxisParams axisParams)
Updates axis params according to current state of axis
|
void |
updateCore(RenderPassState renderPassState)
Performs core update of axis
|
void |
zoom(float fromCoordinate,
float toCoordinate)
Performs zoom on current Axis, using
fromCoord as a coordinate of new range start and toCoord as a coordinate of new range end |
void |
zoom(float fromCoordinate,
float toCoordinate,
long duration)
Performs zoom on current axis, using
fromCoord as a coordinate of new range start and toCoord as a coordinate of new range end with the specified animation duration |
void |
zoomBy(double minFraction,
double maxFraction)
Performs zoom on current axis, using
minFraction as a multiplier of range start and maxFraction as a multiplier of range end |
void |
zoomBy(double minFraction,
double maxFraction,
long duration)
Performs zoom on current axis, using
minFraction as a multiplier of range start and maxFraction as a multiplier of range end with the specified animation duration |
animateVisibleRangeTo, applyThemeProvider, coerceVisibleRange, decrementSuspend, getAutoRange, getAutoTicks, getAxisBandsStyle, getAxisTitle, getCoordinate, getCursorTextFormatting, getDataValue, getDefaultNonZeroRange, getDrawLabels, getDrawMajorBands, getDrawMajorGridLines, getDrawMajorTicks, getDrawMinorGridLines, getDrawMinorTicks, getFlipCoordinates, getGrowBy, getIsSuspended, getLabelProvider, getMajorDelta, getMajorGridLineStyle, getMajorTickLineLength, getMajorTickLineStyle, getMaxAutoTicks, getMaximumZoomConstrain, getMinimalZoomConstrain, getMinorDelta, getMinorGridLineStyle, getMinorsPerMajor, getMinorTickLineLength, getMinorTickLineStyle, getServices, getTextFormatting, getTickCoordinatesProvider, getTickLabelStyle, getTickProvider, getTitleStyle, getType, getVisibleRange, getVisibleRangeAnimator, getVisibleRangeLimit, getVisibleRangeLimitMode, getVisibleRangeType, getZoomConstrainType, hasDefaultVisibleRange, hasValidVisibleRange, invalidateElement, isAttached, isValidRange, isValidVisibleRange, isZoomConstrainSatisfied, resumeUpdates, setAutoRange, setAutoTicks, setAxisBandsStyle, setAxisTitle, setCursorTextFormatting, setDataRangeChangeListener, setDrawLabels, setDrawMajorBands, setDrawMajorGridLines, setDrawMajorTicks, setDrawMinorGridLines, setDrawMinorTicks, setFlipCoordinates, setGrowBy, setLabelProvider, setMajorDelta, setMajorGridLineStyle, setMajorTickLineLength, setMajorTickLineStyle, setMaxAutoTicks, setMaximumZoomConstrain, setMinimalZoomConstrain, setMinorDelta, setMinorGridLineStyle, setMinorsPerMajor, setMinorTickLineLength, setMinorTickLineStyle, setTextFormatting, setTickCoordinatesProvider, setTickLabelStyle, setTickProvider, setTitleStyle, setVisibleRange, setVisibleRangeAnimator, setVisibleRangeChangeListener, setVisibleRangeLimit, setVisibleRangeLimitMode, suspendUpdates, tryApplyVisibleRangeLimitTo, tryAttachTo, tryDetachFrom
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
animateVisibleRangeTo, getAutoRange, getAutoTicks, getAxisBandsStyle, getAxisTitle, getCoordinate, getCursorTextFormatting, getDataValue, getDefaultNonZeroRange, getDrawLabels, getDrawMajorBands, getDrawMajorGridLines, getDrawMajorTicks, getDrawMinorGridLines, getDrawMinorTicks, getFlipCoordinates, getGrowBy, getLabelProvider, getMajorDelta, getMajorGridLineStyle, getMajorTickLineLength, getMajorTickLineStyle, getMaxAutoTicks, getMaximumZoomConstrain, getMinimalZoomConstrain, getMinorDelta, getMinorGridLineStyle, getMinorsPerMajor, getMinorTickLineLength, getMinorTickLineStyle, getTextFormatting, getTickCoordinatesProvider, getTickLabelStyle, getTickProvider, getTitleStyle, getVisibleRange, getVisibleRangeLimit, getVisibleRangeLimitMode, hasDefaultVisibleRange, hasValidVisibleRange, isValidRange, setAutoRange, setAutoTicks, setAxisBandsStyle, setAxisTitle, setCursorTextFormatting, setDataRangeChangeListener, setDrawLabels, setDrawMajorBands, setDrawMajorGridLines, setDrawMajorTicks, setDrawMinorGridLines, setDrawMinorTicks, setFlipCoordinates, setGrowBy, setLabelProvider, setMajorDelta, setMajorGridLineStyle, setMajorTickLineLength, setMajorTickLineStyle, setMaxAutoTicks, setMaximumZoomConstrain, setMinimalZoomConstrain, setMinorDelta, setMinorGridLineStyle, setMinorsPerMajor, setMinorTickLineLength, setMinorTickLineStyle, setTextFormatting, setTickCoordinatesProvider, setTickLabelStyle, setTickProvider, setTitleStyle, setVisibleRange, setVisibleRangeChangeListener, setVisibleRangeLimit, setVisibleRangeLimitMode
decrementSuspend, getIsSuspended, resumeUpdates, suspendUpdates
invalidateElement
applyThemeProvider
public static final java.lang.String DEFAULT_AXIS_ID
public static final AxisTickLabelStyle DEFAULT_AXIS_TICK_LABEL_STYLE
protected final com.scichart.core.framework.SmartPropertyBoolean isLabelCullingEnabledProperty
protected final com.scichart.core.framework.SmartPropertyBoolean autoFitMarginLabelsProperty
protected final com.scichart.core.framework.SmartProperty<AxisTickLabelStyle> axisTickLabelStyleProperty
protected final com.scichart.core.framework.SmartProperty<AxisTitlePlacement> axisTitlePlacementProperty
protected final com.scichart.core.framework.SmartProperty<AxisTitleOrientation> axisTitleOrientationProperty
protected final com.scichart.core.framework.SmartPropertyInteger axisTitleGravityProperty
protected final com.scichart.core.framework.SmartPropertyBoolean isPrimaryAxisProperty
protected ICoordinateCalculator currentCoordinateCalculator
protected IAxisInteractivityHelper currentInteractivityHelper
protected volatile boolean isRenderersDirty
protected volatile boolean isProvidersDirty
protected AxisBase(@NonNull com.scichart.data.model.IRange<T> defaultNonZeroRange, @NonNull IAxisModifierSurface axisModifierSurface)
public final IReadWriteLock getAxisParamsLock()
getAxisParamsLock
in interface IAxis
public final ISciChartSurface getParentSurface()
getParentSurface
in interface ISciChartSurfaceProvider
public final boolean getIsPrimaryAxis()
getIsPrimaryAxis
in interface IAxis
isPrimaryAxis
valuepublic final void setIsPrimaryAxis(boolean isPrimaryAxis)
setIsPrimaryAxis
in interface IAxis
isPrimaryAxis
- The new isPrimaryAxis
valuepublic final void setAxisAlignment(@NonNull AxisAlignment axisAlignment)
AxisAlignment
for this Axis.setAxisAlignment
in interface IAxis
axisAlignment
- The new axis alignment value@NonNull public final AxisAlignment getAxisAlignment()
AxisAlignment
for this Axis.getAxisAlignment
in interface IAxis
public final void setIsCenterAxis(boolean isCenterAxis)
setIsCenterAxis
in interface IAxis
isCenterAxis
- The new isCenterAxis valuepublic final boolean isCenterAxis()
isCenterAxis
in interface IAxis
public boolean isCategoryAxis()
isCategoryAxis
in interface IAxis
public final void setOrientation(int orientation)
setOrientation
in interface IAxis
orientation
- The new orientation valuepublic final int getOrientation()
getOrientation
in interface IAxis
public final boolean getIsLabelCullingEnabled()
getIsLabelCullingEnabled
in interface IAxis
public final void setIsLabelCullingEnabled(boolean isLabelCullingEnabled)
setIsLabelCullingEnabled
in interface IAxis
isLabelCullingEnabled
- The isLabelCullingEnabled valuepublic final boolean getAutoFitMarginalLabels()
getAutoFitMarginalLabels
in interface IAxis
public final void setAutoFitMarginalLabels(boolean autoFitMarginalLabels)
setAutoFitMarginalLabels
in interface IAxis
autoFitMarginalLabels
- The new autoFitMarginalLabels valuepublic final AxisTickLabelStyle getAxisTickLabelStyle()
getAxisTickLabelStyle
in interface IAxis
public final void setAxisTickLabelStyle(AxisTickLabelStyle axisTickLabelStyle)
setAxisTickLabelStyle
in interface IAxis
axisTickLabelStyle
- The new style for axis tick labelspublic final void setAxisTitlePlacement(@NonNull AxisTitlePlacement axisTitlePlacement)
setAxisTitlePlacement
in interface IAxis
axisTitlePlacement
- The new axis title placement value@NonNull public final AxisTitlePlacement getAxisTitlePlacement()
getAxisTitlePlacement
in interface IAxis
public final void setAxisTitleOrientation(@NonNull AxisTitleOrientation axisTitleOrientation)
setAxisTitleOrientation
in interface IAxis
axisTitleOrientation
- The new axis title orientation@NonNull public final AxisTitleOrientation getAxisTitleOrientation()
getAxisTitleOrientation
in interface IAxis
public final void setAxisTitleGravity(int axisTitleGravity)
setAxisTitleGravity
in interface IAxis
axisTitleGravity
- The new axis title gravity@Deprecated public final void setMargins(int left, int top, int right, int bottom)
setAxisTitleMargins(int, int, int, int)
insteadsetMargins
in interface IAxis
left
- the left margin size.top
- the top margin size.right
- the right margin size.bottom
- the bottom margin size.@Deprecated public final void setMargins(int margin)
setAxisTitleMargins(int)
insteadsetMargins
in interface IAxis
margin
- the left, top, right and bottom margin size.public final void setAxisTitleMargins(int left, int top, int right, int bottom)
setAxisTitleMargins
in interface IAxis
left
- the left margin size.top
- the top margin size.right
- the right margin size.bottom
- the bottom margin size.public final void setAxisTitleMargins(int margin)
setAxisTitleMargins
in interface IAxis
margin
- the left, top, right and bottom margin size.public final int getAxisTitleMarginLeft()
IAxis
instance in pixels.getAxisTitleMarginLeft
in interface IAxis
IAxis
instance in pixels.public final int getAxisTitleMarginTop()
IAxis
instance in pixels.getAxisTitleMarginTop
in interface IAxis
IAxis
instance in pixels.public final int getAxisTitleMarginRight()
IAxis
instance in pixels.getAxisTitleMarginRight
in interface IAxis
IAxis
instance in pixels.public final int getAxisTitleMarginBottom()
IAxis
instance in pixels.getAxisTitleMarginBottom
in interface IAxis
IAxis
instance in pixels.public final int getAxisTitleGravity()
getAxisTitleGravity
in interface IAxis
public final boolean isXAxis()
public final void setIsXAxis(boolean isXAxis)
setIsXAxis
in interface IAxis
isXAxis
- The new isXAxis
valuepublic final boolean isHorizontalAxis()
isHorizontalAxis
in interface IAxis
public final boolean getIsAxisFlipped()
getIsAxisFlipped
in interface IAxis
public final java.lang.String getAxisId()
public final void setAxisId(java.lang.String axisId)
IRenderableSeries
public void onRenderSurfaceChanged()
IRenderSurface
instance is set for parent ISciChartSurface
onRenderSurfaceChanged
in interface IRenderSurfaceChangedListener
public void attachTo(@NonNull com.scichart.core.IServiceContainer services)
public void detach()
public void invalidateElement(boolean isAxisDirty)
invalidateElement
in class AxisCore<T extends java.lang.Comparable<T>>
isAxisDirty
- True if axis layout has changedprotected void onVisibleRangeChanged(com.scichart.data.model.IRange oldRange, com.scichart.data.model.IRange newRange, boolean isAnimating)
onVisibleRangeChanged
in class AxisCore<T extends java.lang.Comparable<T>>
oldRange
- The old VisibleRangenewRange
- The new VisibleRangeisAnimating
- Flag indicating whether the VisibleRange is animatingpublic final ICoordinateCalculator getCurrentCoordinateCalculator()
ICoordinateCalculator
for this Axis, based on current Visible Range and axis typegetCurrentCoordinateCalculator
in interface IAxisCore
ICoordinateCalculator
instancepublic final IAxisInteractivityHelper getCurrentInteractivityHelper()
IAxisInteractivityHelper
for this AxisgetCurrentInteractivityHelper
in interface IAxis
IAxisInteractivityHelper
for this Axisprotected final void setRangeCalculationHelper(@NonNull IRangeCalculationHelper<T> rangeCalculationHelper)
IRangeCalculationHelper
instance which will be used for range calculations in this axisrangeCalculationHelper
- New IRangeCalculationHelper
instanceprotected final void setAxisRenderer(@NonNull IAxisRenderer axisRenderer)
IAxisRenderer
instance which will be used for rendering of this axisaxisRenderer
- New IAxisRenderer
instanceprotected final void setGridLinesRenderer(@NonNull IAxisGridLinesRenderer gridLinesRenderer)
IAxisGridLinesRenderer
instance which will be used for rendering of grid lines for this axisgridLinesRenderer
- New IAxisGridLinesRenderer
instanceprotected final void setAxisTitleRenderer(@NonNull IAxisTitleRenderer axisTitleRenderer)
IAxisTitleRenderer
instance which will be used for rendering of axis titleaxisTitleRenderer
- New IAxisTitleRenderer
instanceprotected final void setAxisLayoutManager(@NonNull IAxisLayoutManager axisLayoutManager)
IAxisLayoutManager
which will be used for layout of this axisaxisLayoutManager
- New IAxisLayoutManager
instanceprotected final void recreateCalculator()
recreateCalculator
in class AxisCore<T extends java.lang.Comparable<T>>
protected void updateAxisParams(AxisParams axisParams)
axisParams
- Axis params to updateprotected int calculateAxisViewportDimension()
protected int calculateAxisOffset()
IRenderableSeriesArea
in pixelspublic final int getAxisOffset()
ICoordinateCalculator
of this AxisgetAxisOffset
in interface IAxis
public final int getAxisViewportDimension()
ICoordinateCalculator
of the AxisgetAxisViewportDimension
in interface IAxis
protected ICoordinateCalculator createCoordinateCalculator(AxisParams axisParams, double visibleRangeMin, double visibleRangeMax)
ICoordinateCalculator
based on axis params values and double representation of visible rangeaxisParams
- Axis params to create calculator fromvisibleRangeMin
- The double representation of min value for visible range to create calculator fromvisibleRangeMax
- The double representation of max value for visible range to create calculator fromICoordinateCalculator
instancepublic final ICoordinateCalculator createCoordinateCalculatorFrom(com.scichart.data.model.IRange visibleRange)
createCoordinateCalculatorFrom
in interface IAxisCore
visibleRange
- The visible range to create coordinate calculator fromprotected IAxisInteractivityHelper createInteractivityHelper(ICoordinateCalculator currentCoordinateCalculator)
IAxisInteractivityHelper
instance for this axiscurrentCoordinateCalculator
- The current coordinate calculator for this axispublic final int getVisibility()
getVisibility
in interface IAxisCore
public final void setVisibility(int visibility)
setVisibility
in interface IAxisCore
visibility
- The new visibility valuepublic final void onDraw(com.scichart.drawing.common.IRenderContext2D renderContext, com.scichart.drawing.common.IAssetManager2D assetManager)
onDraw
in interface com.scichart.drawing.common.IDrawable
public final void onDraw(com.scichart.drawing.common.IRenderContext2D renderContext, com.scichart.drawing.common.IAssetManager2D assetManager, RenderOperationLayers drawingLayers)
onDraw
in interface IAxisGridLinesDrawable
renderContext
- IRenderContext2D
instance to draw onassetManager
- IAssetManager2D
instance which manages assets related to current IRenderSurface
drawingLayers
- Specifies different drawing layers for drawing of axis grid linesRenderOperationLayers.AXIS_BANDS
,
RenderOperationLayers.AXIS_MAJOR_GRID_LINES
,
RenderOperationLayers.AXIS_MINOR_GRID_LINES
,
RenderOperationLayers.RENDERABLE_SERIES
public void updateCore(RenderPassState renderPassState)
updateCore
in interface IAxis
renderPassState
- The RenderPassState
instance for current render passpublic final void update(com.scichart.drawing.common.IAssetManager2D assetManager, RenderPassState renderPassState)
IUpdatable
before renderingupdate
in interface IUpdatable
assetManager
- The IAssetManager2D
used in current render passrenderPassState
- The RenderPassState
used in current render passpublic final void updateAxisMeasurements()
updateAxisMeasurements
in interface IAxis
protected void onUpdateMeasure()
public final AxisLayoutState getAxisLayoutState()
AxisLayoutState
for this axis instancegetAxisLayoutState
in interface IAxis
AxisLayoutState
for this axis instancepublic final void scroll(float pixelsToScroll, ClipMode clipMode)
scroll
in interface IAxis
pixelsToScroll
- Scroll N pixels from the current visible rangeclipMode
- Defines how scrolling behaves when you reach the edge of the Axis extents.
e.g. ClipMode.ClipAtExtents
prevents panning outside of the Axis, ClipMode.None
allows panning outsidepublic final void scroll(float pixelsToScroll, ClipMode clipMode, long duration)
scroll
in interface IAxis
pixelsToScroll
- Scroll N pixels from the current visible rangeclipMode
- Defines how scrolling behaves when you reach the edge of the Axis extents.
e.g. ClipMode.ClipAtExtents
prevents panning outside of the Axis, ClipMode.None
allows panning outsideduration
- The duration of animation when zooming to extentspublic final void scroll(float pixelsToScroll, ClipMode clipMode, ClipModeTarget clipTarget)
public final void scroll(float pixelsToScroll, ClipMode clipMode, ClipModeTarget clipTarget, long duration)
scroll
in interface IAxis
pixelsToScroll
- Scroll N pixels from the current visible rangeclipMode
- Defines how scrolling behaves when you reach the edge of the Axis extents.clipTarget
- Defines target which is used for clippingduration
- The duration of animation when zooming to extentspublic final void zoomBy(double minFraction, double maxFraction)
minFraction
as a multiplier of range start and maxFraction
as a multiplier of range endpublic final void zoomBy(double minFraction, double maxFraction, long duration)
minFraction
as a multiplier of range start and maxFraction
as a multiplier of range end with the specified animation durationpublic final void zoom(float fromCoordinate, float toCoordinate)
fromCoord
as a coordinate of new range start and toCoord
as a coordinate of new range endpublic final void zoom(float fromCoordinate, float toCoordinate, long duration)
fromCoord
as a coordinate of new range start and toCoord
as a coordinate of new range end with the specified animation durationpublic final com.scichart.data.model.IRange<T> getMaximumRange(boolean forceCacheUpdate)
getMaximumRange
in interface IAxisCore
forceCacheUpdate
- Flag indicating whether the cached results should be updatedpublic final com.scichart.data.model.IRange<T> getMaximumRange()
getMaximumRange
in interface IAxisCore
public final 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 IAxis
xCoordCalcs
- Calculates the max range based on corresponding x coordinate calculatorspublic com.scichart.data.model.IRange<T> getDataRange(boolean forceCacheUpdate)
getDataRange
in interface IAxisCore
forceCacheUpdate
- Flag indicating whether the cached results should be updatedpublic final com.scichart.data.model.IRange<T> getDataRange()
getDataRange
in interface IAxisCore
public final IAxisModifierSurface getAxisModifierSurface()
getAxisModifierSurface
in interface IAxis
IAxisModifierSurface
for this Axispublic void onDataRangeChanged()
onDataRangeChanged
in interface IAxisCore
onDataRangeChanged
in class AxisCore<T extends java.lang.Comparable<T>>
public java.lang.CharSequence formatText(java.lang.Comparable value)
value
using the TextFormatting of current Axis as formatting stringformatText
in interface IAxis
value
- data value to formatpublic java.lang.CharSequence formatCursorText(java.lang.Comparable value)
value
using the CursorTextFormatting of current Axis as formatting stringformatCursorText
in interface IAxis
value
- data value to formatpublic AxisInfo hitTest(java.lang.Comparable value)
@NonNull public IAxisInfoProvider getAxisInfoProvider()
IAxis
IAxisInfoProvider
instance associated with this axis.getAxisInfoProvider
in interface IAxis
IAxisInfoProvider
instance.public void setAxisInfoProvider(@NonNull IAxisInfoProvider axisInfoProvider)
IAxis
IAxisInfoProvider
instance associated with this axis.setAxisInfoProvider
in interface IAxis
axisInfoProvider
- New IAxisInfoProvider
instance.public final android.content.Context getContext()
getContext
in interface com.scichart.core.framework.IContextProvider
public final boolean isPointWithinBounds(float x, float y)
isPointWithinBounds
in interface com.scichart.core.framework.IHitTestable
public final boolean isPointWithinBounds(float x, float y, com.scichart.core.framework.IHitTestable hitTestable)
isPointWithinBounds
in interface com.scichart.core.framework.IHitTestable
public final boolean getBoundsRelativeTo(android.graphics.Rect bounds, com.scichart.core.framework.IHitTestable hitTestable)
getBoundsRelativeTo
in interface com.scichart.core.framework.IHitTestable
public final boolean getBoundsRelativeTo(android.graphics.RectF bounds, com.scichart.core.framework.IHitTestable hitTestable)
getBoundsRelativeTo
in interface com.scichart.core.framework.IHitTestable
public final boolean translatePoint(android.graphics.PointF point, com.scichart.core.framework.IHitTestable hitTestable)
translatePoint
in interface com.scichart.core.framework.IHitTestable
@NonNull public final android.view.View getView()
getView
in interface com.scichart.core.framework.IHitTestable
public void layoutArea(int left, int top, int right, int bottom)
SciChartSurface
layoutArea
in interface ILayoutable
left
- left position of area relative to parent SciChartSurface
top
- top position of area relative to parent SciChartSurface
right
- right position of area relative to parent SciChartSurface
bottom
- bottom position of area relative to parent SciChartSurface
protected void onSizeChanged(int w, int h, int oldw, int oldh)
w
- New width of axis in pixelsh
- New height of axis in pixelsoldw
- Old width of axis in pixelsoldh
- Old height of axi in pixelspublic final android.graphics.Rect getLayoutRect()
Rect
with layout placementgetLayoutRect
in interface ILayoutable
public final int getLayoutWidth()
getLayoutWidth
in interface ILayoutable
public final int getLayoutHeight()
getLayoutHeight
in interface ILayoutable