UNPKG

2.44 kBTypeScriptView Raw
1import Selection, { SelectionState } from './selection';
2import { Adjust } from '@antv/adjust';
3import { GeomType, GeometryProps } from './interface';
4import AttrController from '../../controller/attr';
5import { AnimationCycle } from '../../canvas/animation/interface';
6import { Scale } from '@antv/scale';
7export interface AdjustProp {
8 type: string;
9 adjust: Adjust;
10}
11declare class Geometry<P extends GeometryProps = GeometryProps, S extends SelectionState = SelectionState> extends Selection<P, S> {
12 isGeometry: boolean;
13 geomType: GeomType;
14 attrs: any;
15 adjust: AdjustProp;
16 dataArray: any;
17 records: any[];
18 mappedArray: any;
19 justifyContent: boolean;
20 startOnZero: boolean;
21 connectNulls: boolean;
22 sortable: boolean;
23 attrController: AttrController;
24 animation: AnimationCycle;
25 getDefaultCfg(): {};
26 constructor(props: P, context?: any);
27 willReceiveProps(nextProps: any): void;
28 willMount(): void;
29 willUpdate(): void;
30 didMount(): void;
31 _createAttrs(): void;
32 _getThemeAttrsRange(): {
33 x: import("../../coord/types").Range;
34 y: import("../../coord/types").Range;
35 color: any;
36 size: any;
37 shape: any;
38 };
39 _adjustScales(): void;
40 _groupData(data: any): any[];
41 _saveOrigin(originData: any): any[];
42 _numberic(data: any): void;
43 _adjustData(records: any): any;
44 _updateStackRange(field: any, scale: any, dataArray: any): void;
45 _processData(): void;
46 _sortData(records: any): void;
47 _initEvent(): void;
48 getY0Value(): any;
49 _getShapeStyle(shape: any, origin: any): any;
50 /**
51 * 数据映射到视图属性核心逻辑
52 * x、y 每个元素走 normalize 然后 convertPoint
53 * color、size、shape
54 * 如果是Linear,则每个元素 走 mapping
55 * 如果是Category/Identity 则第一个元素走 mapping
56 */
57 _mapping(records: any): any;
58 mapping(): any[];
59 getClip(): {
60 type: string;
61 attrs: {
62 x: number;
63 y: number;
64 width: number;
65 height: number;
66 };
67 };
68 getAttr(attrName: string): any;
69 getXScale(): Scale;
70 getYScale(): Scale;
71 _getXSnap(invertPointX: any): any;
72 _getYSnapRecords(invertPointY: any, records: any): any;
73 flatRecords(): any;
74 getSnapRecords(point: any, inCoordRange?: any): any[];
75 getLegendItems(): any;
76}
77export default Geometry;