@antv/g2plot 2.4.8 → 2.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/dist/g2plot.min.js +4 -4
- package/dist/g2plot.min.js.map +1 -1
- package/esm/core/plot.d.ts +2 -2
- package/esm/core/plot.js +4 -3
- package/esm/core/plot.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +2 -2
- package/esm/index.js.map +1 -1
- package/esm/plots/area/types.d.ts +35 -10
- package/esm/plots/area/types.js.map +1 -1
- package/esm/plots/bar/types.d.ts +16 -3
- package/esm/plots/bar/types.js.map +1 -1
- package/esm/plots/bidirectional-bar/types.d.ts +21 -6
- package/esm/plots/bidirectional-bar/types.js.map +1 -1
- package/esm/plots/box/types.d.ts +20 -6
- package/esm/plots/box/types.js.map +1 -1
- package/esm/plots/bullet/types.d.ts +36 -9
- package/esm/plots/bullet/types.js.map +1 -1
- package/esm/plots/chord/types.d.ts +14 -10
- package/esm/plots/chord/types.js.map +1 -1
- package/esm/plots/circle-packing/types.d.ts +25 -8
- package/esm/plots/circle-packing/types.js.map +1 -1
- package/esm/plots/column/types.d.ts +57 -16
- package/esm/plots/column/types.js.map +1 -1
- package/esm/plots/dual-axes/types.d.ts +31 -6
- package/esm/plots/dual-axes/types.js.map +1 -1
- package/esm/plots/facet/types.d.ts +54 -34
- package/esm/plots/facet/types.js.map +1 -1
- package/esm/plots/funnel/types.d.ts +40 -11
- package/esm/plots/funnel/types.js.map +1 -1
- package/esm/plots/gauge/types.d.ts +83 -21
- package/esm/plots/gauge/types.js.map +1 -1
- package/esm/plots/heatmap/types.d.ts +47 -12
- package/esm/plots/heatmap/types.js.map +1 -1
- package/esm/plots/histogram/types.d.ts +17 -6
- package/esm/plots/histogram/types.js.map +1 -1
- package/esm/plots/line/types.d.ts +42 -12
- package/esm/plots/line/types.js.map +1 -1
- package/esm/plots/liquid/index.d.ts +1 -0
- package/esm/plots/liquid/index.js +1 -0
- package/esm/plots/liquid/index.js.map +1 -1
- package/esm/plots/liquid/shapes/liquid.d.ts +16 -1
- package/esm/plots/liquid/shapes/liquid.js +13 -8
- package/esm/plots/liquid/shapes/liquid.js.map +1 -1
- package/esm/plots/liquid/types.d.ts +56 -16
- package/esm/plots/liquid/types.js.map +1 -1
- package/esm/plots/mix/types.d.ts +31 -22
- package/esm/plots/mix/types.js.map +1 -1
- package/esm/plots/pie/types.d.ts +27 -10
- package/esm/plots/pie/types.js.map +1 -1
- package/esm/plots/progress/types.d.ts +13 -4
- package/esm/plots/progress/types.js.map +1 -1
- package/esm/plots/radar/types.d.ts +39 -12
- package/esm/plots/radar/types.js.map +1 -1
- package/esm/plots/radial-bar/types.d.ts +39 -12
- package/esm/plots/radial-bar/types.js.map +1 -1
- package/esm/plots/ring-progress/types.d.ts +18 -6
- package/esm/plots/ring-progress/types.js.map +1 -1
- package/esm/plots/rose/types.d.ts +32 -12
- package/esm/plots/rose/types.js.map +1 -1
- package/esm/plots/sankey/types.d.ts +51 -32
- package/esm/plots/sankey/types.js.map +1 -1
- package/esm/plots/scatter/types.d.ts +76 -22
- package/esm/plots/scatter/types.js.map +1 -1
- package/esm/plots/stock/types.d.ts +20 -7
- package/esm/plots/stock/types.js.map +1 -1
- package/esm/plots/sunburst/types.d.ts +40 -12
- package/esm/plots/sunburst/types.js.map +1 -1
- package/esm/plots/tiny-area/types.d.ts +16 -5
- package/esm/plots/tiny-area/types.js.map +1 -1
- package/esm/plots/tiny-column/types.d.ts +10 -3
- package/esm/plots/tiny-column/types.js.map +1 -1
- package/esm/plots/tiny-line/types.d.ts +17 -5
- package/esm/plots/tiny-line/types.js.map +1 -1
- package/esm/plots/treemap/types.d.ts +17 -6
- package/esm/plots/treemap/types.js.map +1 -1
- package/esm/plots/venn/types.d.ts +20 -6
- package/esm/plots/venn/types.js.map +1 -1
- package/esm/plots/violin/types.d.ts +52 -17
- package/esm/plots/violin/types.js.map +1 -1
- package/esm/plots/waterfall/types.d.ts +42 -10
- package/esm/plots/waterfall/types.js.map +1 -1
- package/esm/plots/word-cloud/types.d.ts +91 -44
- package/esm/plots/word-cloud/types.js.map +1 -1
- package/esm/types/button.d.ts +8 -4
- package/esm/types/button.js.map +1 -1
- package/esm/types/common.d.ts +145 -33
- package/esm/types/common.js.map +1 -1
- package/esm/types/drill-down.d.ts +28 -7
- package/esm/types/drill-down.js.map +1 -1
- package/esm/types/interaction.d.ts +26 -6
- package/esm/types/interaction.js.map +1 -1
- package/esm/types/label.d.ts +11 -3
- package/esm/types/label.js.map +1 -1
- package/esm/types/meta.d.ts +4 -7
- package/esm/types/meta.js.map +1 -1
- package/esm/types/pattern.d.ts +58 -18
- package/esm/types/pattern.js.map +1 -1
- package/esm/types/state.d.ts +11 -3
- package/esm/types/state.js.map +1 -1
- package/esm/types/statistic.d.ts +38 -6
- package/esm/types/statistic.js.map +1 -1
- package/esm/types/tooltip.d.ts +7 -2
- package/esm/types/tooltip.js.map +1 -1
- package/lib/core/plot.d.ts +2 -2
- package/lib/core/plot.js +4 -3
- package/lib/core/plot.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/plots/area/types.d.ts +35 -10
- package/lib/plots/area/types.js.map +1 -1
- package/lib/plots/bar/types.d.ts +16 -3
- package/lib/plots/bar/types.js.map +1 -1
- package/lib/plots/bidirectional-bar/types.d.ts +21 -6
- package/lib/plots/bidirectional-bar/types.js.map +1 -1
- package/lib/plots/box/types.d.ts +20 -6
- package/lib/plots/box/types.js.map +1 -1
- package/lib/plots/bullet/types.d.ts +36 -9
- package/lib/plots/bullet/types.js.map +1 -1
- package/lib/plots/chord/types.d.ts +14 -10
- package/lib/plots/chord/types.js.map +1 -1
- package/lib/plots/circle-packing/types.d.ts +25 -8
- package/lib/plots/circle-packing/types.js.map +1 -1
- package/lib/plots/column/types.d.ts +57 -16
- package/lib/plots/column/types.js.map +1 -1
- package/lib/plots/dual-axes/types.d.ts +31 -6
- package/lib/plots/dual-axes/types.js.map +1 -1
- package/lib/plots/facet/types.d.ts +54 -34
- package/lib/plots/facet/types.js.map +1 -1
- package/lib/plots/funnel/types.d.ts +40 -11
- package/lib/plots/funnel/types.js.map +1 -1
- package/lib/plots/gauge/types.d.ts +83 -21
- package/lib/plots/gauge/types.js.map +1 -1
- package/lib/plots/heatmap/types.d.ts +47 -12
- package/lib/plots/heatmap/types.js.map +1 -1
- package/lib/plots/histogram/types.d.ts +17 -6
- package/lib/plots/histogram/types.js.map +1 -1
- package/lib/plots/line/types.d.ts +42 -12
- package/lib/plots/line/types.js.map +1 -1
- package/lib/plots/liquid/index.d.ts +1 -0
- package/lib/plots/liquid/index.js +2 -0
- package/lib/plots/liquid/index.js.map +1 -1
- package/lib/plots/liquid/shapes/liquid.d.ts +16 -1
- package/lib/plots/liquid/shapes/liquid.js +14 -7
- package/lib/plots/liquid/shapes/liquid.js.map +1 -1
- package/lib/plots/liquid/types.d.ts +56 -16
- package/lib/plots/liquid/types.js.map +1 -1
- package/lib/plots/mix/types.d.ts +31 -22
- package/lib/plots/mix/types.js.map +1 -1
- package/lib/plots/pie/types.d.ts +27 -10
- package/lib/plots/pie/types.js.map +1 -1
- package/lib/plots/progress/types.d.ts +13 -4
- package/lib/plots/progress/types.js.map +1 -1
- package/lib/plots/radar/types.d.ts +39 -12
- package/lib/plots/radar/types.js.map +1 -1
- package/lib/plots/radial-bar/types.d.ts +39 -12
- package/lib/plots/radial-bar/types.js.map +1 -1
- package/lib/plots/ring-progress/types.d.ts +18 -6
- package/lib/plots/ring-progress/types.js.map +1 -1
- package/lib/plots/rose/types.d.ts +32 -12
- package/lib/plots/rose/types.js.map +1 -1
- package/lib/plots/sankey/types.d.ts +51 -32
- package/lib/plots/sankey/types.js.map +1 -1
- package/lib/plots/scatter/types.d.ts +76 -22
- package/lib/plots/scatter/types.js.map +1 -1
- package/lib/plots/stock/types.d.ts +20 -7
- package/lib/plots/stock/types.js.map +1 -1
- package/lib/plots/sunburst/types.d.ts +40 -12
- package/lib/plots/sunburst/types.js.map +1 -1
- package/lib/plots/tiny-area/types.d.ts +16 -5
- package/lib/plots/tiny-area/types.js.map +1 -1
- package/lib/plots/tiny-column/types.d.ts +10 -3
- package/lib/plots/tiny-column/types.js.map +1 -1
- package/lib/plots/tiny-line/types.d.ts +17 -5
- package/lib/plots/tiny-line/types.js.map +1 -1
- package/lib/plots/treemap/types.d.ts +17 -6
- package/lib/plots/treemap/types.js.map +1 -1
- package/lib/plots/venn/types.d.ts +20 -6
- package/lib/plots/venn/types.js.map +1 -1
- package/lib/plots/violin/types.d.ts +52 -17
- package/lib/plots/violin/types.js.map +1 -1
- package/lib/plots/waterfall/types.d.ts +42 -10
- package/lib/plots/waterfall/types.js.map +1 -1
- package/lib/plots/word-cloud/types.d.ts +91 -44
- package/lib/plots/word-cloud/types.js.map +1 -1
- package/lib/types/button.d.ts +8 -4
- package/lib/types/button.js.map +1 -1
- package/lib/types/common.d.ts +145 -33
- package/lib/types/common.js.map +1 -1
- package/lib/types/drill-down.d.ts +28 -7
- package/lib/types/drill-down.js.map +1 -1
- package/lib/types/interaction.d.ts +26 -6
- package/lib/types/interaction.js.map +1 -1
- package/lib/types/label.d.ts +11 -3
- package/lib/types/label.js.map +1 -1
- package/lib/types/meta.d.ts +4 -7
- package/lib/types/meta.js.map +1 -1
- package/lib/types/pattern.d.ts +58 -18
- package/lib/types/pattern.js.map +1 -1
- package/lib/types/state.d.ts +11 -3
- package/lib/types/state.js.map +1 -1
- package/lib/types/statistic.d.ts +38 -6
- package/lib/types/statistic.js.map +1 -1
- package/lib/types/tooltip.d.ts +7 -2
- package/lib/types/tooltip.js.map +1 -1
- package/package.json +1 -1
- package/src/core/plot.ts +5 -4
- package/src/index.ts +2 -2
- package/src/plots/area/types.ts +35 -10
- package/src/plots/bar/types.ts +16 -3
- package/src/plots/bidirectional-bar/types.ts +21 -6
- package/src/plots/box/types.ts +20 -6
- package/src/plots/bullet/types.ts +36 -17
- package/src/plots/chord/types.ts +14 -11
- package/src/plots/circle-packing/types.ts +25 -14
- package/src/plots/column/types.ts +57 -20
- package/src/plots/dual-axes/types.ts +31 -16
- package/src/plots/facet/types.ts +54 -49
- package/src/plots/funnel/types.ts +40 -13
- package/src/plots/gauge/types.ts +86 -27
- package/src/plots/heatmap/types.ts +49 -14
- package/src/plots/histogram/types.ts +17 -9
- package/src/plots/line/types.ts +42 -14
- package/src/plots/liquid/index.ts +2 -0
- package/src/plots/liquid/shapes/liquid.ts +16 -8
- package/src/plots/liquid/types.ts +56 -16
- package/src/plots/mix/types.ts +31 -35
- package/src/plots/pie/types.ts +27 -10
- package/src/plots/progress/types.ts +13 -4
- package/src/plots/radar/types.ts +39 -12
- package/src/plots/radial-bar/types.ts +39 -12
- package/src/plots/ring-progress/types.ts +18 -6
- package/src/plots/rose/types.ts +32 -12
- package/src/plots/sankey/types.ts +52 -32
- package/src/plots/scatter/types.ts +77 -24
- package/src/plots/stock/types.ts +21 -8
- package/src/plots/sunburst/types.ts +42 -12
- package/src/plots/tiny-area/types.ts +16 -5
- package/src/plots/tiny-column/types.ts +10 -3
- package/src/plots/tiny-line/types.ts +17 -5
- package/src/plots/treemap/types.ts +17 -7
- package/src/plots/venn/types.ts +21 -6
- package/src/plots/violin/types.ts +52 -17
- package/src/plots/waterfall/types.ts +42 -10
- package/src/plots/word-cloud/types.ts +91 -44
- package/src/types/button.ts +8 -4
- package/src/types/common.ts +145 -37
- package/src/types/drill-down.ts +28 -7
- package/src/types/interaction.ts +26 -6
- package/src/types/label.ts +11 -3
- package/src/types/meta.ts +4 -7
- package/src/types/pattern.ts +58 -18
- package/src/types/state.ts +11 -3
- package/src/types/statistic.ts +38 -6
- package/src/types/tooltip.ts +7 -2
|
@@ -1,41 +1,81 @@
|
|
|
1
1
|
import { PathCommand } from '@antv/g-base';
|
|
2
2
|
import { Options, StyleAttr, ColorAttr, Statistic, ShapeStyle } from '../../types';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @title 轮廓
|
|
5
|
+
*/
|
|
4
6
|
declare type Outline = Partial<{
|
|
5
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* @title 外环的宽度
|
|
9
|
+
* @default "2px"
|
|
10
|
+
*/
|
|
6
11
|
readonly border: number;
|
|
7
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @title 内外的边距
|
|
14
|
+
* @default "0px"
|
|
15
|
+
*/
|
|
8
16
|
readonly distance: number;
|
|
9
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @title 外环的样式
|
|
19
|
+
*/
|
|
10
20
|
readonly style?: Pick<ShapeStyle, 'stroke' | 'strokeOpacity'>;
|
|
11
21
|
}>;
|
|
12
22
|
declare type Wave = Partial<{
|
|
13
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* @title 波形的数量
|
|
25
|
+
* @default 3
|
|
26
|
+
*/
|
|
14
27
|
readonly count: number;
|
|
15
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* @title 波形的长度
|
|
30
|
+
* @default 192
|
|
31
|
+
*/
|
|
16
32
|
readonly length: number;
|
|
17
33
|
}>;
|
|
18
34
|
declare type ShapeCallback = (x: number, y: number, width: number, height: number) => PathCommand[];
|
|
19
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @title 配置类型定义
|
|
37
|
+
*/
|
|
20
38
|
export interface LiquidOptions extends Omit<Options, 'data'> {
|
|
21
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* @title 指标比例
|
|
41
|
+
*/
|
|
22
42
|
readonly percent: number;
|
|
23
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* @title 配置水波图的颜色
|
|
45
|
+
* @description 使用默认色板的颜色
|
|
46
|
+
*/
|
|
24
47
|
readonly color?: ColorAttr;
|
|
25
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* @title 水波的外半径
|
|
50
|
+
* @description 范围0-1
|
|
51
|
+
* @default 0.9
|
|
52
|
+
*/
|
|
26
53
|
readonly radius?: number;
|
|
27
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* @title 水波图的样式
|
|
56
|
+
*/
|
|
28
57
|
readonly liquidStyle?: StyleAttr;
|
|
29
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* @title 指标文本组件
|
|
60
|
+
*/
|
|
30
61
|
readonly statistic?: Statistic;
|
|
31
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* @title 外环轮廓
|
|
64
|
+
*/
|
|
32
65
|
readonly outline?: Outline;
|
|
33
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* @title 波的配置
|
|
68
|
+
*/
|
|
34
69
|
readonly wave?: Wave;
|
|
35
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* @title 波的形状配置
|
|
72
|
+
* @description ('circle' | 'rect' | 'triangle' | 'diamond')
|
|
73
|
+
*/
|
|
36
74
|
readonly shape?: string | ShapeCallback;
|
|
37
75
|
}
|
|
38
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* @title 水波图自定义 的 customInfo
|
|
78
|
+
*/
|
|
39
79
|
export declare type CustomInfo = {
|
|
40
80
|
radius?: LiquidOptions['radius'];
|
|
41
81
|
outline?: LiquidOptions['outline'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/liquid/types.ts"],"names":[],"mappings":"","sourcesContent":["import { PathCommand } from '@antv/g-base';\nimport { Options, StyleAttr, ColorAttr, Statistic, ShapeStyle } from '../../types';\n\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/liquid/types.ts"],"names":[],"mappings":"","sourcesContent":["import { PathCommand } from '@antv/g-base';\nimport { Options, StyleAttr, ColorAttr, Statistic, ShapeStyle } from '../../types';\n\n/**\n * @title 轮廓\n */\ntype Outline = Partial<{\n /**\n * @title 外环的宽度\n * @default \"2px\"\n */\n readonly border: number;\n /**\n * @title 内外的边距\n * @default \"0px\"\n */\n readonly distance: number;\n /**\n * @title 外环的样式\n */\n readonly style?: Pick<ShapeStyle, 'stroke' | 'strokeOpacity'>;\n // /** 外边框的形状,可以有 circle,rect,默认为 circle */\n // readonly containerShape?: 'circle' | 'rect';\n}>;\n\ntype Wave = Partial<{\n /**\n * @title 波形的数量\n * @default 3\n */\n readonly count: number;\n /**\n * @title 波形的长度\n * @default 192\n */\n readonly length: number;\n}>;\n\ntype ShapeCallback = (x: number, y: number, width: number, height: number) => PathCommand[];\n\n/**\n * @title 配置类型定义\n */\nexport interface LiquidOptions extends Omit<Options, 'data'> {\n /**\n * @title 指标比例\n */\n readonly percent: number;\n /**\n * @title 配置水波图的颜色\n * @description 使用默认色板的颜色\n */\n readonly color?: ColorAttr;\n /**\n * @title 水波的外半径\n * @description 范围0-1\n * @default 0.9\n */\n readonly radius?: number;\n /**\n * @title 水波图的样式\n */\n readonly liquidStyle?: StyleAttr;\n /**\n * @title 指标文本组件\n */\n readonly statistic?: Statistic;\n /**\n * @title 外环轮廓\n */\n readonly outline?: Outline;\n /**\n * @title 波的配置\n */\n readonly wave?: Wave;\n /**\n * @title 波的形状配置\n * @description ('circle' | 'rect' | 'triangle' | 'diamond')\n */\n readonly shape?: string | ShapeCallback;\n}\n\n/**\n * @title 水波图自定义 的 customInfo\n */\nexport type CustomInfo = {\n radius?: LiquidOptions['radius'];\n outline?: LiquidOptions['outline'];\n wave?: LiquidOptions['wave'];\n shape?: LiquidOptions['shape'];\n background?: string;\n animation?: LiquidOptions['animation'];\n};\n"]}
|
package/lib/plots/mix/types.d.ts
CHANGED
|
@@ -8,87 +8,96 @@ import { Annotation } from '../../types/annotation';
|
|
|
8
8
|
import { Interaction } from '../../types/interaction';
|
|
9
9
|
import { IPlotTypes } from './utils';
|
|
10
10
|
/**
|
|
11
|
-
* geometry 映射信息
|
|
11
|
+
* @title geometry 映射信息
|
|
12
12
|
*/
|
|
13
13
|
export declare type IGeometry = Geometry & {
|
|
14
14
|
adjust?: Types.AdjustOption;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* 子 view
|
|
17
|
+
* @title 子 view 的配置
|
|
18
|
+
* @description 暂时不开嵌套 view 的情况
|
|
18
19
|
*/
|
|
19
20
|
export declare type IView = {
|
|
20
21
|
/**
|
|
21
|
-
* view
|
|
22
|
+
* @title view 的布局范围
|
|
23
|
+
* @default "占满全部"
|
|
22
24
|
*/
|
|
23
25
|
readonly region?: Region;
|
|
24
26
|
/**
|
|
25
|
-
* view 中的数据
|
|
27
|
+
* @title view 中的数据
|
|
26
28
|
*/
|
|
27
29
|
readonly data: Data;
|
|
28
30
|
/**
|
|
29
|
-
* view 中对应的 meta 字段配置
|
|
31
|
+
* @title view 中对应的 meta 字段配置
|
|
30
32
|
*/
|
|
31
33
|
readonly meta?: Record<string, Meta>;
|
|
32
34
|
/**
|
|
33
|
-
*
|
|
35
|
+
* @title 坐标系的配置
|
|
36
|
+
* @description 每一个 view 具有相同的坐标系
|
|
34
37
|
*/
|
|
35
38
|
readonly coordinate?: Types.CoordinateOption;
|
|
36
39
|
/**
|
|
37
|
-
* 图形 geometry 及映射配置
|
|
40
|
+
* @title 图形 geometry 及映射配置
|
|
38
41
|
*/
|
|
39
42
|
readonly geometries: IGeometry[];
|
|
40
43
|
/**
|
|
41
|
-
* x,y
|
|
44
|
+
* @title x,y 轴
|
|
42
45
|
*/
|
|
43
46
|
readonly axes?: false | Record<string, Axis>;
|
|
44
47
|
/**
|
|
45
|
-
* interactions
|
|
48
|
+
* @title interactions
|
|
46
49
|
*/
|
|
47
50
|
readonly interactions?: Interaction[];
|
|
48
51
|
/**
|
|
49
|
-
* annotation
|
|
52
|
+
* @title annotation
|
|
50
53
|
*/
|
|
51
54
|
readonly annotations?: Annotation[];
|
|
52
55
|
/**
|
|
53
|
-
*
|
|
56
|
+
* @title annotation
|
|
54
57
|
*/
|
|
55
58
|
readonly animation?: Animation;
|
|
56
59
|
/**
|
|
57
|
-
* tooltip
|
|
60
|
+
* @title tooltip
|
|
58
61
|
*/
|
|
59
62
|
readonly tooltip?: Tooltip;
|
|
60
63
|
};
|
|
61
64
|
/**
|
|
62
|
-
* 子 plot 的配置
|
|
65
|
+
* @title 子 plot 的配置
|
|
63
66
|
*/
|
|
64
67
|
export declare type IPlot = IPlotTypes & {
|
|
65
68
|
/**
|
|
66
|
-
* plot view
|
|
69
|
+
* @title plot view 的布局范围
|
|
70
|
+
* @default "占满全部"
|
|
67
71
|
*/
|
|
68
72
|
readonly region?: Region;
|
|
69
73
|
};
|
|
70
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* @title 类型定义
|
|
76
|
+
*/
|
|
71
77
|
export interface MixOptions extends Omit<Options, 'data' | 'legend' | 'xAxis' | 'yAxis' | 'legend' | 'tooltip' | 'slider' | 'scrollbar'> {
|
|
72
78
|
/**
|
|
73
|
-
* 是否同步子 view 的配置
|
|
74
|
-
* 目前仅仅支持 true / false,后续需要增加 function 的方式进行自定义 view 之前的布局同步
|
|
79
|
+
* @title 是否同步子 view 的配置
|
|
80
|
+
* @description 目前仅仅支持 true / false,后续需要增加 function 的方式进行自定义 view 之前的布局同步
|
|
75
81
|
*/
|
|
76
82
|
readonly syncViewPadding?: boolean;
|
|
77
83
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
84
|
+
* @title 每一个图层的配置
|
|
85
|
+
* @description 每个图层包括有自己的:数据、图形、图形映射
|
|
80
86
|
*/
|
|
81
87
|
readonly views?: IView[];
|
|
82
88
|
/**
|
|
83
|
-
*
|
|
89
|
+
* @title 限定与指定 plot 类型
|
|
90
|
+
* @description 支持使用已有的 plot,限定与指定 plot 类型
|
|
84
91
|
*/
|
|
85
92
|
readonly plots?: IPlot[];
|
|
86
93
|
/**
|
|
87
|
-
* tooltip
|
|
94
|
+
* @title tooltip 配置
|
|
95
|
+
* @description tooltip 配置在 chart 层配置
|
|
88
96
|
*/
|
|
89
97
|
readonly tooltip?: Tooltip;
|
|
90
98
|
/**
|
|
91
|
-
* legend
|
|
99
|
+
* @title legend 配置
|
|
100
|
+
* @description 统一顶层配置
|
|
92
101
|
*/
|
|
93
102
|
readonly legend?: false | Record<string, Legend>;
|
|
94
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/mix/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Types } from '@antv/g2';\nimport { Data, Meta, Options, Region, Tooltip } from '../../types';\nimport { Axis } from '../../types/axis';\nimport { Legend } from '../../types/legend';\nimport { Geometry } from '../../adaptor/geometries/base';\nimport { Animation } from '../../types/animation';\nimport { Annotation } from '../../types/annotation';\nimport { Interaction } from '../../types/interaction';\nimport { IPlotTypes } from './utils';\n\n/**\n * geometry 映射信息\n */\nexport type IGeometry = Geometry & {\n adjust?: Types.AdjustOption;\n};\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/mix/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Types } from '@antv/g2';\nimport { Data, Meta, Options, Region, Tooltip } from '../../types';\nimport { Axis } from '../../types/axis';\nimport { Legend } from '../../types/legend';\nimport { Geometry } from '../../adaptor/geometries/base';\nimport { Animation } from '../../types/animation';\nimport { Annotation } from '../../types/annotation';\nimport { Interaction } from '../../types/interaction';\nimport { IPlotTypes } from './utils';\n\n/**\n * @title geometry 映射信息\n */\nexport type IGeometry = Geometry & {\n adjust?: Types.AdjustOption;\n};\n/**\n * @title 子 view 的配置\n * @description 暂时不开嵌套 view 的情况\n */\nexport type IView = {\n /**\n * @title view 的布局范围\n * @default \"占满全部\"\n */\n readonly region?: Region;\n /**\n * @title view 中的数据\n */\n readonly data: Data;\n /**\n * @title view 中对应的 meta 字段配置\n */\n readonly meta?: Record<string, Meta>;\n /**\n * @title 坐标系的配置\n * @description 每一个 view 具有相同的坐标系\n */\n readonly coordinate?: Types.CoordinateOption;\n /**\n * @title 图形 geometry 及映射配置\n */\n readonly geometries: IGeometry[];\n /**\n * @title x,y 轴\n */\n readonly axes?: false | Record<string, Axis>;\n /**\n * @title interactions\n */\n readonly interactions?: Interaction[];\n /**\n * @title annotation\n */\n readonly annotations?: Annotation[];\n /**\n * @title annotation\n */\n readonly animation?: Animation;\n /**\n * @title tooltip\n */\n readonly tooltip?: Tooltip;\n};\n\n/**\n * @title 子 plot 的配置\n */\nexport type IPlot = IPlotTypes & {\n /**\n * @title plot view 的布局范围\n * @default \"占满全部\"\n */\n readonly region?: Region;\n};\n\n/**\n * @title 类型定义\n */\nexport interface MixOptions\n extends Omit<Options, 'data' | 'legend' | 'xAxis' | 'yAxis' | 'legend' | 'tooltip' | 'slider' | 'scrollbar'> {\n /**\n * @title 是否同步子 view 的配置\n * @description 目前仅仅支持 true / false,后续需要增加 function 的方式进行自定义 view 之前的布局同步\n */\n readonly syncViewPadding?: boolean;\n /**\n * @title 每一个图层的配置\n * @description 每个图层包括有自己的:数据、图形、图形映射\n */\n readonly views?: IView[];\n /**\n * @title 限定与指定 plot 类型\n * @description 支持使用已有的 plot,限定与指定 plot 类型\n */\n readonly plots?: IPlot[];\n /**\n * @title tooltip 配置\n * @description tooltip 配置在 chart 层配置\n */\n readonly tooltip?: Tooltip;\n /**\n * @title legend 配置\n * @description 统一顶层配置\n */\n readonly legend?: false | Record<string, Legend>;\n}\n"]}
|
package/lib/plots/pie/types.d.ts
CHANGED
|
@@ -5,25 +5,42 @@ export declare type StatisticData = {
|
|
|
5
5
|
value: string | number | null;
|
|
6
6
|
};
|
|
7
7
|
export interface PieOptions extends Options {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title 角度映射字段
|
|
10
|
+
*/
|
|
9
11
|
readonly angleField: string;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @title 颜色映射字段
|
|
14
|
+
*/
|
|
11
15
|
readonly colorField: string;
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @title 饼图半径
|
|
18
|
+
*/
|
|
13
19
|
readonly radius?: number;
|
|
14
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* @title 饼图内半径
|
|
22
|
+
*/
|
|
15
23
|
readonly innerRadius?: number;
|
|
16
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* @title 饼图标签
|
|
26
|
+
* @description type: 'inner' | 'outer' | 'spider'
|
|
27
|
+
*/
|
|
17
28
|
readonly label?: Label;
|
|
18
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* @title 饼图图形样式
|
|
31
|
+
*/
|
|
19
32
|
readonly pieStyle?: StyleAttr;
|
|
20
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* @title 圆环的开始角度
|
|
35
|
+
*/
|
|
21
36
|
readonly startAngle?: number;
|
|
22
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* @title 圆环的结束角度
|
|
39
|
+
*/
|
|
23
40
|
readonly endAngle?: number;
|
|
24
41
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
42
|
+
* @title 指标卡组件
|
|
43
|
+
* @description 显示在环图中心,可以代替tooltip,显示环图数据的总计值和各项数据,启用 statistic 组件的同时将自动关闭tooltip
|
|
27
44
|
*/
|
|
28
45
|
readonly statistic?: Statistic;
|
|
29
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/pie/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, Statistic, StyleAttr } from '../../types';\nimport { Label } from '../../types/label';\n\nexport type StatisticData = {\n title: string;\n value: string | number | null;\n};\n\nexport interface PieOptions extends Options {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/pie/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, Statistic, StyleAttr } from '../../types';\nimport { Label } from '../../types/label';\n\nexport type StatisticData = {\n title: string;\n value: string | number | null;\n};\n\nexport interface PieOptions extends Options {\n /**\n * @title 角度映射字段\n */\n readonly angleField: string;\n /**\n * @title 颜色映射字段\n */\n readonly colorField: string;\n /**\n * @title 饼图半径\n */\n readonly radius?: number;\n /**\n * @title 饼图内半径\n */\n readonly innerRadius?: number;\n /**\n * @title 饼图标签\n * @description type: 'inner' | 'outer' | 'spider'\n */\n readonly label?: Label;\n /**\n * @title 饼图图形样式\n */\n readonly pieStyle?: StyleAttr;\n // 设置扇形图\n /**\n * @title 圆环的开始角度\n */\n readonly startAngle?: number;\n /**\n * @title 圆环的结束角度\n */\n readonly endAngle?: number;\n /**\n * @title 指标卡组件\n * @description 显示在环图中心,可以代替tooltip,显示环图数据的总计值和各项数据,启用 statistic 组件的同时将自动关闭tooltip\n */\n readonly statistic?: Statistic;\n}\n"]}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { Options, StyleAttr, ColorAttr } from '../../types';
|
|
2
2
|
/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */
|
|
3
3
|
export interface ProgressOptions extends Omit<Options, 'data' | 'color'> {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* @title 进度百分比
|
|
6
|
+
*/
|
|
5
7
|
readonly percent: number;
|
|
6
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title 条图宽度占比
|
|
10
|
+
* @description 范围[0-1]
|
|
11
|
+
*/
|
|
7
12
|
readonly barWidthRatio?: number;
|
|
8
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* @title 进度条颜色
|
|
15
|
+
*/
|
|
9
16
|
readonly color?: ColorAttr;
|
|
10
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @title 进度条样式
|
|
19
|
+
*/
|
|
11
20
|
readonly progressStyle?: StyleAttr;
|
|
12
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/progress/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, StyleAttr, ColorAttr } from '../../types';\n\n/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */\nexport interface ProgressOptions extends Omit<Options, 'data' | 'color'> {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/progress/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, StyleAttr, ColorAttr } from '../../types';\n\n/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */\nexport interface ProgressOptions extends Omit<Options, 'data' | 'color'> {\n /**\n * @title 进度百分比\n */\n readonly percent: number;\n /**\n * @title 条图宽度占比\n * @description 范围[0-1]\n */\n readonly barWidthRatio?: number;\n /**\n * @title 进度条颜色\n */\n readonly color?: ColorAttr;\n /**\n * @title 进度条样式\n */\n readonly progressStyle?: StyleAttr;\n}\n"]}
|
|
@@ -1,28 +1,55 @@
|
|
|
1
1
|
import { PointGeometryOptions, AreaGeometryOptions } from '../../adaptor/geometries';
|
|
2
2
|
import { Options, ShapeStyle } from '../../types';
|
|
3
3
|
export interface RadarOptions extends Options {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* @title x轴字段
|
|
6
|
+
*/
|
|
5
7
|
readonly xField: string;
|
|
6
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title y轴字段
|
|
10
|
+
* @description 映射雷达图的射线长度
|
|
11
|
+
*/
|
|
7
12
|
readonly yField: string;
|
|
8
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* @title 分组字段
|
|
15
|
+
*/
|
|
9
16
|
readonly seriesField?: string;
|
|
10
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @title 是否平滑
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
11
21
|
readonly smooth?: boolean;
|
|
12
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* @title 折线图形样式
|
|
24
|
+
*/
|
|
13
25
|
readonly lineStyle?: ShapeStyle | ((x: any, y: any, series?: any) => ShapeStyle);
|
|
14
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* @title 数据点图形样式
|
|
28
|
+
*/
|
|
15
29
|
readonly point?: PointGeometryOptions['point'] & Pick<PointGeometryOptions, 'state'>;
|
|
16
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* @title area 图形样式
|
|
32
|
+
* @description 均提供回调的方式, 不开放 field 映射配置
|
|
33
|
+
*/
|
|
17
34
|
readonly area?: AreaGeometryOptions['area'];
|
|
18
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @title 角度轴配置
|
|
37
|
+
*/
|
|
19
38
|
readonly xAxis?: any;
|
|
20
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* @title 径向轴配置
|
|
41
|
+
*/
|
|
21
42
|
readonly yAxis?: any;
|
|
22
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* @title 雷达图半径
|
|
45
|
+
*/
|
|
23
46
|
readonly radius?: number;
|
|
24
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* @title 雷达图开始角度
|
|
49
|
+
*/
|
|
25
50
|
readonly startAngle?: number;
|
|
26
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* @title 雷达图结束角度
|
|
53
|
+
*/
|
|
27
54
|
readonly endAngle?: number;
|
|
28
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/radar/types.ts"],"names":[],"mappings":"","sourcesContent":["import { PointGeometryOptions, AreaGeometryOptions } from '../../adaptor/geometries';\nimport { Options, ShapeStyle } from '../../types';\n\nexport interface RadarOptions extends Options {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/radar/types.ts"],"names":[],"mappings":"","sourcesContent":["import { PointGeometryOptions, AreaGeometryOptions } from '../../adaptor/geometries';\nimport { Options, ShapeStyle } from '../../types';\n\nexport interface RadarOptions extends Options {\n /**\n * @title x轴字段\n */\n readonly xField: string;\n /**\n * @title y轴字段\n * @description 映射雷达图的射线长度\n */\n readonly yField: string;\n /**\n * @title 分组字段\n */\n readonly seriesField?: string;\n /**\n * @title 是否平滑\n * @default false\n */\n readonly smooth?: boolean;\n /**\n * @title 折线图形样式\n */\n readonly lineStyle?: ShapeStyle | ((x: any, y: any, series?: any) => ShapeStyle);\n /**\n * @title 数据点图形样式\n */\n readonly point?: PointGeometryOptions['point'] & Pick<PointGeometryOptions, 'state'>;\n /**\n * @title area 图形样式\n * @description 均提供回调的方式, 不开放 field 映射配置\n */\n readonly area?: AreaGeometryOptions['area'];\n /**\n * @title 角度轴配置\n */\n readonly xAxis?: any;\n /**\n * @title 径向轴配置\n */\n readonly yAxis?: any;\n /**\n * @title 雷达图半径\n */\n readonly radius?: number;\n /**\n * @title 雷达图开始角度\n */\n readonly startAngle?: number;\n /**\n * @title 雷达图结束角度\n */\n readonly endAngle?: number;\n}\n"]}
|
|
@@ -3,28 +3,55 @@ import { Options } from '../../types';
|
|
|
3
3
|
import { BarOptions } from '../bar';
|
|
4
4
|
/** 配置类型定义 */
|
|
5
5
|
export interface RadialBarOptions extends Options, Pick<BarOptions, 'barBackground' | 'minBarWidth' | 'maxBarWidth'> {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @title x轴字段
|
|
8
|
+
*/
|
|
7
9
|
readonly xField?: string;
|
|
8
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* @title y轴字段
|
|
12
|
+
*/
|
|
9
13
|
readonly yField?: string;
|
|
10
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* @title 样式
|
|
16
|
+
*/
|
|
11
17
|
readonly barStyle?: ShapeAttrs;
|
|
12
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* @title 最大旋转角度
|
|
20
|
+
* @description 范围0-360
|
|
21
|
+
*/
|
|
13
22
|
readonly maxAngle?: number;
|
|
14
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* @title 圆半径
|
|
25
|
+
*/
|
|
15
26
|
readonly radius?: number;
|
|
16
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* @title 圆内半径
|
|
29
|
+
*/
|
|
17
30
|
readonly innerRadius?: number;
|
|
18
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* @title 圆环的开始角度
|
|
33
|
+
*/
|
|
19
34
|
readonly startAngle?: number;
|
|
20
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @title 圆环的结束角度
|
|
37
|
+
*/
|
|
21
38
|
readonly endAngle?: number;
|
|
22
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* @title 颜色字段
|
|
41
|
+
*/
|
|
23
42
|
readonly colorField?: string;
|
|
24
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* @title 类型
|
|
45
|
+
*/
|
|
25
46
|
readonly type?: string;
|
|
26
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* @title 是否叠加
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
27
51
|
readonly isStack?: boolean;
|
|
28
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* @title 是否分组
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
29
56
|
readonly isGroup?: boolean;
|
|
30
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/radial-bar/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ShapeAttrs } from '@antv/g-base';\nimport { Options } from '../../types';\nimport { BarOptions } from '../bar';\n\n/** 配置类型定义 */\nexport interface RadialBarOptions extends Options, Pick<BarOptions, 'barBackground' | 'minBarWidth' | 'maxBarWidth'> {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/radial-bar/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ShapeAttrs } from '@antv/g-base';\nimport { Options } from '../../types';\nimport { BarOptions } from '../bar';\n\n/** 配置类型定义 */\nexport interface RadialBarOptions extends Options, Pick<BarOptions, 'barBackground' | 'minBarWidth' | 'maxBarWidth'> {\n /**\n * @title x轴字段\n */\n readonly xField?: string;\n /**\n * @title y轴字段\n */\n readonly yField?: string;\n /**\n * @title 样式\n */\n readonly barStyle?: ShapeAttrs;\n /**\n * @title 最大旋转角度\n * @description 范围0-360\n */\n readonly maxAngle?: number;\n /**\n * @title 圆半径\n */\n readonly radius?: number;\n /**\n * @title 圆内半径\n */\n readonly innerRadius?: number;\n /**\n * @title 圆环的开始角度\n */\n readonly startAngle?: number;\n /**\n * @title 圆环的结束角度\n */\n readonly endAngle?: number;\n /**\n * @title 颜色字段\n */\n readonly colorField?: string;\n /**\n * @title 类型\n */\n readonly type?: string;\n /**\n * @title 是否叠加\n * @default false\n */\n readonly isStack?: boolean;\n /**\n * @title 是否分组\n * @default false\n */\n readonly isGroup?: boolean;\n}\n"]}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { Options, StyleAttr, ColorAttr, Statistic } from '../../types';
|
|
2
2
|
/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */
|
|
3
3
|
export interface RingProgressOptions extends Omit<Options, 'data' | 'tooltip' | 'legend' | 'label' | 'color'> {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* @title 进度百分比
|
|
6
|
+
*/
|
|
5
7
|
readonly percent: number;
|
|
6
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title 外环的半径
|
|
10
|
+
*/
|
|
7
11
|
readonly radius?: number;
|
|
8
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @title 内环的半径
|
|
14
|
+
*/
|
|
9
15
|
readonly innerRadius?: number;
|
|
10
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @title 进度条颜色
|
|
18
|
+
*/
|
|
11
19
|
readonly color?: ColorAttr;
|
|
12
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* @title 进度条样式
|
|
22
|
+
*/
|
|
13
23
|
readonly progressStyle?: StyleAttr;
|
|
14
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* @title 统计内容组件
|
|
26
|
+
*/
|
|
15
27
|
readonly statistic?: Statistic;
|
|
16
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/ring-progress/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, StyleAttr, ColorAttr, Statistic } from '../../types';\n\n/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */\nexport interface RingProgressOptions extends Omit<Options, 'data' | 'tooltip' | 'legend' | 'label' | 'color'> {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/ring-progress/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, StyleAttr, ColorAttr, Statistic } from '../../types';\n\n/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */\nexport interface RingProgressOptions extends Omit<Options, 'data' | 'tooltip' | 'legend' | 'label' | 'color'> {\n /**\n * @title 进度百分比\n */\n readonly percent: number;\n /**\n * @title 外环的半径\n */\n readonly radius?: number;\n /**\n * @title 内环的半径\n */\n readonly innerRadius?: number;\n /**\n * @title 进度条颜色\n */\n readonly color?: ColorAttr;\n /**\n * @title 进度条样式\n */\n readonly progressStyle?: StyleAttr;\n /**\n * @title 统计内容组件\n */\n readonly statistic?: Statistic;\n}\n"]}
|
|
@@ -1,29 +1,49 @@
|
|
|
1
1
|
import { Options, StyleAttr } from '../../types';
|
|
2
2
|
export interface RoseOptions extends Options {
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @title 扇形切片分类所对应的数据字段名
|
|
5
|
+
* @description 每个扇形的弧度相等
|
|
6
|
+
*/
|
|
4
7
|
readonly xField: string;
|
|
5
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title 扇形切片半径长度所对应的数据字段名
|
|
10
|
+
*/
|
|
6
11
|
readonly yField: string;
|
|
7
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @title 拆分字段
|
|
14
|
+
*/
|
|
8
15
|
readonly seriesField?: string;
|
|
9
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @title 是否分组玫瑰图
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
10
20
|
readonly isGroup?: boolean;
|
|
11
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* @title 是否堆积玫瑰图
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
12
25
|
readonly isStack?: boolean;
|
|
13
26
|
/**
|
|
14
|
-
*
|
|
15
|
-
* 1 代表玫瑰图大小为 1,即撑满绘图区域
|
|
27
|
+
* @title 玫瑰图的半径
|
|
28
|
+
* @description 原点为画布中心。配置值域为 (0,1] 1 代表玫瑰图大小为 1,即撑满绘图区域
|
|
16
29
|
*/
|
|
17
30
|
readonly radius?: number;
|
|
18
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* @title 内部空心圆的半径
|
|
33
|
+
* @description 规则与 radius 一致
|
|
34
|
+
*/
|
|
19
35
|
readonly innerRadius?: number;
|
|
20
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* @title 玫瑰图开始角度
|
|
38
|
+
*/
|
|
21
39
|
readonly startAngle?: number;
|
|
22
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* @title 玫瑰图结束角度
|
|
42
|
+
*/
|
|
23
43
|
readonly endAngle?: number;
|
|
24
44
|
/**
|
|
25
|
-
*
|
|
26
|
-
* sectorStyle 可以直接指定,也可以通过 callback 的方式,根据数据为每个扇形切片指定单独的样式
|
|
45
|
+
* @title 设置扇形样式
|
|
46
|
+
* @description sectorStyle 中的fill会覆盖 color 的配置,sectorStyle 可以直接指定,也可以通过 callback 的方式,根据数据为每个扇形切片指定单独的样式
|
|
27
47
|
*/
|
|
28
48
|
readonly sectorStyle?: StyleAttr;
|
|
29
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/rose/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, StyleAttr } from '../../types';\n\nexport interface RoseOptions extends Options {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/rose/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, StyleAttr } from '../../types';\n\nexport interface RoseOptions extends Options {\n /**\n * @title 扇形切片分类所对应的数据字段名\n * @description 每个扇形的弧度相等\n */\n readonly xField: string;\n /**\n * @title 扇形切片半径长度所对应的数据字段名\n */\n readonly yField: string;\n /**\n * @title 拆分字段\n */\n readonly seriesField?: string;\n /**\n * @title 是否分组玫瑰图\n * @default false\n */\n readonly isGroup?: boolean;\n /**\n * @title 是否堆积玫瑰图\n * @default false\n */\n readonly isStack?: boolean;\n /**\n * @title 玫瑰图的半径\n * @description 原点为画布中心。配置值域为 (0,1] 1 代表玫瑰图大小为 1,即撑满绘图区域\n */\n readonly radius?: number;\n /**\n * @title 内部空心圆的半径\n * @description 规则与 radius 一致\n */\n readonly innerRadius?: number;\n /**\n * @title 玫瑰图开始角度\n */\n readonly startAngle?: number;\n /**\n * @title 玫瑰图结束角度\n */\n readonly endAngle?: number;\n /**\n * @title 设置扇形样式\n * @description sectorStyle 中的fill会覆盖 color 的配置,sectorStyle 可以直接指定,也可以通过 callback 的方式,根据数据为每个扇形切片指定单独的样式\n */\n readonly sectorStyle?: StyleAttr;\n}\n"]}
|