scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
27 lines (26 loc) • 1.54 kB
TypeScript
import { EHorizontalAnchorPoint, EVerticalAnchorPoint } from "../../../types/AnchorPoint";
import { EAngularAxisLabelPlacement, ERadialAxisLabelPlacement } from "../../../types/LabelPlacement";
import { EPolarLabelMode } from "../Axis/Polar/types/PolarLabelMode";
declare function radiansToDegrees(r: number): number;
declare function normalizeAngle(a: number): number;
/**
* Calculates label rotation for a polar chart with different label modes
* @param mode - One of the following polar label modes {@link EPolarLabelMode}
* @param angle - data point angle in radians
* @returns an angle in radians to apply for the label when drawing
*/
declare function getPolarLabelRotation(mode: EPolarLabelMode, angle: number): number;
declare function getLabelPlacementForRadialAxis(radialAxisLabelPlacement: ERadialAxisLabelPlacement): EVerticalAnchorPoint;
declare function getLabelRotationAndPlacementForAngularAxis(radians: number, labelMode: EPolarLabelMode, angularAxisLabelPlacement: EAngularAxisLabelPlacement): {
resultAngle: number;
horizontalAnchorPoint: EHorizontalAnchorPoint;
verticalAnchorPoint: EVerticalAnchorPoint;
};
export declare const labelHelper: {
getPolarLabelRotation: typeof getPolarLabelRotation;
radiansToDegrees: typeof radiansToDegrees;
getLabelPlacementForRadialAxis: typeof getLabelPlacementForRadialAxis;
getLabelRotationAndPlacementForAngularAxis: typeof getLabelRotationAndPlacementForAngularAxis;
normalizeAngle: typeof normalizeAngle;
};
export {};