@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/circle-packing/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ColorAttr, Options, StyleAttr } from '../../types';\nimport { DrillDownCfg } from '../../types/drill-down';\nimport { HierarchyOption } from '../../utils/hierarchy/types';\n\nexport interface CirclePackingOptions extends Omit<Options, 'data'> {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/circle-packing/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ColorAttr, Options, StyleAttr } from '../../types';\nimport { DrillDownCfg } from '../../types/drill-down';\nimport { HierarchyOption } from '../../utils/hierarchy/types';\n\nexport interface CirclePackingOptions extends Omit<Options, 'data'> {\n /**\n * @title 数据字段\n */\n readonly data?: Record<string, any>;\n /**\n * @title 层级布局配置\n */\n readonly hierarchyConfig?: Omit<HierarchyOption, 'as' | 'type' | 'field'>;\n /**\n * @title 颜色字段\n */\n readonly colorField?: string;\n /**\n * @title 颜色\n */\n readonly color?: ColorAttr;\n /**\n * @title 大小字段\n */\n readonly sizeField?: string;\n /**\n * @title 源字段\n */\n readonly rawFields?: string[];\n\n // 暂不提供自定义 size,内部计算\n // readonly size?: SizeAttr;\n\n // 暂不提供 shape 配置,默认:circle.\n // readonly shape?: string;\n\n /**\n * @title 图形样式\n */\n readonly pointStyle?: StyleAttr;\n /**\n * @title 交互\n * @description 下钻交互\n */\n readonly drilldown?: DrillDownCfg;\n}\n"]}
|
|
@@ -5,39 +5,80 @@ import { OptionWithConnectedArea } from '../../adaptor/connected-area';
|
|
|
5
5
|
import { IntervalGeometryOptions } from '../../adaptor/geometries/interval';
|
|
6
6
|
declare type PartialIntervalGeometryOptions = Pick<IntervalGeometryOptions, 'dodgePadding' | 'intervalPadding'>;
|
|
7
7
|
export interface ColumnOptions extends Options, OptionWithConversionTag, OptionWithConnectedArea, PartialIntervalGeometryOptions {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title x轴字段
|
|
10
|
+
*/
|
|
9
11
|
readonly xField: string;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @title y轴字段
|
|
14
|
+
*/
|
|
11
15
|
readonly yField: string;
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @title 拆分字段
|
|
18
|
+
*/
|
|
13
19
|
readonly seriesField?: string;
|
|
14
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* @title 是否分组柱形图
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
15
24
|
readonly isGroup?: boolean;
|
|
16
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* @title 是否是区间柱状图
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
17
29
|
readonly isRange?: boolean;
|
|
18
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* @title 是否是百分比柱状图
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
19
34
|
readonly isPercent?: boolean;
|
|
20
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @title 是否堆积柱状图
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
21
39
|
readonly isStack?: boolean;
|
|
22
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* @title 柱状图宽度占比
|
|
42
|
+
* @description 范围[0-1]
|
|
43
|
+
*/
|
|
23
44
|
readonly columnWidthRatio?: number;
|
|
24
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* @title 分组中柱子之间的间距
|
|
47
|
+
* @description 范围[0-1],仅对分组柱状图适用
|
|
48
|
+
*/
|
|
25
49
|
readonly marginRatio?: number;
|
|
26
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* @title 柱状图最小宽度(像素)
|
|
52
|
+
*/
|
|
27
53
|
readonly minColumnWidth?: number;
|
|
28
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* @title 柱状图最大宽度(像素)
|
|
56
|
+
*/
|
|
29
57
|
readonly maxColumnWidth?: number;
|
|
30
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* @title 柱状图柱子的背景
|
|
60
|
+
*/
|
|
31
61
|
readonly columnBackground?: {
|
|
32
62
|
style?: ShapeAttrs;
|
|
33
63
|
};
|
|
34
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* @title 柱子样式
|
|
66
|
+
*/
|
|
35
67
|
readonly columnStyle?: StyleAttr;
|
|
36
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* @title 分组字段
|
|
70
|
+
* @description 优先级高于 seriesField , isGroup: true 时会根据 groupField 进行分组
|
|
71
|
+
*/
|
|
37
72
|
readonly groupField?: string;
|
|
38
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* @title 自定义柱状图
|
|
75
|
+
* @description interval 图形元素展示形状
|
|
76
|
+
*/
|
|
39
77
|
readonly shape?: string;
|
|
40
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* @title 图表交互
|
|
80
|
+
* @description 开启下钻交互,以及进行下钻交互的配置
|
|
81
|
+
*/
|
|
41
82
|
readonly brush?: BrushCfg;
|
|
42
83
|
}
|
|
43
84
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/column/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ShapeAttrs } from '@antv/g2';\nimport { BrushCfg, Options, StyleAttr } from '../../types';\nimport { OptionWithConversionTag } from '../../adaptor/conversion-tag';\nimport { OptionWithConnectedArea } from '../../adaptor/connected-area';\nimport { IntervalGeometryOptions } from '../../adaptor/geometries/interval';\n\ntype PartialIntervalGeometryOptions = Pick<IntervalGeometryOptions, 'dodgePadding' | 'intervalPadding'>;\n\nexport interface ColumnOptions\n extends Options,\n OptionWithConversionTag,\n OptionWithConnectedArea,\n PartialIntervalGeometryOptions {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/column/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ShapeAttrs } from '@antv/g2';\nimport { BrushCfg, Options, StyleAttr } from '../../types';\nimport { OptionWithConversionTag } from '../../adaptor/conversion-tag';\nimport { OptionWithConnectedArea } from '../../adaptor/connected-area';\nimport { IntervalGeometryOptions } from '../../adaptor/geometries/interval';\n\ntype PartialIntervalGeometryOptions = Pick<IntervalGeometryOptions, 'dodgePadding' | 'intervalPadding'>;\n\nexport interface ColumnOptions\n extends Options,\n OptionWithConversionTag,\n OptionWithConnectedArea,\n PartialIntervalGeometryOptions {\n /**\n * @title x轴字段\n */\n readonly xField: string;\n /**\n * @title y轴字段\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 isRange?: boolean;\n /**\n * @title 是否是百分比柱状图\n * @default false\n */\n readonly isPercent?: boolean;\n /**\n * @title 是否堆积柱状图\n * @default false\n */\n readonly isStack?: boolean;\n /**\n * @title 柱状图宽度占比\n * @description 范围[0-1]\n */\n readonly columnWidthRatio?: number;\n /**\n * @title 分组中柱子之间的间距\n * @description 范围[0-1],仅对分组柱状图适用\n */\n readonly marginRatio?: number;\n /**\n * @title 柱状图最小宽度(像素)\n */\n readonly minColumnWidth?: number;\n /**\n * @title 柱状图最大宽度(像素)\n */\n readonly maxColumnWidth?: number;\n /**\n * @title 柱状图柱子的背景\n */\n readonly columnBackground?: { style?: ShapeAttrs };\n /**\n * @title 柱子样式\n */\n readonly columnStyle?: StyleAttr;\n /**\n * @title 分组字段\n * @description 优先级高于 seriesField , isGroup: true 时会根据 groupField 进行分组\n */\n readonly groupField?: string;\n /**\n * @title 自定义柱状图\n * @description interval 图形元素展示形状\n */\n readonly shape?: string;\n /**\n * @title 图表交互\n * @description 开启下钻交互,以及进行下钻交互的配置\n */\n readonly brush?: BrushCfg;\n}\n"]}
|
|
@@ -15,11 +15,31 @@ export interface PointConfig {
|
|
|
15
15
|
readonly style?: StyleAttr;
|
|
16
16
|
}
|
|
17
17
|
declare type CommonGeometryOption = {
|
|
18
|
+
/**
|
|
19
|
+
* @title 图形类型
|
|
20
|
+
*/
|
|
18
21
|
readonly geometry?: string;
|
|
22
|
+
/**
|
|
23
|
+
* @title 数据标签的配置
|
|
24
|
+
*/
|
|
19
25
|
readonly label?: Options['label'];
|
|
26
|
+
/**
|
|
27
|
+
* @title 图例legend的配置项
|
|
28
|
+
*/
|
|
20
29
|
readonly legend?: Options['legend'];
|
|
30
|
+
/**
|
|
31
|
+
* @title 颜色色板
|
|
32
|
+
*/
|
|
21
33
|
readonly color?: Options['color'];
|
|
34
|
+
/**
|
|
35
|
+
* @title 是否分组
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
22
38
|
readonly isGroup?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @title 分组字段
|
|
41
|
+
* @description 优先级高于 seriesField
|
|
42
|
+
*/
|
|
23
43
|
readonly groupField?: string;
|
|
24
44
|
};
|
|
25
45
|
export declare type GeometryLineOption = Pick<LineOptions, 'seriesField' | 'smooth' | 'connectNulls' | 'lineStyle' | 'point' | 'isStack' | 'stepType'> & CommonGeometryOption;
|
|
@@ -27,27 +47,32 @@ export declare type GeometryColumnOption = Pick<ColumnOptions, 'seriesField' | '
|
|
|
27
47
|
export declare type GeometryOption = GeometryColumnOption | GeometryLineOption;
|
|
28
48
|
export declare type DualAxesOptions = Omit<Options, 'data' | 'yAxis' | 'color' | 'annotations'> & {
|
|
29
49
|
/**
|
|
30
|
-
*
|
|
50
|
+
* @title 数据
|
|
51
|
+
* @description 具体的数据,左右两边的数据
|
|
31
52
|
*/
|
|
32
53
|
readonly data: Array<Record<string, any>[]>;
|
|
33
54
|
/**
|
|
34
|
-
* 双轴图的 x
|
|
55
|
+
* @title 双轴图的 x 字段
|
|
56
|
+
* @description x 字段名称需要保持一致
|
|
35
57
|
*/
|
|
36
58
|
readonly xField: string;
|
|
37
59
|
/**
|
|
38
|
-
* 双轴图左右 y
|
|
60
|
+
* @title 双轴图左右 y 字段
|
|
61
|
+
* @description 需要不一致
|
|
39
62
|
*/
|
|
40
63
|
readonly yField: string[];
|
|
41
64
|
/**
|
|
42
|
-
* 左右两边的 yAxis
|
|
65
|
+
* @title 左右两边的 yAxis 配置
|
|
66
|
+
* @description 使用 object 的方式,key 为 y 字段名,或者数组分别表示左右
|
|
43
67
|
*/
|
|
44
68
|
readonly yAxis?: Options['yAxis'][] | Record<string, Options['yAxis']>;
|
|
45
69
|
/**
|
|
46
|
-
* 左右两边的图形配置
|
|
70
|
+
* @title 左右两边的图形配置
|
|
47
71
|
*/
|
|
48
72
|
readonly geometryOptions?: GeometryOption[];
|
|
49
73
|
/**
|
|
50
|
-
* 左右两边的 annotation
|
|
74
|
+
* @title 左右两边的 annotation 配置
|
|
75
|
+
* @description 同时支持数组和object 两种形式,以防出现 field 相同无法设置的情况
|
|
51
76
|
*/
|
|
52
77
|
readonly annotations?: Options['annotations'][] | Record<string, Options['annotations']>;
|
|
53
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/dual-axes/types.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B","sourcesContent":["import { Options, ShapeAttr, SizeAttr, StyleAttr } from '../../types';\nimport { LineOptions } from '../line/types';\nimport { ColumnOptions } from '../column/types';\n\nexport enum AxisType {\n Left = 'Left',\n Right = 'Right',\n}\n\nexport enum DualAxesGeometry {\n Line = 'line',\n Column = 'column',\n}\n\nexport interface PointConfig {\n readonly shape?: ShapeAttr;\n readonly size?: SizeAttr;\n readonly style?: StyleAttr;\n}\n\ntype CommonGeometryOption = {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/dual-axes/types.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B","sourcesContent":["import { Options, ShapeAttr, SizeAttr, StyleAttr } from '../../types';\nimport { LineOptions } from '../line/types';\nimport { ColumnOptions } from '../column/types';\n\nexport enum AxisType {\n Left = 'Left',\n Right = 'Right',\n}\n\nexport enum DualAxesGeometry {\n Line = 'line',\n Column = 'column',\n}\n\nexport interface PointConfig {\n readonly shape?: ShapeAttr;\n readonly size?: SizeAttr;\n readonly style?: StyleAttr;\n}\n\ntype CommonGeometryOption = {\n /**\n * @title 图形类型\n */\n readonly geometry?: string;\n /**\n * @title 数据标签的配置\n */\n readonly label?: Options['label'];\n /**\n * @title 图例legend的配置项\n */\n readonly legend?: Options['legend'];\n /**\n * @title 颜色色板\n */\n readonly color?: Options['color'];\n /**\n * @title 是否分组\n * @default false\n */\n readonly isGroup?: boolean;\n /**\n * @title 分组字段\n * @description 优先级高于 seriesField\n */\n readonly groupField?: string;\n};\n\n// 折线设置接口, 直接用 LineOption 吧\nexport type GeometryLineOption = Pick<\n LineOptions,\n 'seriesField' | 'smooth' | 'connectNulls' | 'lineStyle' | 'point' | 'isStack' | 'stepType'\n> &\n CommonGeometryOption;\n\n// 柱设置接口\nexport type GeometryColumnOption = Pick<\n ColumnOptions,\n | 'seriesField'\n | 'isGroup'\n | 'isStack'\n | 'isRange'\n | 'isPercent'\n | 'columnWidthRatio'\n | 'marginRatio'\n | 'columnStyle'\n | 'pattern'\n> &\n CommonGeometryOption;\n\nexport type GeometryOption = GeometryColumnOption | GeometryLineOption;\n\nexport type DualAxesOptions = Omit<Options, 'data' | 'yAxis' | 'color' | 'annotations'> & {\n /**\n * @title 数据\n * @description 具体的数据,左右两边的数据\n */\n readonly data: Array<Record<string, any>[]>;\n /**\n * @title 双轴图的 x 字段\n * @description x 字段名称需要保持一致\n */\n readonly xField: string;\n /**\n * @title 双轴图左右 y 字段\n * @description 需要不一致\n */\n readonly yField: string[];\n /**\n * @title 左右两边的 yAxis 配置\n * @description 使用 object 的方式,key 为 y 字段名,或者数组分别表示左右\n */\n readonly yAxis?: Options['yAxis'][] | Record<string, Options['yAxis']>;\n /**\n * @title 左右两边的图形配置\n */\n readonly geometryOptions?: GeometryOption[];\n /**\n * @title 左右两边的 annotation 配置\n * @description 同时支持数组和object 两种形式,以防出现 field 相同无法设置的情况\n */\n readonly annotations?: Options['annotations'][] | Record<string, Options['annotations']>;\n};\n"]}
|
|
@@ -8,121 +8,141 @@ import { Annotation } from '../../types/annotation';
|
|
|
8
8
|
import { Interaction } from '../../types/interaction';
|
|
9
9
|
import { IPlotTypes } from '../mix/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
|
|
18
|
-
* 1. 暂时不开嵌套 view 的情况
|
|
19
|
-
* 2. 暂不开放 分面子 view 的 meta 独立设置
|
|
17
|
+
* @title 子 view 的配置
|
|
18
|
+
* @description 1. 暂时不开嵌套 view 的情况 2. 暂不开放 分面子 view 的 meta 独立设置
|
|
20
19
|
*/
|
|
21
20
|
export declare type IView = {
|
|
22
21
|
/**
|
|
23
|
-
* 图形
|
|
22
|
+
* @title 图形
|
|
23
|
+
* @description geometry 及映射配置
|
|
24
24
|
*/
|
|
25
25
|
readonly geometries: IGeometry[];
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* @title 数据
|
|
28
|
+
* @description optional,view 中的数据
|
|
28
29
|
*/
|
|
29
30
|
readonly data?: Data;
|
|
30
31
|
/**
|
|
31
|
-
*
|
|
32
|
+
* @title meta
|
|
32
33
|
*/
|
|
33
34
|
readonly meta?: Record<string, Axis>;
|
|
34
35
|
/**
|
|
35
|
-
*
|
|
36
|
+
* @title 坐标系的配置
|
|
37
|
+
* @description 每一个 view 具有相同的坐标系
|
|
36
38
|
*/
|
|
37
39
|
readonly coordinate?: Types.CoordinateOption;
|
|
38
40
|
/**
|
|
39
|
-
*
|
|
41
|
+
* @title 坐标轴配置
|
|
40
42
|
*/
|
|
41
43
|
readonly axes?: false | Record<string, Axis>;
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
45
|
+
* @title interactions 配置
|
|
44
46
|
*/
|
|
45
47
|
readonly interactions?: Interaction[];
|
|
46
48
|
/**
|
|
47
|
-
*
|
|
49
|
+
* @title annotation 配置
|
|
48
50
|
*/
|
|
49
51
|
readonly annotations?: Annotation[];
|
|
50
52
|
/**
|
|
51
|
-
*
|
|
53
|
+
* @title animation 配置
|
|
52
54
|
*/
|
|
53
55
|
readonly animation?: Animation;
|
|
54
56
|
/**
|
|
55
|
-
*
|
|
57
|
+
* @title tooltip 配置
|
|
56
58
|
*/
|
|
57
59
|
readonly tooltip?: Tooltip;
|
|
58
60
|
};
|
|
59
61
|
/**
|
|
60
|
-
* 子 plot 的配置
|
|
62
|
+
* @title 子 plot 的配置
|
|
61
63
|
*/
|
|
62
64
|
export declare type IPlot = IPlotTypes;
|
|
63
65
|
/**
|
|
64
|
-
* facetData map
|
|
66
|
+
* @title facetData map
|
|
65
67
|
*/
|
|
66
68
|
declare type FacetDataMap = {
|
|
67
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* @title rect 类型分面配置
|
|
71
|
+
*/
|
|
68
72
|
readonly rect: Types.RectData;
|
|
69
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* @title mirror 类型分面配置
|
|
75
|
+
*/
|
|
70
76
|
readonly mirror: Types.MirrorData;
|
|
71
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* @title list 类型分面配置
|
|
79
|
+
*/
|
|
72
80
|
readonly list: Types.ListData;
|
|
73
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* @title matrix 类型分面配置
|
|
83
|
+
*/
|
|
74
84
|
readonly matrix: Types.MatrixData;
|
|
75
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* @title circle 类型分面配置
|
|
87
|
+
*/
|
|
76
88
|
readonly circle: Types.CircleData;
|
|
77
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* @title tree 类型分面配置
|
|
91
|
+
*/
|
|
78
92
|
readonly tree: Types.TreeData;
|
|
79
93
|
};
|
|
80
94
|
declare type FacetCfg = Types.MirrorCfg & Types.RectCfg & Types.TreeCfg & Types.ListCfg & Types.CircleCfg & Types.MatrixCfg;
|
|
81
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* @title 分面图的配置类型定义
|
|
97
|
+
*/
|
|
82
98
|
export interface FacetOptions<T extends keyof Types.FacetCfgMap = keyof Types.FacetCfgMap> extends Options, FacetCfg {
|
|
83
99
|
/**
|
|
84
|
-
*
|
|
100
|
+
* @title 分面类型
|
|
101
|
+
* @description G2 内置了六种分面: rect、list、circle、tree、mirror 和 matrix
|
|
85
102
|
*/
|
|
86
103
|
readonly type: T;
|
|
87
104
|
/**
|
|
88
|
-
*
|
|
105
|
+
* @title 数据划分维度
|
|
89
106
|
*/
|
|
90
107
|
readonly fields: string[];
|
|
91
108
|
/**
|
|
92
|
-
* 分面数据
|
|
109
|
+
* @title 分面数据
|
|
93
110
|
*/
|
|
94
111
|
readonly data: Data;
|
|
95
112
|
/**
|
|
96
|
-
*
|
|
97
|
-
* 回调的方式
|
|
113
|
+
* @title 绘图
|
|
114
|
+
* @description 每个分面 view 中的具体绘图表现 回调的方式
|
|
98
115
|
*/
|
|
99
116
|
readonly eachView: (innerView: View, facet?: FacetDataMap[T]) => IView | IPlot;
|
|
100
117
|
/**
|
|
101
|
-
* 是否展示分面标题
|
|
118
|
+
* @title 是否展示分面标题
|
|
119
|
+
* @default false
|
|
102
120
|
*/
|
|
103
121
|
readonly showTitle?: boolean;
|
|
104
122
|
/**
|
|
105
|
-
*
|
|
123
|
+
* @title meta 字段
|
|
124
|
+
* @description facet 中对应的 meta 字段配置
|
|
106
125
|
*/
|
|
107
126
|
readonly meta?: Record<string, Meta>;
|
|
108
127
|
/**
|
|
109
|
-
*
|
|
128
|
+
* @title 坐标系的配置
|
|
129
|
+
* @description 每一个 view 具有相同的坐标系
|
|
110
130
|
*/
|
|
111
131
|
readonly coordinate?: Types.CoordinateOption;
|
|
112
132
|
/**
|
|
113
|
-
*
|
|
133
|
+
* @title 轴配置
|
|
114
134
|
*/
|
|
115
135
|
readonly axes?: false | Record<string, Axis>;
|
|
116
136
|
/**
|
|
117
|
-
*
|
|
137
|
+
* @title tooltip 配置
|
|
118
138
|
*/
|
|
119
139
|
readonly tooltip?: Tooltip;
|
|
120
140
|
/**
|
|
121
|
-
*
|
|
141
|
+
* @title 图例配置
|
|
122
142
|
*/
|
|
123
143
|
readonly legend?: Legend;
|
|
124
144
|
/**
|
|
125
|
-
*
|
|
145
|
+
* @title 图例配置
|
|
126
146
|
*/
|
|
127
147
|
readonly interactions?: Interaction[];
|
|
128
148
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/facet/types.ts"],"names":[],"mappings":"","sourcesContent":["import { View, Types } from '@antv/g2';\nimport { Data, Meta, Options, 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 '../mix/utils';\n\n/**\n * geometry 映射信息\n */\nexport type IGeometry = Geometry & {\n adjust?: Types.AdjustOption;\n};\n\n/**\n * 子 view
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/facet/types.ts"],"names":[],"mappings":"","sourcesContent":["import { View, Types } from '@antv/g2';\nimport { Data, Meta, Options, 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 '../mix/utils';\n\n/**\n * @title geometry 映射信息\n */\nexport type IGeometry = Geometry & {\n adjust?: Types.AdjustOption;\n};\n\n/**\n * @title 子 view 的配置\n * @description 1. 暂时不开嵌套 view 的情况 2. 暂不开放 分面子 view 的 meta 独立设置\n */\nexport type IView = {\n /**\n * @title 图形\n * @description geometry 及映射配置\n */\n readonly geometries: IGeometry[];\n /**\n * @title 数据\n * @description optional,view 中的数据\n */\n readonly data?: Data;\n /**\n * @title meta\n */\n readonly meta?: Record<string, Axis>;\n /**\n * @title 坐标系的配置\n * @description 每一个 view 具有相同的坐标系\n */\n readonly coordinate?: Types.CoordinateOption;\n /**\n * @title 坐标轴配置\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 animation 配置\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 facetData map\n */\ntype FacetDataMap = {\n /**\n * @title rect 类型分面配置\n */\n readonly rect: Types.RectData;\n /**\n * @title mirror 类型分面配置\n */\n readonly mirror: Types.MirrorData;\n /**\n * @title list 类型分面配置\n */\n readonly list: Types.ListData;\n /**\n * @title matrix 类型分面配置\n */\n readonly matrix: Types.MatrixData;\n /**\n * @title circle 类型分面配置\n */\n readonly circle: Types.CircleData;\n /**\n * @title tree 类型分面配置\n */\n readonly tree: Types.TreeData;\n};\n\ntype FacetCfg = Types.MirrorCfg & Types.RectCfg & Types.TreeCfg & Types.ListCfg & Types.CircleCfg & Types.MatrixCfg;\n\n/**\n * @title 分面图的配置类型定义\n */\nexport interface FacetOptions<T extends keyof Types.FacetCfgMap = keyof Types.FacetCfgMap> extends Options, FacetCfg {\n /**\n * @title 分面类型\n * @description G2 内置了六种分面: rect、list、circle、tree、mirror 和 matrix\n */\n readonly type: T;\n /**\n * @title 数据划分维度\n */\n readonly fields: string[];\n /**\n * @title 分面数据\n */\n readonly data: Data;\n /**\n * @title 绘图\n * @description 每个分面 view 中的具体绘图表现 回调的方式\n */\n readonly eachView: (innerView: View, facet?: FacetDataMap[T]) => IView | IPlot;\n /**\n * @title 是否展示分面标题\n * @default false\n */\n readonly showTitle?: boolean;\n /**\n * @title meta 字段\n * @description facet 中对应的 meta 字段配置\n */\n readonly meta?: Record<string, Meta>;\n /**\n * @title 坐标系的配置\n * @description 每一个 view 具有相同的坐标系\n */\n readonly coordinate?: Types.CoordinateOption;\n /**\n * @title 轴配置\n */\n readonly axes?: false | Record<string, Axis>;\n /**\n * @title tooltip 配置\n */\n readonly tooltip?: Tooltip;\n /**\n * @title 图例配置\n */\n readonly legend?: Legend;\n /**\n * @title 图例配置\n */\n readonly interactions?: Interaction[];\n}\n"]}
|
|
@@ -5,27 +5,56 @@ export declare type ConversionPosition = {
|
|
|
5
5
|
end: AnnotationPosition;
|
|
6
6
|
};
|
|
7
7
|
export interface FunnelOptions extends Options {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title x轴字段
|
|
10
|
+
*/
|
|
9
11
|
readonly xField?: string;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @title y轴字段
|
|
14
|
+
*/
|
|
11
15
|
readonly yField?: string;
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @title 分组字段
|
|
18
|
+
* @description 漏斗图将根据此字段转置为分面漏斗图
|
|
19
|
+
*/
|
|
13
20
|
readonly seriesField?: string;
|
|
14
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* @title 对比字段
|
|
23
|
+
* @description 漏斗图将根据此字段转置为对比漏斗图
|
|
24
|
+
*/
|
|
15
25
|
readonly compareField?: string;
|
|
16
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* @title 是否转置
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
17
30
|
readonly isTransposed?: boolean;
|
|
18
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* @title 是否是动态高度
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
19
35
|
readonly dynamicHeight?: boolean;
|
|
20
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* @title 最大宽度
|
|
38
|
+
* @description 范围0-1
|
|
39
|
+
*/
|
|
21
40
|
readonly maxSize?: number;
|
|
22
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* @title 最小宽度
|
|
43
|
+
* @description 范围0-1
|
|
44
|
+
*/
|
|
23
45
|
readonly minSize?: number;
|
|
24
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* @title shape 形状
|
|
48
|
+
* @description pyramid 金字塔, 只在基础漏斗图中适用. 在对比漏斗图以及设置 dynamicHeight: 'true' 时不适用
|
|
49
|
+
*/
|
|
25
50
|
readonly shape?: string;
|
|
26
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* @title 漏斗图样式
|
|
53
|
+
*/
|
|
27
54
|
readonly funnelStyle?: StyleAttr;
|
|
28
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* @title 转化率信息
|
|
57
|
+
*/
|
|
29
58
|
readonly conversionTag?: false | {
|
|
30
59
|
readonly offsetX?: number;
|
|
31
60
|
readonly offsetY?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/funnel/types.ts"],"names":[],"mappings":"","sourcesContent":["import { StyleAttr } from '../../types/attr';\nimport { TextStyle, Datum, Data, AnnotationPosition, Options } from '../../types/common';\n\nexport type ConversionPosition = {\n start: AnnotationPosition;\n end: AnnotationPosition;\n};\n\nexport interface FunnelOptions extends Options {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/funnel/types.ts"],"names":[],"mappings":"","sourcesContent":["import { StyleAttr } from '../../types/attr';\nimport { TextStyle, Datum, Data, AnnotationPosition, Options } from '../../types/common';\n\nexport type ConversionPosition = {\n start: AnnotationPosition;\n end: AnnotationPosition;\n};\n\nexport interface FunnelOptions extends Options {\n /**\n * @title x轴字段\n */\n readonly xField?: string;\n /**\n * @title y轴字段\n */\n readonly yField?: string;\n /**\n * @title 分组字段\n * @description 漏斗图将根据此字段转置为分面漏斗图\n */\n readonly seriesField?: string;\n /**\n * @title 对比字段\n * @description 漏斗图将根据此字段转置为对比漏斗图\n */\n readonly compareField?: string;\n /**\n * @title 是否转置\n * @default false\n */\n readonly isTransposed?: boolean;\n /**\n * @title 是否是动态高度\n * @default false\n */\n readonly dynamicHeight?: boolean;\n /**\n * @title 最大宽度\n * @description 范围0-1\n */\n readonly maxSize?: number;\n /**\n * @title 最小宽度\n * @description 范围0-1\n */\n readonly minSize?: number;\n /**\n * @title shape 形状\n * @description pyramid 金字塔, 只在基础漏斗图中适用. 在对比漏斗图以及设置 dynamicHeight: 'true' 时不适用\n */\n readonly shape?: string;\n /**\n * @title 漏斗图样式\n */\n readonly funnelStyle?: StyleAttr;\n\n // 组件\n /**\n * @title 转化率信息\n */\n readonly conversionTag?:\n | false\n | {\n readonly offsetX?: number;\n readonly offsetY?: number;\n readonly style?: TextStyle;\n readonly formatter?: string | ((datum?: Datum, data?: Data) => string);\n };\n}\n"]}
|
|
@@ -3,66 +3,128 @@ import { Axis } from '../../types/axis';
|
|
|
3
3
|
import { PERCENT, RANGE_TYPE, RANGE_VALUE } from './constants';
|
|
4
4
|
/** 指标指标的配置 */
|
|
5
5
|
export declare type Indicator = {
|
|
6
|
+
/**
|
|
7
|
+
* @title 指针
|
|
8
|
+
* @description 只允许静态的 object
|
|
9
|
+
*/
|
|
6
10
|
readonly pointer?: {
|
|
7
11
|
readonly style?: ShapeStyle;
|
|
8
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* @title 圆环
|
|
15
|
+
* @description 只允许静态的 object
|
|
16
|
+
*/
|
|
9
17
|
readonly pin?: {
|
|
10
18
|
readonly style?: ShapeStyle;
|
|
11
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* @title 自定义指针 shape
|
|
22
|
+
* @default 'gauge-indicator'
|
|
23
|
+
*/
|
|
12
24
|
readonly shape?: string;
|
|
13
25
|
};
|
|
14
26
|
export declare type Range = {
|
|
15
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* @title 辅助的刻度值
|
|
29
|
+
* @description 0 ~ 1 的数字
|
|
30
|
+
*/
|
|
16
31
|
readonly ticks?: number[];
|
|
17
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* @title 辅助刻度的颜色配置
|
|
34
|
+
*/
|
|
18
35
|
readonly color?: string | string[];
|
|
19
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* @title 仪表盘辅助背景的宽度
|
|
38
|
+
*/
|
|
20
39
|
readonly width?: number;
|
|
21
40
|
};
|
|
22
41
|
/**
|
|
23
|
-
* 仪表盘辅助生成的 rangeData
|
|
42
|
+
* @title 仪表盘辅助生成的 rangeData
|
|
24
43
|
*/
|
|
25
44
|
export declare type GaugeRangeData = {
|
|
26
45
|
readonly [RANGE_VALUE]?: number;
|
|
27
46
|
readonly [RANGE_TYPE]: string;
|
|
28
47
|
readonly [PERCENT]: number;
|
|
29
48
|
}[];
|
|
30
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* @title 仪表盘配置类型定义
|
|
51
|
+
*/
|
|
31
52
|
export interface GaugeOptions extends Omit<Options, 'data' | 'tooltip' | 'legend' | 'xAxis' | 'yAxis' | 'xField' | 'yField' | 'color'> {
|
|
32
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* @title 指标的比例
|
|
55
|
+
* @description 范围0 ~ 1
|
|
56
|
+
*/
|
|
33
57
|
readonly percent: number;
|
|
34
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* @title 外弧度
|
|
60
|
+
* @description 范围0 ~ 1
|
|
61
|
+
*/
|
|
35
62
|
readonly radius?: number;
|
|
36
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* @title 内弧度
|
|
65
|
+
* @description 范围0 ~ 1
|
|
66
|
+
*/
|
|
37
67
|
readonly innerRadius?: number;
|
|
38
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* @title 弧度起始
|
|
70
|
+
*/
|
|
39
71
|
readonly startAngle?: number;
|
|
40
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* @title 弧度结束
|
|
74
|
+
*/
|
|
41
75
|
readonly endAngle?: number;
|
|
42
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* @title 辅助的 range 组件
|
|
78
|
+
*/
|
|
43
79
|
readonly range?: Range;
|
|
44
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* @title 坐标轴配置
|
|
82
|
+
*/
|
|
45
83
|
readonly axis?: Axis;
|
|
46
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* @title 指针的配置
|
|
86
|
+
*/
|
|
47
87
|
readonly indicator?: false | Indicator;
|
|
48
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* @title 统计文本
|
|
90
|
+
*/
|
|
49
91
|
readonly statistic?: Statistic;
|
|
50
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* @title 仪表盘样式
|
|
94
|
+
*/
|
|
51
95
|
readonly gaugeStyle?: StyleAttr;
|
|
52
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* @title meter gauge 相关配置
|
|
98
|
+
*/
|
|
99
|
+
/**
|
|
100
|
+
* @title 仪表盘类型
|
|
101
|
+
* @description 可选项: 'meter', default 为空
|
|
102
|
+
*/
|
|
53
103
|
readonly type?: string;
|
|
54
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* @title 仪表盘配置
|
|
106
|
+
* @description 当仪表盘类型 = 'meter' 生效
|
|
107
|
+
*/
|
|
55
108
|
readonly meter?: {
|
|
56
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* @title 仪表盘总步数
|
|
111
|
+
* @default "50"
|
|
112
|
+
*/
|
|
57
113
|
readonly steps?: number;
|
|
58
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* @title step 与 gap 的宽度占比
|
|
116
|
+
* @default "0.5"
|
|
117
|
+
*/
|
|
59
118
|
readonly stepRatio?: number;
|
|
60
119
|
};
|
|
61
120
|
}
|
|
62
121
|
/**
|
|
63
|
-
* 仪表盘
|
|
122
|
+
* @title 仪表盘
|
|
123
|
+
* @description 自定义 shape 使用的 customInfo
|
|
64
124
|
*/
|
|
65
125
|
export declare type GaugeCustomInfo = {
|
|
66
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* @title 仪表盘 meter 类型的相关配置
|
|
128
|
+
*/
|
|
67
129
|
readonly meter?: GaugeOptions['meter'];
|
|
68
130
|
};
|