import { Rect } from "../../../Core/Rect"; import { EHorizontalAnchorPoint, EVerticalAnchorPoint } from "../../../types/AnchorPoint"; import { EStrokeLineJoin } from "../../../types/PolarPointerAnnotation/StrokeLineJoin"; import { TPointerArrowStyle } from "../../../types/PolarPointerAnnotation/TPointerArrowStyle"; import { TPointerCenterStyle } from "../../../types/PolarPointerAnnotation/TPointerCenterStyle"; import { TPointerStyle } from "../../../types/PolarPointerAnnotation/TPointerStyle"; import { ESurfaceType } from "../../../types/SurfaceType"; import { CoordinateCalculatorBase } from "../../Numerics/CoordinateCalculators/CoordinateCalculatorBase"; import { ECoordinateMode } from "./AnnotationBase"; import { EAnnotationType } from "./IAnnotation"; import { ISvgAnnotationBaseOptions, SvgAnnotationBase } from "./SvgAnnotationBase"; /** * Optional parameters passed to an {@link PolarPointerAnnotation} during construction */ export interface IPolarPointerAnnotationOptions extends ISvgAnnotationBaseOptions { /** * @description the rotation of the pointer * @remarks The rotation obeys {@link xCoordinateMode}, for {@link ECoordinateMode.DataValue} the units are data-value, otherwise radians */ x1?: number; /** * @description the length of the pointer * @remarks The length obeys {@link xCoordinateMode} which defines whether the length is a pixel, data-value or relative coordinate */ y1?: number; /** * The rotation mode. See {@link ECoordinateMode} for a list of values * @remarks Sets the units being used for rotation {@link x1} it could be data units or radians */ xCoordinateMode?: ECoordinateMode; /** * The length mode. See {@link ECoordinateMode} for a list of values * @remarks Sets the units being used for length {@link y1} it could be data units, pixels or relative units */ yCoordinateMode?: ECoordinateMode; /** Defines the style of the pointer stick as a {@link TPointerStyle} object */ pointerStyle?: TPointerStyle; /** Defines the style of the pointer center circle as a {@link TPointerCenterStyle} object */ pointerCenterStyle?: TPointerCenterStyle; /** Defines the style of the pointer tip as a {@link TPointerArrowStyle} object */ pointerArrowStyle?: TPointerArrowStyle; /** * Definition: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linejoin * * Default {@link EStrokeLineJoin.Miter} */ strokeLineJoin?: EStrokeLineJoin; /** * Whether the pointer stick should be above or below the center circle */ isStrokeAboveCenter?: boolean; } /** * A PolarPointerAnnotation presents an SVG pointer over the chart at 0, 0 coordinates */ export declare class PolarPointerAnnotation extends SvgAnnotationBase { /** @inheritDoc */ readonly type = EAnnotationType.SVGPolarPointerAnnotation; /** @inheritDoc */ readonly surfaceTypes: ESurfaceType[]; private isDirty; private isStrokeAboveCenterProperty; private strokeLineJoinProperty; private state; private pointerStyleProperty; private getPointerStyleProxy; private pointerCenterStyleProperty; private getPointerCenterStyleProxy; private pointerArrowStyleProperty; private getPointerArrowStyleProxy; /** * Creates an instance of the {@link PolarPointerAnnotation} * @param options The {@link IPolarPointerAnnotationOptions} which contain optional parameters */ constructor(options?: IPolarPointerAnnotationOptions); /** * Gets or sets the style of the pointer center circle as a {@link TPointerStyle} object * To customise the pointer fully, override getPointerStickSvg */ get pointerStyle(): TPointerStyle; set pointerStyle(value: TPointerStyle); /** * Gets or sets the style of the pointer center circle as a {@link TPointerStyle} object * To customise the pointer center fully, override getPointerCenterSvg */ get pointerCenterStyle(): TPointerCenterStyle; set pointerCenterStyle(value: TPointerCenterStyle); /** * Gets or sets the style of the pointer arrow as a {@link TPointerArrowStyle} object * To customise the pointer arrow fully, override getPointerArrowSvg */ get pointerArrowStyle(): TPointerArrowStyle; set pointerArrowStyle(value: TPointerArrowStyle); get horizontalAnchorPoint(): EHorizontalAnchorPoint; get verticalAnchorPoint(): EVerticalAnchorPoint; /** * Whether the pointer stick should be above or below the center circle */ get isStrokeAboveCenter(): boolean; set isStrokeAboveCenter(value: boolean); /** * @description The SVG stroke-linejoin attribute specifies the shape to be used at the corners of paths or basic shapes when they are stroked. * @link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linejoin */ get strokeLineJoin(): EStrokeLineJoin; set strokeLineJoin(value: EStrokeLineJoin); private getAngularAxis; private getRadialAxis; /** This is called to get the svg string to use. Override this to customise the svg string for each render */ getSvgString(annotation: PolarPointerAnnotation): string; getPointerStickSvg(pointerLength: number, pointerWidth: number, backExtensionSize: number): string; getPointerCenterSvg(pointerLength: number, centerSize: number): string; getPointerArrowSvg(pointerLength: number, height: number, width: number, headDepth: number): string; protected notifyPropertyChanged(propertyName: string): void; /** @inheritDoc */ toJSON(): { type: EAnnotationType; options: Required>; }; /** @inheritDoc */ protected getX1Coordinate(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): number; /** @inheritDoc */ protected getY1Coordinate(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): number; protected getState(): { axisSize: number; startAngle: number; direction: number; seriesViewRect: Rect; }; /** @inheritDoc */ protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void; }