Creates an instance of the SciChartSurface
The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and access to our WebGL2 Engine and WebAssembly numerical methods
optional parameters of type ISciChartSurfaceOptions used to configure the SciChartSurface
A ViewRect defining the bounds of the Annotation surface over the chart
A ViewRect defining the bounds of the Annotation surface under the chart
A ViewRect defining the bounds of the Chart Modifier Surface (an area for placing tooltips and overlays during mouse interaction)
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.
The {@link HTMLCanvasElement} which is the HTML5 canvas which SciChart draws overlays (cursors, tooltips) to
The {@link HTMLCanvasElement} which is the WebGL canvas that SciChart draws to
The {@link HTMLDivElement} which is the dom chart root
The inner {@link HTMLDivElement} div element
The {@link SVGSVGElement} which is the SVG adorner layer canvas, is used for annotation adorners
The {@link SVGSVGElement} which is the SVG canvas which SciChart adds elements (tooltips, annotations) to
The MouseManager subscribes to mouse events on the domChartRoot and routes them to components within SciChart
For serialization Only. The name of the onCreated function applied by the builder api
A propertyChanged EventHandler. See EventHandler for how to subscribe to and be notified when a property changes on the SciChartSurfaceBase
Used internally - the RenderContext2D for drawing
An event handler which notifies its subsribers when a render operation has finished. Use this to time render performance, or to update elements of the chart or your UI on redraw.
The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and access to our WebGL2 Engine and WebAssembly numerical methods
Global property defining whether the WebGL render target is anti-aliased or not. This will affect all SciChartSurfaces (2D & 3D) in the application.
Gets or sets the application-wide default theme. See IThemeProvider for details
The master WebGL canvas
Gets the adjusted padding between the SciChartSurface and it's inner elements, in order top, right, bottom, left Defines a resulting padding accordingly to DPI scaling.
Gets or sets the SciChartSurface Background as an HTML color code
Gets or sets the SciChartSurface Background as an HTML color code
Gets the SciChartSurface Canvas Bottom Border
Gets the SciChartSurface Viewport Bottom Border
Gets or sets a property whether rendering should be debugged. This will draw rectangles around key boxes and areas on the chart. Used internally for development purposes
Gets or sets a property whether rendering should be debugged. This will draw rectangles around key boxes and areas on the chart. Used internally for development purposes
Gets or sets the boolean flag for switching behaviour of Axises rendering
Gets or sets the boolean flag for switching behaviour of Axises rendering
Used internally - gets isDeleted flag
Used internally - gets isInitialized flag
Returns true if an animation is running
Gets a value indicating whether updates for the target are currently suspended
Gets or sets the LayoutManager
Used internally - gets or sets the LayoutManager
Gets the SciChartSurface Canvas Left Border
Gets the SciChartSurface Viewport Left Border
Used internally - gets other SciChartSurfaces
Used internally - gets the previous IThemeProvider
Gets the SciChartSurface Canvas Right Border
Gets the SciChartSurface Viewport Right Border
Gets the Series View Rect, a rectangle relative to the entire size of the SciChartSurfaceBase
A unique ID for this suspendable instance. Consider using the generateGuid function to ensure this is unique
Used internally - gets the previous IThemeProvider
Gets the SciChartSurface Canvas Top Border
Gets the SciChartSurface Viewport Top Border
Gets zoomStateProperty
Add a GenericAnimation to the surface. Multiple animations will be run in parallel, so if you want to run one after another, use the onCompleted callback to add another animation after the first completes
Applies a theme (defined by IThemeProvider) to the current element
The theme data to apply
Changes the Viewport Size of the SciChartSurfaceBase
Called by IUpdateSuspender each time a target suspender is resumed. When the final target suspender has been resumed, resumeUpdates is called
Deletes native (WebAssembly) memory used by this type, after which it cannot be used.
Used internally - draws SciChartSurface borders
Gets the generic animations currently on the surface. Do not manipulate this array directly. To add, use addAnimation. To remove, find an animation and call .cancel() on it.
Returns the seriesViewRect padding relative to the canvas
If True returns scaled values, if False divided by DpiHelper.PIXEL_RATIO Use not scaled values for SVG annotations and the Legend
Gets the XAxis which matches the axisId. Returns undefined if not axis found
The AxisId to search for
Gets the YAxis which matches the axisId. Returns undefined if not axis found
The AxisId to search for
The name of the property which has changed
Is being called on each render, to run animations
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
The TDpiChangedEventArgs containing info about the Dpi Changed event
USED INTERNALLY. Resumes updates on the target
Used internally - sets destinations
Used internally, the flag is set after SciChartSurfaceBase is initialized
Sets the Series View Rect, a rectangle relative to the entire size of the SciChartSurfaceBase
Sets zoomStateProperty
Suspends drawing updates on the target until the returned object IUpdateSuspender.resume is called, when a final draw call will be issued
Convert the object to a definition that can be serialized to JSON, or used directly with the builder api
if set true, data values will not be included in the json.
Used internally, updates background after switching between different SciChartSurfaces
Update accumulated vectors for all stacked collections
An optional animation duration. Default value is 0, which means 'no animation'
An optional easing function for animations. See TEasingFn for a list of values
the callback function
Allows setting of web URL for Wasm and Data files, in the case you are loading SciChart outside of npm/webpack environment. Note the version number of data/wasm Urls must match the version number of SciChart.js you are using. To use the default CDN, just call SciChart.SciChartSurface.useWasmFromCDN();
Creates a SciChartSurface and {@link TSciChart | WebAssembly Context} to occupy the div by element ID in your DOM.
The Div Element ID or reference where the SciChartSurface will reside
Optional - Optional parameters for chart creation. See I2DSurfaceOptions for more details
USED INTERNALLY - performs a similar operation to SciChartSurface.create but used internally for testing
The Div Element ID or reference where the SciChartSurface will reside
optional parameters for chart creation. See I2DSurfaceOptions for more details
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 ?
Sets the runtime license key. Use for full licenses or trials only, not developer licenses.
Sets the endpoint for validating a runtime license key with the server. Must be a relative path.
Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
Generated using TypeDoc
The SciChartSurface is the root 2D Chart control in SciChart's High Performance Real-time JavaScript Chart Library
To create a chart using SciChart, declare a SciChartSurface using SciChartSurface.create, add X and Y axes to the SciChartSurface.xAxes SciChartSurface.yAxes collection.
Next, add a series or chart type by adding a BaseRenderableSeries to the SciChartSurface.renderableSeries collection.
You can add annotations and markers using the SciChartSurface.annotations property, and you can add zoom and pan behaviours, tooltips and more by using the SciChartSurface.chartModifiers property.
To redraw a SciChartSurface at any time, call SciChartSurface.invalidateElement, however all properties are reactive and the chart will automatically redraw if data or properties change.
It is possible to have more than one SciChartSurface on screen at the same time. SciChartSurfaces scale to fit the parent DIV where they are hosted. Use CSS to position the DIV.