1 |
|
2 |
|
3 |
|
4 | export type AdjustType =
|
5 |
|
6 | | 'stack'
|
7 |
|
8 | | 'dodge'
|
9 |
|
10 | | 'symmetric';
|
11 |
|
12 | export interface AdjustCommonProps<TAdjustType extends AdjustType> {
|
13 | |
14 |
|
15 |
|
16 | type: TAdjustType;
|
17 |
|
18 | readonly adjustNames?: string[];
|
19 | readonly xField?: string;
|
20 | readonly yField?: string;
|
21 | }
|
22 |
|
23 | export type StackAdjustProps = AdjustCommonProps<'stack'>;
|
24 |
|
25 | export interface DodgeAdjustProps extends AdjustCommonProps<'dodge'> {
|
26 | readonly marginRatio?: number;
|
27 | readonly dodgeRatio?: number;
|
28 | }
|
29 |
|
30 | export type SymmetricAdjustProps = AdjustCommonProps<'symmetric'>;
|
31 |
|
32 | export type AdjustProps = StackAdjustProps | DodgeAdjustProps | SymmetricAdjustProps;
|