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