UNPKG

scichart

Version:

Fast WebGL JavaScript Charting Library and Framework

24 lines (23 loc) 1.3 kB
import { ECoordinateMode } from "../Charting/Visuals/Annotations/AnnotationBase"; import { Branded } from "./brand"; declare const __coordinateType: unique symbol; export declare type TCoordinate = Branded<number, "Coordinate">; export declare type TTypedCoordinate<TBrand> = TCoordinate & { [__coordinateType]: TBrand; }; /** Coordinate in the plane of Data values and Visible Range */ export declare type TDataValueCoordinate = TTypedCoordinate<"DataValue">; /** CSS pixel coordinate */ export declare type TPixelCoordinate = TTypedCoordinate<"Pixel">; /** A coordinate type relative to an axis viewportDimension */ export declare type TRelativeCoordinate = TTypedCoordinate<"Relative">; /** Canvas "BackBuffer" coordinate (Pixel Coordinate value multiplied by DpiHelper.PIXEL_RATIO) */ export declare type TAbsoluteCoordinate = TTypedCoordinate<"Absolute">; /** Coordinate represented with a value corresponding to the selected coordinate mode */ export declare type TTargetModeCoordinate = TDataValueCoordinate | TPixelCoordinate | TRelativeCoordinate; export declare type TCoordinateTypeForMode = { [ECoordinateMode.DataValue]: TDataValueCoordinate; [ECoordinateMode.Pixel]: TPixelCoordinate; [ECoordinateMode.Relative]: TRelativeCoordinate; }; export {};