1 | import Layout from '../base/layout';
|
2 | import { Range, Point, Option } from './types';
|
3 | interface RectPoint {
|
4 | x: number | [number, number];
|
5 | y: number | [number, number];
|
6 | y0?: number;
|
7 | size?: number;
|
8 | }
|
9 | interface Rect {
|
10 | xMin: number;
|
11 | xMax: number;
|
12 | yMin: number;
|
13 | yMax: number;
|
14 | }
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | declare class Base extends Layout {
|
21 | type: string;
|
22 | isPolar: boolean;
|
23 | transposed: boolean;
|
24 | center: Point;
|
25 | x: Range;
|
26 | y: Range;
|
27 | constructor(option: Option);
|
28 | update(option: Option): this;
|
29 | isCyclic(): boolean;
|
30 | _zoomVal(val: any, func: any): any;
|
31 | /**
|
32 | * 把归一后的值映射到对应的定义域
|
33 | * @param point
|
34 | */
|
35 | convert(point: any): {
|
36 | x: any;
|
37 | y: any;
|
38 | };
|
39 | |
40 |
|
41 |
|
42 | invert(point: any): {
|
43 | [x: string]: any;
|
44 | };
|
45 | |
46 |
|
47 |
|
48 |
|
49 |
|
50 | convertPoint(point: any): {
|
51 | x: any;
|
52 | y: any;
|
53 | };
|
54 | |
55 |
|
56 |
|
57 | invertPoint(point: any): {
|
58 | [x: string]: any;
|
59 | };
|
60 | convertRect(rectPoint: RectPoint): Rect;
|
61 | transformToRect(rectPoint: RectPoint): Rect;
|
62 | }
|
63 | export default Base;
|