UNPKG

942 BPlain TextView Raw
1import Chart from '../../chart';
2import Coord from '../../coord';
3import { AnimationCycle } from '../../canvas/animation/interface';
4import { SelectionProps } from './selection';
5
6export interface AttrRange {
7 shape?: any[];
8 color?: any[];
9 size?: any[];
10}
11
12export type GeomType = 'line' | 'point' | 'area' | 'polygon' | 'schema' | 'interval';
13
14interface Style {
15 [k: string]: any; // TODO
16}
17
18/**
19 * 几何标记对象的数据调整类型。
20 */
21export type GeometryAdjustType =
22 // 堆叠
23 | 'stack'
24 // 分组
25 | 'dodge'
26 // 对称
27 | 'symmetric';
28
29export type GeometryAdjust = {
30 type: GeometryAdjustType;
31 [k: string]: any;
32};
33
34export type AdjustConfig = GeometryAdjust | GeometryAdjustType;
35
36export interface GeometryProps extends SelectionProps {
37 data?: any;
38 adjust?: AdjustConfig;
39 chart?: Chart;
40 coord?: Coord;
41 startOnZero?: boolean;
42 style?: Style;
43 animation?: AnimationCycle;
44 [k: string]: any; // TODO
45}