1 | import ScaleController from './scale';
|
2 | declare type AttrOption = {
|
3 | field?: string | Record<any, any>;
|
4 | range?: any[];
|
5 | };
|
6 | export declare type GroupAttr = 'color' | 'size' | 'shape';
|
7 | export declare type Attr = GroupAttr | 'x' | 'y';
|
8 | declare type AttrsRange = {
|
9 | [key: string]: any;
|
10 | };
|
11 | declare class AttrController {
|
12 | private scaleController;
|
13 | private options;
|
14 | attrs: any;
|
15 | attrsRange: any;
|
16 | constructor(scaleController: ScaleController, attrsRange: AttrsRange);
|
17 | parseOption(option: AttrOption, attrName: Attr): AttrOption | {
|
18 | type: string;
|
19 | field?: undefined;
|
20 | range?: undefined;
|
21 | } | {
|
22 | field: AttrOption & string;
|
23 | type: string;
|
24 | range?: undefined;
|
25 | } | {
|
26 | type: string;
|
27 | field: AttrOption & number;
|
28 | range?: undefined;
|
29 | } | {
|
30 | field: any;
|
31 | range: any;
|
32 | type?: undefined;
|
33 | };
|
34 | getAttrOptions(props: any, justifyContentCenter: boolean): {};
|
35 | getDefaultAttrValues(): {
|
36 | color: any;
|
37 | shape: any;
|
38 | };
|
39 | getGroupScales(): any[];
|
40 | private createAttr;
|
41 | create(options: any): void;
|
42 | update(nextOptions: any): void;
|
43 | getAttr(attrName: string): any;
|
44 | getAttrs(): any;
|
45 | isGroupAttr(attrName: GroupAttr): boolean;
|
46 | getAttrsByLinear(): {
|
47 | linearAttrs: any[];
|
48 | nonlinearAttrs: any[];
|
49 | };
|
50 | }
|
51 | export default AttrController;
|