UNPKG

scichart

Version:

Fast WebGL JavaScript Charting Library and Framework

85 lines (84 loc) 3.9 kB
import { ISubChartDefinition } from "../../Builder/buildSurface"; import { Rect } from "../../Core/Rect"; import { Thickness } from "../../Core/Thickness"; import { ESubChartClippingMode } from "../../types/SubChartClippingMode"; import { TSubSurfaceCoordinateMode } from "../../types/SubSurfaceCoordinateMode"; import { TSubSurfacePosition } from "../../types/SubSurfacePosition"; import { BrushCache } from "../Drawing/BrushCache"; import { ISciChartSurface } from "./ISciChartSurface"; export interface ISciChartSubSurface extends ISciChartSurface { /** * The {@link HTMLDivElement} which is the dom sub-chart root */ readonly subChartContainer: HTMLDivElement; /** * The parent {@link ISciChartSurface}, if this is a subChart */ readonly parentSurface: ISciChartSurface; /** * Gets the adjusted padding between the SciChartSurface and its inner elements, in order top, right, bottom, left * Defines a resulting padding accordingly to DPI scaling. */ readonly adjustedPadding: Thickness; offset: Thickness | undefined; topSectionClass: string; leftSectionClass: string; bottomSectionClass: string; rightSectionClass: string; /** * Gets or Sets whether other surfaces, including the parent, will be visible underneath this surface */ isTransparent: boolean; /** * Gets or sets the {@link ECoordinateMode} used when calculating the actual position based on the {@link subPosition} */ coordinateMode: TSubSurfaceCoordinateMode; /** * Gets or sets the parent chart AxisId used to determine which X Axis should be used when calculating the actual position based on the {@link subPosition} * if {@link coordinateMode} is DataValue */ parentXAxisId: string; /** * Gets or sets the parent chart AxisId used to determine which Y Axis should be used when calculating the actual position based on the {@link subPosition} * if {@link coordinateMode} is DataValue */ parentYAxisId: string; /** * A rectangle defining the position and size of a subchart. * If {@link coordinateMode} is Relative (the default) then the values give the size as a proportion of the parent div, and all properties must be between 0 and 1 inclusive. * If {@link coordinateMode} is DataValue, values will be converted to coordinates using {@link parentXAxisId} and {@link parentYAxisId}. Subchart will be clpped to the parent SeriesViewRect * Can only be set if this is a subChart. */ subPosition: TSubSurfacePosition; /** * Gets or sets if the clipping mode of the sub-chart */ clippingMode: ESubChartClippingMode; /** * Gets or sets if the subchart is visible, allowing you to hide a subchart without removing it from the parent surface */ isVisible: boolean; /** * Gets or sets scale property for all sections * It is necessary if the scale transformation is being used for html areas around the subchart * For example, style = { width: "50%", transform: scale(2), transformOrigin: 'left top' } */ sectionScale: number; /** * Used internally */ backgroundFillBrushCache: BrushCache; /** * Recalculate the position of the subChart. Call if you update the size of html elements in the wrapper */ updateSubLayout(isDrawing?: boolean): void; /** * Gets the sub-chart container */ getSubChartContainer(): HTMLDivElement; /** Gets the sub-chart rect on the parent surface. Defines the viewport size of the sub-surface. * TThis rect is a subset of the {@link SciChartSubSurface.subPosition} considering the SubChart Wrapper content areas */ getSubChartRect(): Rect; toJSON(excludeData: boolean): ISubChartDefinition; }