Options
All
  • Public
  • Public/Protected
  • All
Menu
summary

The base class for a 2D Cartesian SciChartSurface or 3D Cartesian SciChart3DSurface within SciChart - High Performance Realtime JavaScript Charts

remarks

See derived types SciChartSurface (2D Charts) and SciChart3DSurface (3D Charts) for more specific instructions on how to use the SciChartSurface and create a 2D or 3D JavaScript Chart

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

Protected constructor

Properties

adornerLayer

adornerLayer: AdornerLayer

Readonly annotations

summary

Gets the collection of IAnnotation - annotations, markers or shapes drawn over the top of a SciChartSurface

description

A SciChartSurface can have zero to many Annotations.

The Annotations are drawn using our WebGL / WebAssembly rendering engine, but some use SVG for maximum configurability. See derived types of IAnnotation such as BoxAnnotation, LineAnnotation etc...

Use this collection to add and remove Annotations to the chart.

remarks

Adding an Annotation to the chart causes it to automatically redraw. Note that annotations do not pariticpate in autoranging, meaning a chart will zoom to fit data and chart series but not annotations

Protected backgroundProperty

backgroundProperty: string

Readonly chartModifiers

An ObservableArray of IChartModifierBase derived types. Chart Modifiers provide behavior such as zooming, panning, tooltips, legends and more in SciChart's High Performance Realtime JavaScript Charts. You can use our built in modifiers (see derived types of ChartModifierBase, or create your own for custom interaction behavior.

Protected cleanupLockToken

cleanupLockToken: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

Protected createSuspended

createSuspended: boolean

Protected deletables

deletables: IDeletable[] = []

Protected destinations

destinations: TSciChartDestination[]

Protected disableAspect

disableAspect: boolean

domBackgroundSvgContainer

domBackgroundSvgContainer: SVGSVGElement

The {@link SVGSVGElement} placed on the background and could be used instead of domSvgContainer

domCanvas2D

domCanvas2D: HTMLCanvasElement

domCanvasWebGL

domCanvasWebGL: HTMLCanvasElement

The {@link HTMLCanvasElement} which is the WebGL canvas that SciChart draws to

domChartRoot

domChartRoot: HTMLDivElement

domDivContainer

domDivContainer: HTMLDivElement

domSeriesBackground

domSeriesBackground: HTMLDivElement

The inner {@link HTMLDivElement} div element placed on the background

domSvgAdornerLayer

domSvgAdornerLayer: SVGSVGElement

The {@link SVGSVGElement} which is the SVG adorner layer canvas, is used for annotation adorners

domSvgContainer

domSvgContainer: SVGSVGElement

The {@link SVGSVGElement} which is the SVG canvas which SciChart adds elements (tooltips, annotations) to

genericAnimationsRun

genericAnimationsRun: EventHandler<any> = new EventHandler<any>()

An event handler which notifies its subscribers when animations stage in render process has finished.

hasInvalidState

hasInvalidState: boolean = false

Protected heightAspect

heightAspect: number

Protected idProperty

idProperty: string = generateGuid()

Protected isDeletedProperty

isDeletedProperty: boolean = false

Protected isInitializedProperty

isInitializedProperty: boolean = false

Abstract isInvalidated

isInvalidated: boolean

isWebGLContextActive

isWebGLContextActive: boolean = true

layoutMeasured

layoutMeasured: EventHandler<any> = new EventHandler<any>()

An event handler which notifies its subscribers when a layout stage in render process has finished.

Protected loaderJson

loaderJson: any

Readonly modifierAnnotations

modifierAnnotations: ObservableArray<IAnnotation>
summary

Gets the collection of IAnnotation - modifier annotations, markers or shapes drawn over the top of a SciChartSurface

description

A SciChartSurface can have zero to many Annotations.

The Annotations are drawn using our WebGL / WebAssembly rendering engine, but some use SVG for maximum configurability. See derived types of IAnnotation such as BoxAnnotation, LineAnnotation etc...

Use this collection to add and remove Modifier Annotations to the chart.

remarks

Adding an Modifier Annotation to the chart causes it to automatically redraw. Note that annotations do not pariticpate in autoranging, meaning a chart will zoom to fit data and chart series but not annotations

mouseManager

mouseManager: MouseManager

The MouseManager subscribes to mouse events on the domChartRoot and routes them to components within SciChart

onCreatedName

onCreatedName: string

For serialization Only. The name of the onCreated function applied by the builder api

Readonly painted

painted: EventHandler<any> = new EventHandler<any>()

An event handler which notifies its subscribers when a chart was visually painted a display canvas.

remarks

Not applicable to sub-charts

preRender

preRender: EventHandler<any> = new EventHandler<any>()

An event handler which notifies its subscribers when a render operation starts. Use this to update elements of the chart for the current render. Any updates made here will not trigger a subsequent render.

Protected previousThemeProviderProperty

previousThemeProviderProperty: IThemeProvider = SciChartSurfaceBase.DEFAULT_THEME

Readonly propertyChanged

A propertyChanged EventHandler. See EventHandler for how to subscribe to and be notified when a property changes on the SciChartSurfaceBase

redrawRequested

redrawRequested: EventHandler<boolean> = new EventHandler<boolean>()

An event handler which notifies its subscribers when a chart was requested to redraw initially.

Readonly renderError

renderError: EventHandler<any> = new EventHandler<any>()

rendered

rendered: EventHandler<boolean> = new EventHandler<boolean>()

An event handler which notifies its subscribers when a render operation has finished. Use this to time render performance, or to update elements of the chart or your UI on redraw.

renderedToDestination

renderedToDestination: EventHandler<any> = new EventHandler<any>()

An event handler which notifies its subscribers when a chart was rendered to a display canvas.

remarks

Not applicable to sub-charts

renderedToWebGl

renderedToWebGl: EventHandler<any> = new EventHandler<any>()

An event handler which notifies its subscribers when a chart was rendered to WebgL Canvas.

remarks

Not applicable to sub-charts

Readonly resized

resized: EventHandler<Size> = new EventHandler<Size>()

Readonly suspender

suspender: UpdateSuspender = new UpdateSuspender()

Protected themeProviderProperty

themeProviderProperty: IThemeProvider = SciChartSurfaceBase.DEFAULT_THEME

Protected touchActionProperty

touchActionProperty: string

Protected visibilityObserver

visibilityObserver: VisibilityObserver

Protected widthAspect

widthAspect: number

Static AntiAliasWebGlBackbuffer

AntiAliasWebGlBackbuffer: boolean = false

Global property defining whether the WebGL render target is anti-aliased or not. This will affect all SciChartSurfaces (2D & 3D) in the application.

remarks

Defaults to FALSE for crisp gridlines and lines. Individual line series and text labels are chart parts are automatically anti-aliased

Static DEFAULT_THEME

DEFAULT_THEME: IThemeProvider = new SciChartJSDarkv2Theme()

Gets or sets the application-wide default theme. See IThemeProvider for details

Static autoDisposeWasmContext

autoDisposeWasmContext: boolean = false

Defines if the shared wasmContext (WebAssembly Context) should be deleted after all of the surfaces that use it are deleted.

Static domMasterCanvas

domMasterCanvas: HTMLCanvasElement

The master WebGL canvas

remarks

WARNING: Do not set this property, this is set internally by SciChart when initializing mutliple charts

Static invalidateOnTabVisible

invalidateOnTabVisible: boolean = true

Defines if charts should rerender when the tab becomes active.

remarks

Enabled by default. Purpose of this behavior is to deal with the issue of canvas data being cleared on an inactive tab .

Static wasmContextDisposeTimeout

wasmContextDisposeTimeout: number = 0

Defines a delay of the shared wasmContext auto-dispose if autoDisposeWasmContext is enabled.

Accessors

background

  • get background(): string
  • set background(background: string): void
  • Gets or sets the SciChartSurface Background as an HTML color code

    remarks

    Allowable values are colors e.g. 'Red', '#FF00FF', 'rgba(255,0,0,1)'. Also, main surface background supports gradients 'linear-gradient(45deg, rgb(255,0,0,1), rgb(0,0,255,1))', or background images e.g. 'url('https://somewebsite.com/someimage.png')'. Sub-charts, however, support only basic formats.

    Returns string

  • Gets or sets the SciChartSurface Background as an HTML color code

    remarks

    Allowable values are colors e.g. 'Red', '#FF00FF', 'rgba(255,0,0,1)'. Also, main surface background supports gradients 'linear-gradient(45deg, rgb(255,0,0,1), rgb(0,0,255,1))', or background images e.g. 'url('https://somewebsite.com/someimage.png')'. Sub-charts, however, support only basic formats.

    Parameters

    • background: string

      The HTML color code

    Returns void

chartModifierGroups

  • get chartModifierGroups(): string[]
  • Gets Chart Modifier Groups, is used for sharing events between chart modifiers

    Returns string[]

chartViewRect

  • get chartViewRect(): Rect
  • Gets the viewRect of the entire chart, e.g. parent surface of a sub-chart

    Returns Rect

clipRect

  • get clipRect(): Rect
  • Returns Rect

freezeWhenOutOfView

  • get freezeWhenOutOfView(): boolean
  • set freezeWhenOutOfView(freezeWhenOutOfView: boolean): void
  • When true, charts that are out of the viewport will be frozen (pausing rendering). Data updates can resume Once the chart is in view again, rendering will resume. This can be useful for performance optimization.

    Returns boolean

  • When true, charts that are out of the viewport will be frozen (pausing rendering). Data updates can resume Once the chart is in view again, rendering will resume. This can be useful for performance optimization.

    Parameters

    • freezeWhenOutOfView: boolean

    Returns void

id

  • get id(): string
  • set id(value: string): void
  • Gets or sets the SciChartSurface Id

    Returns string

  • Gets or sets the SciChartSurface Id

    Parameters

    • value: string

    Returns void

isCopyCanvasSurface

  • get isCopyCanvasSurface(): HTMLCanvasElement
  • Returns HTMLCanvasElement

isDeleted

  • get isDeleted(): boolean
  • Used internally - gets isDeleted flag

    Returns boolean

isInitialized

  • get isInitialized(): boolean
  • Used internally - gets isInitialized flag

    Returns boolean

isPolar

  • get isPolar(): boolean
  • Returns boolean

isSuspended

  • get isSuspended(): boolean
  • Gets a value indicating whether updates for the target are currently suspended

    inheritdoc

    Returns boolean

otherSurfaces

previousThemeProvider

seriesViewRect

  • get seriesViewRect(): Rect
  • Gets the Series View Rect, a rectangle relative to the entire size of the SciChartSurfaceBase

    Returns Rect

surfaceType

themeProvider

viewRect

  • get viewRect(): Rect

Methods

addDeletable

Protected applyOptions

  • Parameters

    Returns void

applyTheme

Protected attachChartModifier

Protected changeMasterCanvasViewportSize

  • changeMasterCanvasViewportSize(wasmContext: TSciChart | TSciChart3D, pixelWidth: number, pixelHeight: number): void
  • Parameters

    Returns void

Abstract changeViewportSize

  • changeViewportSize(width: number, height: number): void

Protected changeWebGLCanvasViewportSize

  • changeWebGLCanvasViewportSize(wasmContext: TSciChart | TSciChart3D, pixelWidth: number, pixelHeight: number): void
  • Parameters

    Returns void

Protected clearRootElement

  • clearRootElement(clearHtml: boolean): void
  • Parameters

    • clearHtml: boolean

    Returns void

delete

  • delete(clearHtml?: boolean): void
  • Deletes native (WebAssembly) memory used by this type, after which it cannot be used.

    Parameters

    • Default value clearHtml: boolean = true

    Returns void

Protected detachChartModifier

Abstract getDefaultXAxis

  • getDefaultXAxis(): AxisCore | undefined
  • Gets the default XAxis, which is the first X axis attached to the surface.

    Returns AxisCore | undefined

Abstract getDefaultYAxis

  • getDefaultYAxis(): AxisCore | undefined
  • Gets the default YAxis, which is the first Y axis attached to the surface.

    Returns AxisCore | undefined

getLicenseContext

  • getLicenseContext(): { SCRTCredentials: { ApplyLicenseResponse: (response: string) => number; Dump: () => string; GetAllowDebugging: () => boolean; GetDeveloperCount: () => number; GetEncryptedOrderId: () => string; GetLicenseChallenge: () => string; GetLicenseDaysRemaining: () => number; GetLicenseErrors: () => string; GetLicenseType: () => SCRTLicenseType; GetOrderId: () => string; GetProductCode: () => string; HasFeature: (feature: string) => SCRTLicenseType; RequiresValidation: () => boolean; ResetRuntimeLicense: () => void; SetRuntimeLicenseKeyW: (licenseKey: string) => void }; SCRTLicenseType: { LICENSE_TYPE_COMMUNITY: SCRTLicenseType; LICENSE_TYPE_FULL: SCRTLicenseType; LICENSE_TYPE_FULL_EXPIRED: SCRTLicenseType; LICENSE_TYPE_INVALID_DEVELOPER_LICENSE: SCRTLicenseType; LICENSE_TYPE_INVALID_LICENSE: SCRTLicenseType; LICENSE_TYPE_NO_LICENSE: SCRTLicenseType; LICENSE_TYPE_REQUIRES_VALIDATION: SCRTLicenseType; LICENSE_TYPE_SUBSCRIPTION_EXPIRED: SCRTLicenseType; LICENSE_TYPE_TRIAL: SCRTLicenseType; LICENSE_TYPE_TRIAL_EXPIRED: SCRTLicenseType } }
  • Returns { SCRTCredentials: { ApplyLicenseResponse: (response: string) => number; Dump: () => string; GetAllowDebugging: () => boolean; GetDeveloperCount: () => number; GetEncryptedOrderId: () => string; GetLicenseChallenge: () => string; GetLicenseDaysRemaining: () => number; GetLicenseErrors: () => string; GetLicenseType: () => SCRTLicenseType; GetOrderId: () => string; GetProductCode: () => string; HasFeature: (feature: string) => SCRTLicenseType; RequiresValidation: () => boolean; ResetRuntimeLicense: () => void; SetRuntimeLicenseKeyW: (licenseKey: string) => void }; SCRTLicenseType: { LICENSE_TYPE_COMMUNITY: SCRTLicenseType; LICENSE_TYPE_FULL: SCRTLicenseType; LICENSE_TYPE_FULL_EXPIRED: SCRTLicenseType; LICENSE_TYPE_INVALID_DEVELOPER_LICENSE: SCRTLicenseType; LICENSE_TYPE_INVALID_LICENSE: SCRTLicenseType; LICENSE_TYPE_NO_LICENSE: SCRTLicenseType; LICENSE_TYPE_REQUIRES_VALIDATION: SCRTLicenseType; LICENSE_TYPE_SUBSCRIPTION_EXPIRED: SCRTLicenseType; LICENSE_TYPE_TRIAL: SCRTLicenseType; LICENSE_TYPE_TRIAL_EXPIRED: SCRTLicenseType } }

    • SCRTCredentials: { ApplyLicenseResponse: (response: string) => number; Dump: () => string; GetAllowDebugging: () => boolean; GetDeveloperCount: () => number; GetEncryptedOrderId: () => string; GetLicenseChallenge: () => string; GetLicenseDaysRemaining: () => number; GetLicenseErrors: () => string; GetLicenseType: () => SCRTLicenseType; GetOrderId: () => string; GetProductCode: () => string; HasFeature: (feature: string) => SCRTLicenseType; RequiresValidation: () => boolean; ResetRuntimeLicense: () => void; SetRuntimeLicenseKeyW: (licenseKey: string) => void }
      • ApplyLicenseResponse: (response: string) => number
          • (response: string): number
          • Parameters

            • response: string

            Returns number

      • Dump: () => string
          • (): string
          • Returns string

      • GetAllowDebugging: () => boolean
          • (): boolean
          • Returns boolean

      • GetDeveloperCount: () => number
          • (): number
          • Returns number

      • GetEncryptedOrderId: () => string
          • (): string
          • Returns string

      • GetLicenseChallenge: () => string
          • (): string
          • Returns string

      • GetLicenseDaysRemaining: () => number
          • (): number
          • Returns number

      • GetLicenseErrors: () => string
          • (): string
          • Returns string

      • GetLicenseType: () => SCRTLicenseType
          • (): SCRTLicenseType
          • Returns SCRTLicenseType

      • GetOrderId: () => string
          • (): string
          • Returns string

      • GetProductCode: () => string
          • (): string
          • Returns string

      • HasFeature: (feature: string) => SCRTLicenseType
          • (feature: string): SCRTLicenseType
          • Parameters

            • feature: string

            Returns SCRTLicenseType

      • RequiresValidation: () => boolean
          • (): boolean
          • Returns boolean

      • ResetRuntimeLicense: () => void
          • (): void
          • Returns void

      • SetRuntimeLicenseKeyW: (licenseKey: string) => void
          • (licenseKey: string): void
          • Parameters

            • licenseKey: string

            Returns void

    • SCRTLicenseType: { LICENSE_TYPE_COMMUNITY: SCRTLicenseType; LICENSE_TYPE_FULL: SCRTLicenseType; LICENSE_TYPE_FULL_EXPIRED: SCRTLicenseType; LICENSE_TYPE_INVALID_DEVELOPER_LICENSE: SCRTLicenseType; LICENSE_TYPE_INVALID_LICENSE: SCRTLicenseType; LICENSE_TYPE_NO_LICENSE: SCRTLicenseType; LICENSE_TYPE_REQUIRES_VALIDATION: SCRTLicenseType; LICENSE_TYPE_SUBSCRIPTION_EXPIRED: SCRTLicenseType; LICENSE_TYPE_TRIAL: SCRTLicenseType; LICENSE_TYPE_TRIAL_EXPIRED: SCRTLicenseType }
      • LICENSE_TYPE_COMMUNITY: SCRTLicenseType
      • LICENSE_TYPE_FULL: SCRTLicenseType
      • LICENSE_TYPE_FULL_EXPIRED: SCRTLicenseType
      • LICENSE_TYPE_INVALID_DEVELOPER_LICENSE: SCRTLicenseType
      • LICENSE_TYPE_INVALID_LICENSE: SCRTLicenseType
      • LICENSE_TYPE_NO_LICENSE: SCRTLicenseType
      • LICENSE_TYPE_REQUIRES_VALIDATION: SCRTLicenseType
      • LICENSE_TYPE_SUBSCRIPTION_EXPIRED: SCRTLicenseType
      • LICENSE_TYPE_TRIAL: SCRTLicenseType
      • LICENSE_TYPE_TRIAL_EXPIRED: SCRTLicenseType

getMainCanvas

  • getMainCanvas(): HTMLCanvasElement

Protected getOtherSurfaces

Abstract getSeriesViewRectPadding

  • getSeriesViewRectPadding(scaled: boolean): Thickness
  • Parameters

    • scaled: boolean

    Returns Thickness

Abstract getXAxisById

  • getXAxisById(axisId: string): AxisCore | undefined
  • Gets the XAxis which matches the axisId. Returns undefined if not axis found

    Parameters

    • axisId: string

      The AxisId to search for

    Returns AxisCore | undefined

Abstract getYAxisById

  • getYAxisById(axisId: string): AxisCore | undefined
  • Gets the YAxis which matches the axisId. Returns undefined if not axis found

    Parameters

    • axisId: string

      The AxisId to search for

    Returns AxisCore | undefined

Abstract invalidateElement

  • invalidateElement(options?: { force?: boolean; svgOnly?: boolean }): void
  • Call invalidateElement() to trigger a redraw of the SciChartSurfaceBase. SciChart's WebGL WebAssembly rendering engine will schedule a redraw a the next time the renderer is free.

    Parameters

    • Optional options: { force?: boolean; svgOnly?: boolean }
      • Optional force?: boolean
      • Optional svgOnly?: boolean

    Returns void

nextStateRender

  • nextStateRender(options?: { invalidateOnResume?: boolean; resumeBefore?: boolean; suspendAfter?: boolean }): Promise<void>
  • Creates a promise which resolves when the chart is updated to the next fully rendered state

    remarks

    If the surface is initialized with createSingle the promise resolves after the main render function is executed. Otherwise, if it is initialized with create - the promise resolves after image data is copied to the 2D canvas.

    Parameters

    • Optional options: { invalidateOnResume?: boolean; resumeBefore?: boolean; suspendAfter?: boolean }
      • Optional invalidateOnResume?: boolean
      • Optional resumeBefore?: boolean
      • Optional suspendAfter?: boolean

    Returns Promise<void>

Protected notifyPropertyChanged

  • notifyPropertyChanged(propertyName: string): void
  • summary

    Notifies subscribers of SciChartSurfaceBase.propertyChanged that a property has changed and the chart requires redrawing

    description

    SciChart provides fully reactive components, changing any property or changing data will cause the SciChartSurfaceBase to redraw where necessary. This method notifies subscribers of the SciChartSurfaceBase.propertyChanged EventHandler that a property has changed.

    Parameters

    • propertyName: string

      The name of the property which has changed

    Returns void

onDpiChanged

  • Called when the Dpi changes in the browser. This could be due to user zooming the browser, or changing DPI settings in Windows, or moving the browser containing SciChart to another monitor

    Parameters

    Returns void

onResize

  • onResize(width: number, height: number): void

resumeUpdates

  • resumeUpdates(options?: { force?: boolean; invalidateOnResume?: boolean }): void
  • inheritdoc

    Parameters

    • Optional options: { force?: boolean; invalidateOnResume?: boolean }
      • Optional force?: boolean
      • Optional invalidateOnResume?: boolean

    Returns void

setDestinations

  • Used internally - sets destinations

    Parameters

    Returns void

setIsInitialized

  • setIsInitialized(): void

setSeriesViewRect

  • setSeriesViewRect(seriesViewRect: Rect): void
  • Sets the Series View Rect, a rectangle relative to the entire size of the SciChartSurfaceBase

    Parameters

    • seriesViewRect: Rect

      a Rect which defines the portion of the view for drawing series

    Returns void

setSvgClipPathDefinitions

  • setSvgClipPathDefinitions(svgElement: SVGSVGElement, seriesViewRect: Rect, surfaceViewRect: Rect): void
  • Adds or updates clipPath definitions on an SVG canvas

    Parameters

    • svgElement: SVGSVGElement
    • seriesViewRect: Rect
    • surfaceViewRect: Rect

    Returns void

suspendUpdates

  • suspendUpdates(): void

Abstract updateWatermark

  • updateWatermark(left: number, bottom: number): void
  • Used internally - updates watermark

    Parameters

    • left: number
    • bottom: number

    Returns void

Static UseCommunityLicense

  • UseCommunityLicense(): void
  • Causes SciChart to always use its built in community non-commercial license. This stops it attempting to look for the license wizard Usage of the community license constitutes acceptance of the terms at https://www.scichart.com/community-licensing/

    Returns void

Static disposeSharedWasmContext

  • disposeSharedWasmContext(): void

Static resolveOptions

Static setLicenseCallback

  • setLicenseCallback(callback: (queryString: string) => Promise<Response>): void
  • Sets function that will be called by the framework to validate a runtime license from the server, if you need to add additional handling, such as custom authentication. The request sent to the server must include the queryString section passed in, which does not come with a leading ?

    Parameters

    • callback: (queryString: string) => Promise<Response>
        • (queryString: string): Promise<Response>
        • Parameters

          • queryString: string

          Returns Promise<Response>

    Returns void

Static setRuntimeLicenseKey

  • setRuntimeLicenseKey(keyCode: string): void
  • Sets the runtime license key. Use for full licenses or trials only, not developer licenses.

    Parameters

    • keyCode: string

    Returns void

Static setServerLicenseEndpoint

  • setServerLicenseEndpoint(endpoint: string): void
  • Sets the endpoint for validating a runtime license key with the server. Must be a relative path.

    default

    api/license

    Parameters

    • endpoint: string

    Returns void

Generated using TypeDoc