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

Protected constructor

  • Creates an instance of a SciChartSurfaceBase

    Parameters

    • webAssemblyContext: TSciChart | TSciChart3D

      The {@link TSciChart | SciChart 2D WebAssembly Context} or {@link TSciChart | SciChart 3D WebAssembly Context} containing native methods and access to our WebGL2 WebAssembly Rendering Engine

    • Default value canvases: TSciChartSurfaceCanvases = {}

      A list of TSciChartSurfaceCanvases to draw to

    Returns SciChartSurfaceBase

Properties

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 destinations

destinations: TSciChartDestination[]

Readonly domCanvas2D

domCanvas2D: HTMLCanvasElement

The {@link HTMLCanvasElement} which is the HTML5 canvas which SciChart draws overlays (cursors, tooltips) to

Readonly domCanvasWebGL

domCanvasWebGL: HTMLCanvasElement

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

Readonly domChartRoot

domChartRoot: HTMLDivElement

The {@link HTMLDivElement} which is the dom chart root

Readonly domDivContainer

domDivContainer: HTMLDivElement

The inner {@link HTMLDivElement} div element

Readonly domSvgAdornerLayer

domSvgAdornerLayer: SVGSVGElement

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

Readonly domSvgContainer

domSvgContainer: SVGSVGElement

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

Protected heightAspect

heightAspect: number

Readonly id

id: string = generateGuid()

Protected isDeletedProperty

isDeletedProperty: boolean = false

Protected isInitializedProperty

isInitializedProperty: boolean = false

Protected loaderJson

loaderJson: any

Readonly 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

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

Protected themeProviderProperty

themeProviderProperty: IThemeProvider = SciChartSurfaceBase.DEFAULT_THEME

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 domMasterCanvas

domMasterCanvas: HTMLCanvasElement

The master WebGL canvas

remarks

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

Accessors

background

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

    Returns string

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

    Parameters

    • background: 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

isSuspended

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

    inheritdoc

    Returns boolean

otherSurfaces

  • Used internally - gets other SciChartSurfaces

    Returns SciChartSurfaceBase[]

previousThemeProvider

seriesViewRect

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

    Returns Rect

surfaceType

  • Gets the Surface Type. See ESurfaceType for list of values

    Returns ESurfaceType

suspendableId

  • get suspendableId(): string
  • A unique ID for this suspendable instance. Consider using the generateGuid function to ensure this is unique

    inheritdoc

    Returns string

themeProvider

Methods

addDeletable

Protected applyOptions

  • Parameters

    Returns void

Protected Abstract applySciChartBackground

  • applySciChartBackground(htmlColor: string, alphaEnabled?: boolean): void
  • When overridden in a derived type, applies an HTML color code or CSS background to surface background

    remarks

    Allowable values are colors e.g. 'Red', '#FF00FF', 'rgba(255,0,0,1)'. Also 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')'

    Parameters

    • htmlColor: string

      The HTML color code

    • Optional alphaEnabled: boolean

    Returns void

applyTheme

Protected attachChartModifier

Protected changeMasterCanvasViewportSize

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

    • wasmContext: TSciChart | TSciChart3D
    • pixelWidth: number
    • pixelHeight: number

    Returns void

Abstract changeViewportSize

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

Protected changeWebGLCanvasViewportSize

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

    • wasmContext: TSciChart | TSciChart3D
    • pixelWidth: number
    • pixelHeight: number

    Returns void

decrementSuspend

  • decrementSuspend(): void
  • Called by IUpdateSuspender each time a target suspender is resumed. When the final target suspender has been resumed, resumeUpdates is called

    Returns void

delete

  • delete(clearHtml?: boolean): void
  • inheritdoc

    Parameters

    • Default value clearHtml: boolean = true

    Returns void

Protected detachChartModifier

getMainCanvas

  • getMainCanvas(): HTMLCanvasElement
  • Returns HTMLCanvasElement

Abstract invalidateElement

  • invalidateElement(): 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.

    Returns 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

resumeUpdates

setDestinations

  • Used internally - sets destinations

    Parameters

    Returns void

setIsInitialized

  • setIsInitialized(): void
  • Used internally, the flag is set after SciChartSurfaceBase is initialized

    Returns 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

suspendUpdates

updateBackground

  • updateBackground(): void
  • Used internally, updates background after switching between different SciChartSurfaces

    Returns void

Abstract updateWatermark

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

    Parameters

    • left: number
    • bottom: number

    Returns 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