UNPKG

scichart

Version:

Fast WebGL JavaScript Charting Library and Framework

74 lines (73 loc) 3.17 kB
import { Point } from "../../../Core/Point"; import { Rect } from "../../../Core/Rect"; import { ESurfaceType } from "../../../types/SurfaceType"; import { ModifierMouseArgs } from "../../ChartModifiers/ModifierMouseArgs"; import { WebGlRenderContext2D } from "../../Drawing/WebGlRenderContext2D"; import { CoordinateCalculatorBase } from "../../Numerics/CoordinateCalculators/CoordinateCalculatorBase"; import { ArcAnnotationBase, IArcAnnotationBaseOptions } from "./ArcAnnotationBase"; import { EAnnotationType } from "./IAnnotation"; export interface IPolarArcAnnotationOptions extends IArcAnnotationBaseOptions { /** * The X coordinate for the annotation center. If not provided is equal to xAxis.visibleRange.min */ centerX?: number; /** * The Y coordinate for the annotation center. If not provided is equal to yAxis.visibleRange.min */ centerY?: number; /** * @description the start angle of the annotation * @remarks The X1 coordinate obeys {@link xCoordinateMode} which defines whether the X1 coordinate is a pixel, data-value or relative coordinate */ x1?: number; /** * @description the end angle of the annotation * @remarks The X2 coordinate obeys {@link xCoordinateMode} which defines whether the X2 coordinate is a pixel, data-value or relative coordinate */ x2?: number; /** * @description the outer radius of the annotation * @remarks The Y1 coordinate obeys {@link yCoordinateMode} which defines whether the Y1 coordinate is a pixel, data-value or relative coordinate */ y1?: number; /** * @description the inner radius, is ignored for lineMode */ y2?: number; } /** * Does not support flipped radial axis */ export declare class PolarArcAnnotation extends ArcAnnotationBase { type: EAnnotationType; readonly surfaceTypes: ESurfaceType[]; private centerXProperty; private centerYProperty; constructor(options?: IPolarArcAnnotationOptions); get centerX(): number; set centerX(value: number); get centerY(): number; set centerY(value: number); drawWithContext(renderContext: WebGlRenderContext2D, xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, seriesViewRect: Rect, surfaceViewRect: Rect, chartViewRect: Rect): void; calcDragDistance(xyValues: Point): void; toJSON(): { type: EAnnotationType; options: Required<Omit<import("./AnnotationBase").IAnnotationBaseOptions, never>>; }; onDragStarted(args: ModifierMouseArgs): boolean; /** * Hit-test annotation clicked * @param xCoord * @param yCoord * @returns */ protected checkIsClickedOnAnnotationInternal(xCoord: number, yCoord: number): boolean; protected svgStringArcAdornerTemplate(x1: number, y1: number, x2: number, y2: number, xCenter: number, yCenter: number): string; private getRadius; private getInnerRadius; private calcAngleFromCoordinates; private transformAngles; private multByPixelRatio; private validateInnerRadius; private getAngleSign; }