1 | import { DIRECTION } from '../constant';
|
2 | import { Coordinate, Scale } from '../dependents';
|
3 | import { AxisCfg, AxisOption, Point, Region } from '../interface';
|
4 | /**
|
5 | * @ignore
|
6 | * get axis relative region ( 0 ~ 1) by direction when coordinate is rect
|
7 | * @param direction
|
8 | * @returns axis coordinate region
|
9 | */
|
10 | export declare function getLineAxisRelativeRegion(direction: DIRECTION): Region;
|
11 | /**
|
12 | * @ignore
|
13 | * get axis relative region ( 0 ~ 1) by direction when coordinate is polar
|
14 | * @param coordinate
|
15 | * @returns axis coordinate region
|
16 | */
|
17 | export declare function getCircleAxisRelativeRegion(coordinate: Coordinate): {
|
18 | start: any;
|
19 | end: any;
|
20 | };
|
21 | /**
|
22 | * @ignore
|
23 | * get the axis region from coordinate
|
24 | * @param coordinate
|
25 | * @param direction
|
26 | * @returns the axis region (start point, end point)
|
27 | */
|
28 | export declare function getAxisRegion(coordinate: Coordinate, direction: DIRECTION): Region;
|
29 | /**
|
30 | * @ignore
|
31 | * get axis factor
|
32 | * @param coordinate
|
33 | * @param direction
|
34 | * @returns factor
|
35 | */
|
36 | export declare function getAxisFactor(coordinate: Coordinate, direction: DIRECTION): number;
|
37 | /**
|
38 | * @ignore
|
39 | * whether the axis isVertical
|
40 | * @param region
|
41 | * @returns isVertical
|
42 | */
|
43 | export declare function isVertical(region: Region): boolean;
|
44 | /**
|
45 | * @ignore
|
46 | * get factor by region (real position)
|
47 | * @param region
|
48 | * @param center
|
49 | * @returns factor
|
50 | */
|
51 | export declare function getAxisFactorByRegion(region: Region, center: Point): number;
|
52 | /**
|
53 | * @ignore
|
54 | * get the axis cfg from theme, will mix the common cfg of legend theme
|
55 | *
|
56 | * @param theme view theme object
|
57 | * @param direction axis direction
|
58 | * @returns axis theme cfg
|
59 | */
|
60 | export declare function getAxisThemeCfg(theme: object, direction: string): object;
|
61 | /**
|
62 | * get the options of axis title,mix the cfg from theme, avoid common themeCfg not work
|
63 | * @param theme
|
64 | * @param direction
|
65 | * @param axisOptions
|
66 | * @returns axis title options
|
67 | */
|
68 | export declare function getAxisTitleOptions(theme: object, direction: string, axisOptions?: object): object;
|
69 | /**
|
70 | * @ignore
|
71 | * get circle axis center and radius
|
72 | * @param coordinate
|
73 | */
|
74 | export declare function getCircleAxisCenterRadius(coordinate: Coordinate): {
|
75 | center: any;
|
76 | radius: number;
|
77 | startAngle: number;
|
78 | endAngle: number;
|
79 | };
|
80 | /**
|
81 | * @ignore
|
82 | * 从配置中获取单个字段的 axis 配置
|
83 | * @param axes
|
84 | * @param field
|
85 | * @returns the axis option of field
|
86 | */
|
87 | export declare function getAxisOption(axes: Record<string, AxisOption> | boolean, field: string): any;
|
88 | /**
|
89 | * @ignore
|
90 | * 如果配置了 position,则使用配置
|
91 | * @param axisOption
|
92 | * @param def
|
93 | */
|
94 | export declare function getAxisDirection(axisOption: AxisOption, def: DIRECTION): DIRECTION;
|
95 | /**
|
96 | * 获取 axis 的 title 文本
|
97 | * @param scale
|
98 | * @param axisOption
|
99 | */
|
100 | export declare function getAxisTitleText(scale: Scale, axisOption: AxisCfg): string;
|