UNPKG

1.73 kBTypeScriptView Raw
1/**
2 * @fileOverview The axis of polar coordinate system
3 */
4import React, { PureComponent } from 'react';
5import { BaseAxisProps, TickItem, PresentationAttributesAdaptChildEvent } from '../util/types';
6export interface PolarRadiusAxisProps extends Omit<BaseAxisProps, 'unit'> {
7 cx?: number;
8 cy?: number;
9 radiusAxisId?: string | number;
10 angle?: number;
11 orientation?: 'left' | 'right' | 'middle';
12 ticks?: TickItem[];
13 reversed?: boolean;
14}
15export type Props = PresentationAttributesAdaptChildEvent<any, SVGElement> & PolarRadiusAxisProps;
16export declare class PolarRadiusAxis extends PureComponent<Props> {
17 static displayName: string;
18 static axisType: string;
19 static defaultProps: {
20 type: string;
21 radiusAxisId: number;
22 cx: number;
23 cy: number;
24 angle: number;
25 orientation: string;
26 stroke: string;
27 axisLine: boolean;
28 tick: boolean;
29 tickCount: number;
30 allowDataOverflow: boolean;
31 scale: string;
32 allowDuplicatedCategory: boolean;
33 };
34 /**
35 * Calculate the coordinate of tick
36 * @param {Number} coordinate The radius of tick
37 * @return {Object} (x, y)
38 */
39 getTickValueCoord({ coordinate }: TickItem): import("../util/types").Coordinate;
40 getTickTextAnchor(): string;
41 getViewBox(): {
42 cx: number;
43 cy: number;
44 startAngle: number;
45 endAngle: number;
46 innerRadius: number;
47 outerRadius: number;
48 };
49 renderAxisLine(): React.JSX.Element;
50 static renderTickItem(option: Props['tick'], props: any, value: string | number): React.JSX.Element;
51 renderTicks(): React.JSX.Element;
52 render(): React.JSX.Element;
53}