Class SciChartSurface
Provides a high performance chart surface with a single IRenderSurface viewport for rendering multiple IRenderableSeries, X and Y IAxis instances, and where each IRenderableSeries may have a IDataSeries data source. The SciChartSurface may have zero or many IAnnotation and may have IChartModifier to enable interaction with the chart. Where many IChartModifier are used, you may use a ModifierGroupto group them.
Inheritance
Implements
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class SciChartSurface extends SciChartSurfaceBase implements ISciChartSurface
Constructors
SciChartSurface(Context context)
Declaration
public SciChartSurface(Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| Context | context |
SciChartSurface(Context context, AttributeSet attrs)
Declaration
public SciChartSurface(Context context, AttributeSet attrs)
Parameters
| Type | Name | Description |
|---|---|---|
| Context | context | |
| AttributeSet | attrs |
SciChartSurface(Context context, AttributeSet attrs, int defStyleAttr)
Declaration
public SciChartSurface(Context context, AttributeSet attrs, int defStyleAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| Context | context | |
| AttributeSet | attrs | |
| int | defStyleAttr |
Fields
invalidateElementListener
Declaration
protected final InvalidatableElementCallback invalidateElementListener
Field Value
| Type | Description |
|---|---|
| InvalidatableElementCallback |
renderableSeriesAreaBorder
Declaration
protected final SmartProperty<PenStyle> renderableSeriesAreaBorder
Field Value
| Type | Description |
|---|---|
| SmartProperty<PenStyle> |
renderableSeriesAreaFill
Declaration
protected final SmartProperty<BrushStyle> renderableSeriesAreaFill
Field Value
| Type | Description |
|---|---|
| SmartProperty<BrushStyle> |
Methods
addAxisModifierSurface(IAxisModifierSurface axisModifierSurface)
Used internally to add IAxisModifierSurface into this SciChartSurface
Declaration
public void addAxisModifierSurface(IAxisModifierSurface axisModifierSurface)
Parameters
| Type | Name | Description |
|---|---|---|
| IAxisModifierSurface | axisModifierSurface |
animateZoomExtents(long duration)
Zooms to extents with the specified animation duration
Declaration
public void animateZoomExtents(long duration)
Parameters
| Type | Name | Description |
|---|---|---|
| long | duration |
animateZoomExtentsX(long duration)
Zooms the chart to the extents of the data in the X-Direction
Declaration
public void animateZoomExtentsX(long duration)
Parameters
| Type | Name | Description |
|---|---|---|
| long | duration |
animateZoomExtentsY(long duration)
Zooms the chart to the extents of the data in the Y-Direction, accounting for the current data in view in the X-direction
Declaration
public void animateZoomExtentsY(long duration)
Parameters
| Type | Name | Description |
|---|---|---|
| long | duration |
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
Declaration
public void applyThemeProvider(IThemeProvider themeProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| IThemeProvider | themeProvider |
Overrides
exportToBitmap()
Exports snapshot of current ISciChartSurface to Bitmap
Declaration
public Bitmap exportToBitmap()
Returns
| Type | Description |
|---|---|
| Bitmap |
getAdornerLayer()
Gets the IAdornerLayer instance for this SciChartSurface
Declaration
public final IAdornerLayer getAdornerLayer()
Returns
| Type | Description |
|---|---|
| IAdornerLayer |
getAnnotationOverlaySurface()
Gets the IAnnotationSurface instance for this SciChartSurface which is placed over the chart
Declaration
public final IAnnotationSurface getAnnotationOverlaySurface()
Returns
| Type | Description |
|---|---|
| IAnnotationSurface |
getAnnotationUnderlaySurface()
Gets the IAnnotationSurface instance for this SciChartSurface which is placed under the chart
Declaration
public final IAnnotationSurface getAnnotationUnderlaySurface()
Returns
| Type | Description |
|---|---|
| IAnnotationSurface |
getAnnotations()
Gets the collection of IAnnotation that this SciChartSurface draws
Declaration
public final AnnotationCollection getAnnotations()
Returns
| Type | Description |
|---|---|
| AnnotationCollection |
getChartModifiers()
Gets the collection of IChartModifier that this SciChartSurface uses
Declaration
public final ChartModifierCollection getChartModifiers()
Returns
| Type | Description |
|---|---|
| ChartModifierCollection |
getDefaultRenderSurface(Context context)
Gets default IRenderSurface for this SciChartSurface
Declaration
protected IRenderSurface getDefaultRenderSurface(Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| Context | context | The context of application |
Returns
| Type | Description |
|---|---|
| IRenderSurface | The render surface |
getGestureState()
Gets the current GestureState for this surface
Declaration
public GestureState getGestureState()
Returns
| Type | Description |
|---|---|
| GestureState |
getLayoutManager()
Sets the ILayoutManager instance for this SciChartSurface
Declaration
public final layoutManagers.ILayoutManager getLayoutManager()
Returns
| Type | Description |
|---|---|
| layoutManagers.ILayoutManager |
getLock()
Declaration
public final ReadWriteLock getLock()
Returns
| Type | Description |
|---|---|
| ReadWriteLock |
getModifierSurface()
Gets the IChartModifierSurface instance for this SciChartSurface
Declaration
public final IChartModifierSurface getModifierSurface()
Returns
| Type | Description |
|---|---|
| IChartModifierSurface |
getRenderSurface()
Gets the IRenderSurface instance for this SciChartSurface
Declaration
public final IRenderSurface getRenderSurface()
Returns
| Type | Description |
|---|---|
| IRenderSurface |
getRenderableSeries()
Gets the collection of IRenderableSeries that this SciChartSurface draws
Declaration
public final RenderableSeriesCollection getRenderableSeries()
Returns
| Type | Description |
|---|---|
| RenderableSeriesCollection |
getRenderableSeriesArea()
Gets the IRenderableSeriesArea instance for this SciChartSurface
Declaration
public final IRenderableSeriesArea getRenderableSeriesArea()
Returns
| Type | Description |
|---|---|
| IRenderableSeriesArea |
getRenderableSeriesAreaBorderStyle()
Gets the border style for SciChartSurface#getRenderableSeriesArea()
Declaration
public final PenStyle getRenderableSeriesAreaBorderStyle()
Returns
| Type | Description |
|---|---|
| PenStyle |
getRenderableSeriesAreaFillStyle()
Gets the fill style for SciChartSurface#getRenderableSeriesArea()
Declaration
public final BrushStyle getRenderableSeriesAreaFillStyle()
Returns
| Type | Description |
|---|---|
| BrushStyle |
getSelectedRenderableSeries()
Gets the collection of IRenderableSeries that are selected
Declaration
public final RenderableSeriesCollection getSelectedRenderableSeries()
Returns
| Type | Description |
|---|---|
| RenderableSeriesCollection |
getViewportManager()
Sets the IViewportManager instance for this SciChartSurface
Declaration
public final viewportManagers.IViewportManager getViewportManager()
Returns
| Type | Description |
|---|---|
| viewportManagers.IViewportManager |
getXAxes()
Gets the collection of XAxes IAxis that this SciChartSurface draws
Declaration
public final AxisCollection getXAxes()
Returns
| Type | Description |
|---|---|
| AxisCollection |
getYAxes()
Gets the collection of YAxes IAxis that this SciChartSurface draws
Declaration
public final AxisCollection getYAxes()
Returns
| Type | Description |
|---|---|
| AxisCollection |
invalidateRenderSurface()
Declaration
protected void invalidateRenderSurface()
Overrides
isDisallowInterceptTouchEvent()
Gets the current state of touch interceptor.
true - This will allow touch events on this surfacefalse - This does not allow touch events on this surface
Declaration
public boolean isDisallowInterceptTouchEvent()
Returns
| Type | Description |
|---|---|
| boolean | current state of touch interceptor |
notifyRenderSurfaceChangedListeners()
Notifies listeners about change of SciChartSurface#setRenderSurface(IRenderSurface)
Declaration
protected void notifyRenderSurfaceChangedListeners()
onAttachedToWindow()
Declaration
protected void onAttachedToWindow()
Overrides
onDetachedFromWindow()
Declaration
protected void onDetachedFromWindow()
Overrides
onSciChartRendered(IRenderContext2D renderContext, IAssetManager2D assetManager, int renderLayer)
Called when rendering one of SciChartSurface layers
Declaration
public void onSciChartRendered(IRenderContext2D renderContext, IAssetManager2D assetManager, int renderLayer)
Parameters
| Type | Name | Description |
|---|---|---|
| IRenderContext2D | renderContext | |
| IAssetManager2D | assetManager | |
| int | renderLayer |
onSizeChanged(int w, int h, int oldw, int oldh)
Declaration
protected void onSizeChanged(int w, int h, int oldw, int oldh)
Parameters
| Type | Name | Description |
|---|---|---|
| int | w | |
| int | h | |
| int | oldw | |
| int | oldh |
Overrides
onTouchEvent(MotionEvent event)
Declaration
public boolean onTouchEvent(MotionEvent event)
Parameters
| Type | Name | Description |
|---|---|---|
| MotionEvent | event |
Returns
| Type | Description |
|---|---|
| boolean |
Overrides
registerServices(IServiceContainer container, Context context)
Declaration
protected void registerServices(IServiceContainer container, Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceContainer | container | |
| Context | context |
Overrides
removeAxisModifierSurface(IAxisModifierSurface axisModifierSurface)
Used internally to removes IAxisModifierSurface from this SciChartSurface
Declaration
public void removeAxisModifierSurface(IAxisModifierSurface axisModifierSurface)
Parameters
| Type | Name | Description |
|---|---|---|
| IAxisModifierSurface | axisModifierSurface |
setAnnotations(AnnotationCollection annotationCollection)
Sets the collection of IAnnotation that this SciChartSurface draws
Declaration
public final void setAnnotations(AnnotationCollection annotationCollection)
Parameters
| Type | Name | Description |
|---|---|---|
| AnnotationCollection | annotationCollection | The annotation collection |
setChartModifiers(ChartModifierCollection chartModifiers)
Sets the collection of IChartModifier that this SciChartSurface uses
Declaration
public final void setChartModifiers(ChartModifierCollection chartModifiers)
Parameters
| Type | Name | Description |
|---|---|---|
| ChartModifierCollection | chartModifiers | The chart modifier collection |
setDisallowInterceptTouchEvent(boolean disallowInterceptTouchEvent)
Sets the current state of touch interceptor.
true - This will allow touch events on this surfacefalse - This does not allow touch events on this surface
Declaration
public void setDisallowInterceptTouchEvent(boolean disallowInterceptTouchEvent)
Parameters
| Type | Name | Description |
|---|---|---|
| boolean | disallowInterceptTouchEvent | allow touch events on this surface |
setGestureState(GestureState gestureState)
Sets the GestureState for this surface
NOT_INTERACTED - Default state of this surfaceINTERACTED - There has been a touch, swipe or zoom event on this surface
Declaration
public void setGestureState(GestureState gestureState)
Parameters
| Type | Name | Description |
|---|---|---|
| GestureState | gestureState |
setLayoutManager(layoutManagers.ILayoutManager layoutManager)
Sets the ILayoutManager instance for this SciChartSurface
Declaration
public final void setLayoutManager(layoutManagers.ILayoutManager layoutManager)
Parameters
| Type | Name | Description |
|---|---|---|
| layoutManagers.ILayoutManager | layoutManager |
setRenderSurface(IRenderSurface renderSurface)
Sets the IRenderSurface instance for this SciChartSurface
Declaration
public final void setRenderSurface(IRenderSurface renderSurface)
Parameters
| Type | Name | Description |
|---|---|---|
| IRenderSurface | renderSurface |
setRenderableSeries(RenderableSeriesCollection renderableSeriesCollection)
Sets the collection of IRenderableSeries that this SciChartSurface draws
Declaration
public final void setRenderableSeries(RenderableSeriesCollection renderableSeriesCollection)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderableSeriesCollection | renderableSeriesCollection | The RenderableSeries collection |
setRenderableSeriesAreaBorderStyle(PenStyle borderStyle)
Sets the border style for SciChartSurface#getRenderableSeriesArea()
Declaration
public final void setRenderableSeriesAreaBorderStyle(PenStyle borderStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| PenStyle | borderStyle | The border style |
setRenderableSeriesAreaFillStyle(BrushStyle fillStyle)
Sets the fill style for SciChartSurface#getRenderableSeriesArea()
Declaration
public final void setRenderableSeriesAreaFillStyle(BrushStyle fillStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| BrushStyle | fillStyle | The fill style |
setRenderedListener(ISciChartSurfaceRenderedListener listener)
Sets the ISciChartSurfaceRenderedListener instance for this surface
Declaration
public void setRenderedListener(ISciChartSurfaceRenderedListener listener)
Parameters
| Type | Name | Description |
|---|---|---|
| ISciChartSurfaceRenderedListener | listener |
setRuntimeLicenseKey(String key)
Apply the runtime license key
Declaration
public static void setRuntimeLicenseKey(String key)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The license key |
Exceptions
| Type | Condition |
|---|---|
| Exception | Error occurred deserializing a license. |
setRuntimeLicenseKeyFromResource(Context context, int rawResource)
Apply the runtime license key
Declaration
public static void setRuntimeLicenseKeyFromResource(Context context, int rawResource)
Parameters
| Type | Name | Description |
|---|---|---|
| Context | context | The context of application |
| int | rawResource | The license key id |
Exceptions
| Type | Condition |
|---|---|
| Exception | Error occurred deserializing a license. |
setRuntimeLicenseKeyFromResource(Context context, String rawResourceName)
Apply the runtime license key
Declaration
public static void setRuntimeLicenseKeyFromResource(Context context, String rawResourceName)
Parameters
| Type | Name | Description |
|---|---|---|
| Context | context | The context of application |
| String | rawResourceName | The license key |
Exceptions
| Type | Condition |
|---|---|
| Exception | Error occurred deserializing a license. |
setViewportManager(viewportManagers.IViewportManager viewportManager)
Sets the IViewportManager instance for this SciChartSurface
Declaration
public final void setViewportManager(viewportManagers.IViewportManager viewportManager)
Parameters
| Type | Name | Description |
|---|---|---|
| viewportManagers.IViewportManager | viewportManager |
setXAxes(AxisCollection xAxes)
Sets the collection of XAxes IAxis that this SciChartSurface draws
Declaration
public final void setXAxes(AxisCollection xAxes)
Parameters
| Type | Name | Description |
|---|---|---|
| AxisCollection | xAxes | The XAxes collection |
setYAxes(AxisCollection yAxes)
Sets the collection of YAxes IAxis that this SciChartSurface draws
Declaration
public final void setYAxes(AxisCollection yAxes)
Parameters
| Type | Name | Description |
|---|---|---|
| AxisCollection | yAxes | The YAxes collection |
tryDeselectAnnotations()
Tries deselect all annotations from #getAnnotations() collections
Declaration
protected void tryDeselectAnnotations()
zoomExtents()
Zooms the chart to the extents of the data, plus any X or Y Grow By fraction set on the X and Y Axes
Declaration
public void zoomExtents()
zoomExtentsX()
Zooms the chart to the extents of the data in the X-Direction
Declaration
public void zoomExtentsX()
zoomExtentsY()
Zooms the chart to the extents of the data in the Y-Direction, accounting for the current data in view in the X-direction
Declaration
public void zoomExtentsY()