scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
88 lines (87 loc) • 3.54 kB
TypeScript
import { DeletableEntity } from "../../Core/DeletableEntity";
import { EventHandler } from "../../Core/EventHandler";
import { IDeletable } from "../../Core/IDeletable";
import { Rect } from "../../Core/Rect";
import { Size } from "../../types/Size";
import { TSciChartDestination } from "../../types/SurfaceDestination";
import { ESurfaceType } from "../../types/SurfaceType";
import { TSciChartSurfaceCanvases } from "../../types/TSciChartSurfaceCanvases";
import { IThemeProvider } from "../Themes/IThemeProvider";
import { ISciChartSurfaceBase } from "./ISciChartSurfaceBase";
export declare abstract class SciChartSurfaceCore extends DeletableEntity implements ISciChartSurfaceBase {
abstract surfaceType: ESurfaceType;
domChartRoot: HTMLDivElement;
domCanvas2D: HTMLCanvasElement;
/**
* The {@link SVGSVGElement} which is the SVG canvas which SciChart adds elements (tooltips, annotations) to
*/
domSvgContainer: SVGSVGElement;
/**
* The {@link SVGSVGElement} which is the SVG adorner layer canvas, is used for annotation adorners
*/
domSvgAdornerLayer: SVGSVGElement;
/**
* The {@link SVGSVGElement} placed on the background and could be used instead of {@link domSvgContainer}
*/
domBackgroundSvgContainer: SVGSVGElement;
/**
* The inner {@link HTMLDivElement} div element placed on the background
*/
domSeriesBackground: HTMLDivElement;
domDivContainer: HTMLDivElement;
/**
* 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.
*/
preRender: EventHandler<any>;
/**
* 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.
*/
rendered: EventHandler<boolean>;
/**
* An event handler which notifies its subscribers when a chart was visually painted a display canvas.
* @remarks Not applicable to sub-charts
*/
readonly painted: EventHandler<any>;
readonly resized: EventHandler<Size>;
protected idProperty: string;
protected isDeletedProperty: boolean;
protected deletables: IDeletable[];
protected destinations: TSciChartDestination[];
constructor(canvases: TSciChartSurfaceCanvases);
/**
* Gets or sets the SciChartSurface Id
*/
get id(): string;
/**
* Gets or sets the SciChartSurface Id
*/
set id(value: string);
/**
* Used internally - gets isDeleted flag
*/
get isDeleted(): boolean;
abstract get themeProvider(): IThemeProvider;
/**
* Used internally - gets other SciChartSurfaces
*/
get otherSurfaces(): ISciChartSurfaceBase[];
abstract get viewRect(): Rect;
/**
* @inheritDoc
*/
addDeletable(deletable: IDeletable): void;
abstract invalidateElement(options?: {
force?: boolean;
}): void;
abstract applyTheme(themeProvider: IThemeProvider): void;
/**
* Changes the Viewport Size of the {@link SciChartSurfaceBase}
* @param width
* @param height
*/
abstract changeViewportSize(width: number, height: number): void;
onResize(width: number, height: number): void;
protected getOtherSurfaces(): ISciChartSurfaceBase[];
}