@visactor/vseed 0.1.4 → 0.1.6
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/dist/builder/builder/builder.d.ts +2 -2
- package/dist/index.cjs +851 -703
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +851 -703
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/chart/pipes/{init/autoDimensions.d.ts → default/defaultDimensions.d.ts} +1 -1
- package/dist/pipeline/advanced/chart/pipes/default/defaultMeasureName.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/default/defaultMeasures.d.ts +5 -0
- package/dist/pipeline/advanced/chart/pipes/default/index.d.ts +3 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/column.d.ts +19 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/line.d.ts +17 -0
- package/dist/pipeline/advanced/chart/pipes/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/init/index.d.ts +0 -2
- package/dist/pipeline/advanced/chart/pipes/measures/utils.d.ts +3 -18
- package/dist/pipeline/advanced/table/pipes/reshape/index.d.ts +1 -0
- package/dist/pipeline/advanced/table/pipes/reshape/reshapePivotTable.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/color/colorCellStyleFill.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/color/colorPieStyleFill.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/color/colorRoseStyleFill.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/color/index.d.ts +4 -0
- package/dist/pipeline/spec/chart/pipes/markStyle/cellStyle.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/markStyle/funnelStyle.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/markStyle/index.d.ts +5 -1
- package/dist/pipeline/spec/chart/pipes/markStyle/pieStyle.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/markStyle/roseStyle.d.ts +2 -0
- package/dist/types/advancedVSeed.d.ts +2 -0
- package/dist/types/chartType/area/area.d.ts +20 -3
- package/dist/types/chartType/area/zArea.d.ts +2 -0
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +16 -0
- package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +2 -0
- package/dist/types/chartType/bar/zBar.d.ts +2 -0
- package/dist/types/chartType/barParallel/zBarParallel.d.ts +2 -0
- package/dist/types/chartType/barPercent/zBarPercent.d.ts +2 -0
- package/dist/types/chartType/column/column.d.ts +17 -1
- package/dist/types/chartType/column/zColumn.d.ts +2 -0
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +17 -0
- package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +2 -0
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +17 -1
- package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +2 -0
- package/dist/types/chartType/donut/zDonut.d.ts +2 -0
- package/dist/types/chartType/dualAxis/zDualAxis.d.ts +10 -0
- package/dist/types/chartType/funnel/zFunnel.d.ts +2 -0
- package/dist/types/chartType/heatmap/zHeatmap.d.ts +2 -0
- package/dist/types/chartType/line/line.d.ts +16 -0
- package/dist/types/chartType/line/zLine.d.ts +2 -0
- package/dist/types/chartType/pie/zPie.d.ts +2 -0
- package/dist/types/chartType/pivotTable/zPivotTable.d.ts +2 -0
- package/dist/types/chartType/radar/zRadar.d.ts +2 -0
- package/dist/types/chartType/rose/zRose.d.ts +2 -0
- package/dist/types/chartType/roseParallel/zRoseParallel.d.ts +2 -0
- package/dist/types/chartType/scatter/zScatter.d.ts +10 -0
- package/dist/types/chartType/table/zTable.d.ts +2 -0
- package/dist/types/properties/measures/measures.d.ts +3 -1
- package/dist/types/properties/measures/zDualMeasures.d.ts +16 -0
- package/dist/types/properties/measures/zMeasures.d.ts +6 -0
- package/dist/types/properties/measures/zScatterMeasures.d.ts +16 -0
- package/dist/types/zVseed.d.ts +56 -0
- package/dist/umd/index.js +872 -724
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/pipeline/advanced/chart/pipes/init/utils.d.ts +0 -2
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
-
export declare const
|
2
|
+
export declare const defaultDimensions: AdvancedPipe;
|
@@ -1,2 +1,21 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 堆叠柱状图、并列柱状图、百分比柱状图
|
4
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
5
|
+
* 1. x: 第一个维度映射至X轴
|
6
|
+
* 2. color: 非X轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
7
|
+
* 3. detail: 其余所有维度映射至Detail通道
|
8
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
9
|
+
* 1. y: 全部指标映射至Y轴
|
10
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
11
|
+
*
|
12
|
+
* 维度映射规则:
|
13
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
14
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
15
|
+
* 3. 用户指定的detail维度映射至Detail通道, 支持多个维度; 若未指定, 则无detail
|
16
|
+
* 指标映射规则:
|
17
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
18
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
19
|
+
* 3. 所有指标均映射到Tooltip
|
20
|
+
*/
|
2
21
|
export declare const encodingForColumn: AdvancedPipe;
|
@@ -1,2 +1,19 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 折线图、堆叠面积图、百分比面积图
|
4
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
5
|
+
* 1. x: 第一个维度映射至X轴
|
6
|
+
* 2. color: 其余所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
7
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
8
|
+
* 1. y: 全部指标映射至Y轴
|
9
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
10
|
+
*
|
11
|
+
* 维度映射规则:
|
12
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
13
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
14
|
+
* 指标映射规则:
|
15
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
16
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
17
|
+
* 3. 所有指标均映射到Tooltip
|
18
|
+
*/
|
2
19
|
export declare const encodingForLine: AdvancedPipe;
|
@@ -1,28 +1,13 @@
|
|
1
|
-
import type {
|
2
|
-
/**
|
3
|
-
* @description 获取指标, 无指标时, 自动生成指标
|
4
|
-
* @param vseed vseed
|
5
|
-
* @returns 指标
|
6
|
-
*/
|
7
|
-
export declare const getBasicMeasures: (vseed: VSeed) => Measures;
|
8
|
-
/**
|
9
|
-
* @description 自动根据数据集生成指标
|
10
|
-
* @param dataset 数据集
|
11
|
-
* @returns
|
12
|
-
*/
|
13
|
-
export declare const generateMeasuresByDataset: (dataset: Dataset) => {
|
14
|
-
id: string;
|
15
|
-
alias: string;
|
16
|
-
}[];
|
1
|
+
import type { AdvancedVSeed, VSeed } from '../../../../../types';
|
17
2
|
/**
|
18
3
|
* @description 检查是否为指标树, 指标树深度大于1. 如果存在一个指标为组, 即有children配置, 则认为是指标树.
|
19
4
|
* @param vseed vseed
|
20
5
|
* @returns
|
21
6
|
*/
|
22
|
-
export declare const isMeasureTreeWithChildren: (vseed: VSeed) => boolean;
|
7
|
+
export declare const isMeasureTreeWithChildren: (vseed: VSeed | AdvancedVSeed) => boolean;
|
23
8
|
/**
|
24
9
|
* @description 检查是否为指标树, 指标树存在parentId. 如果存在一个指标有parentId, 则认为是指标树.
|
25
10
|
* @param vseed vseed
|
26
11
|
* @returns
|
27
12
|
*/
|
28
|
-
export declare const isMeasureTreeWithParentId: (vseed: VSeed) => boolean;
|
13
|
+
export declare const isMeasureTreeWithParentId: (vseed: VSeed | AdvancedVSeed) => boolean;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { reshapePivotTable } from './reshapePivotTable';
|
@@ -6,3 +6,7 @@ export { colorBarStyleFill } from './colorBarStyleFill';
|
|
6
6
|
export { colorLineStyleFill } from './colorLineStyleFill';
|
7
7
|
export { colorPointStyleFill } from './colorPointStyleFill';
|
8
8
|
export { colorAreaStyleFill } from './colorAreaStyleFill';
|
9
|
+
export { colorCellStyleFill } from './colorCellStyleFill';
|
10
|
+
export { colorFunnelStyleFill } from './colorFunnelStyleFill';
|
11
|
+
export { colorPieStyleFill } from './colorPieStyleFill';
|
12
|
+
export { colorRoseStyleFill } from './colorRoseStyleFill';
|
@@ -1,5 +1,9 @@
|
|
1
|
+
export * from './pointState';
|
1
2
|
export { barStyle } from './barStyle';
|
2
3
|
export { pointStyle } from './pointStyle';
|
3
|
-
export * from './pointState';
|
4
4
|
export { lineStyle } from './lineStyle';
|
5
5
|
export { areaStyle } from './areaStyle';
|
6
|
+
export { cellStyle } from './cellStyle';
|
7
|
+
export { funnelStyle } from './funnelStyle';
|
8
|
+
export { pieStyle } from './pieStyle';
|
9
|
+
export { roseStyle } from './roseStyle';
|
@@ -108,10 +108,12 @@ export declare const zAdvancedVSeed: z.ZodObject<{
|
|
108
108
|
}>>>;
|
109
109
|
}, z.core.$strip>>>;
|
110
110
|
encoding: z.ZodOptional<z.ZodEnum<{
|
111
|
+
column: "column";
|
111
112
|
xAxis: "xAxis";
|
112
113
|
yAxis: "yAxis";
|
113
114
|
angle: "angle";
|
114
115
|
color: "color";
|
116
|
+
detail: "detail";
|
115
117
|
tooltip: "tooltip";
|
116
118
|
label: "label";
|
117
119
|
primaryYAxis: "primaryYAxis";
|
@@ -1,6 +1,26 @@
|
|
1
1
|
import type { Locale } from '../../i18n';
|
2
2
|
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, MeasureTree, Sort, SortLegend, Encoding } from '../../properties';
|
3
3
|
/**
|
4
|
+
* @recommend
|
5
|
+
* - 推荐字段配置: `1`个指标, `2`个维度
|
6
|
+
* - 支持数据重塑: 至少`1`个指标, `0`个维度
|
7
|
+
* @info
|
8
|
+
* Encoding规则
|
9
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
10
|
+
* 1. x: 第一个维度映射至X轴
|
11
|
+
* 2. color: 其余所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
12
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
13
|
+
* 1. y: 全部指标映射至Y轴
|
14
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
15
|
+
*
|
16
|
+
* 维度映射规则:
|
17
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
18
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
19
|
+
* 指标映射规则:
|
20
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
21
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
22
|
+
* 3. 所有指标均映射到Tooltip
|
23
|
+
*
|
4
24
|
* @description 面积图, 适用于展示数据随时间变化的趋势及累积关系, 通过填充区域增强数据对比. X轴为类目轴(分类数据), Y轴为数值轴(连续数据).
|
5
25
|
* 适用场景:
|
6
26
|
* - 展示单一数据系列的趋势变化
|
@@ -14,9 +34,6 @@ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, Annotat
|
|
14
34
|
* 默认开启的功能:
|
15
35
|
* - 模块开启堆叠
|
16
36
|
* - 默认开启图例、坐标轴、区域填充、数据标签、提示信息
|
17
|
-
* @recommend
|
18
|
-
* - 推荐字段配置: `1`个指标, `2`个维度
|
19
|
-
* - 支持数据重塑: 至少`1`个指标, `0`个维度
|
20
37
|
*/
|
21
38
|
export interface Area {
|
22
39
|
/**
|
@@ -71,10 +71,12 @@ export declare const zArea: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -7,6 +7,22 @@ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, Annotat
|
|
7
7
|
* - 时间序列的构成变化分析
|
8
8
|
* - 多类别占比趋势对比
|
9
9
|
* - 累积占比与单一类别占比同时展示
|
10
|
+
* @info
|
11
|
+
* Encoding规则
|
12
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
13
|
+
* 1. x: 第一个维度映射至X轴
|
14
|
+
* 2. color: 其余所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
15
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
16
|
+
* 1. y: 全部指标映射至Y轴
|
17
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
18
|
+
*
|
19
|
+
* 维度映射规则:
|
20
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
21
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
22
|
+
* 指标映射规则:
|
23
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
24
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
25
|
+
* 3. 所有指标均映射到Tooltip
|
10
26
|
* @warning
|
11
27
|
* 数据要求:
|
12
28
|
* - 至少1个指标字段(度量)
|
@@ -71,10 +71,12 @@ export declare const zAreaPercent: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -71,10 +71,12 @@ export declare const zBar: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -71,10 +71,12 @@ export declare const zBarParallel: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -71,10 +71,12 @@ export declare const zBarPercent: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -1,12 +1,28 @@
|
|
1
1
|
import type { Locale } from '../../i18n';
|
2
2
|
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree, Sort, SortLegend, Encoding } from '../../properties';
|
3
3
|
/**
|
4
|
-
* 柱状图类型定义
|
5
4
|
* @description 柱状图,适用于纵向数据对比场景,X轴为类目轴(分类数据),Y轴为数值轴(连续数据),柱子纵向排列
|
6
5
|
* 适用场景:
|
7
6
|
* - 数据项名称较短时
|
8
7
|
* - 需要直观比较不同类别的数值大小
|
9
8
|
* - 展示时间序列数据变化趋势
|
9
|
+
* @info
|
10
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
11
|
+
* 1. x: 第一个维度映射至X轴
|
12
|
+
* 2. color: 非X轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
13
|
+
* 3. detail: 其余所有维度映射至Detail通道
|
14
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
15
|
+
* 1. y: 全部指标映射至Y轴
|
16
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
17
|
+
*
|
18
|
+
* 维度映射规则:
|
19
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
20
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
21
|
+
* 3. 用户指定的detail维度映射至Detail通道, 支持多个维度; 若未指定, 则无detail
|
22
|
+
* 指标映射规则:
|
23
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
24
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
25
|
+
* 3. 所有指标均映射到Tooltip
|
10
26
|
* @warning
|
11
27
|
* 数据要求:
|
12
28
|
* - 至少1个数值字段(度量)
|
@@ -71,10 +71,12 @@ export declare const zColumn: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -7,6 +7,23 @@ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, Annotat
|
|
7
7
|
* - 同一维度下多指标并行对比
|
8
8
|
* - 多维度数据的横向比较
|
9
9
|
* - 指标间关联性分析
|
10
|
+
* @info
|
11
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
12
|
+
* 1. x: 第一个维度映射至X轴
|
13
|
+
* 2. color: 非X轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
14
|
+
* 3. detail: 其余所有维度映射至Detail通道
|
15
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
16
|
+
* 1. y: 全部指标映射至Y轴
|
17
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
18
|
+
*
|
19
|
+
* 维度映射规则:
|
20
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
21
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
22
|
+
* 3. 用户指定的detail维度映射至Detail通道, 支持多个维度; 若未指定, 则无detail
|
23
|
+
* 指标映射规则:
|
24
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
25
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
26
|
+
* 3. 所有指标均映射到Tooltip
|
10
27
|
* @warning
|
11
28
|
* 数据要求:
|
12
29
|
* - 至少1个指标字段(度量)
|
@@ -71,10 +71,12 @@ export declare const zColumnParallel: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -1,12 +1,28 @@
|
|
1
1
|
import type { Locale } from '../../i18n';
|
2
2
|
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree, Sort, SortLegend, Encoding } from '../../properties';
|
3
3
|
/**
|
4
|
-
* 百分比柱状图类型定义
|
5
4
|
* @description 百分比柱状图,适用于展示各类别占比关系的场景,Y轴以百分比形式展示数据占比
|
6
5
|
* 适用场景:
|
7
6
|
* - 不同类别数据的占比对比
|
8
7
|
* - 多维度数据的构成分析
|
9
8
|
* - 时间序列的占比变化趋势
|
9
|
+
* @info
|
10
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
11
|
+
* 1. x: 第一个维度映射至X轴
|
12
|
+
* 2. color: 非X轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
13
|
+
* 3. detail: 其余所有维度映射至Detail通道
|
14
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
15
|
+
* 1. y: 全部指标映射至Y轴
|
16
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
17
|
+
*
|
18
|
+
* 维度映射规则:
|
19
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
20
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
21
|
+
* 3. 用户指定的detail维度映射至Detail通道, 支持多个维度; 若未指定, 则无detail
|
22
|
+
* 指标映射规则:
|
23
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
24
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
25
|
+
* 3. 所有指标均映射到Tooltip
|
10
26
|
* @warning
|
11
27
|
* 数据要求:
|
12
28
|
* - 至少1个指标字段(度量)
|
@@ -71,10 +71,12 @@ export declare const zColumnPercent: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -71,10 +71,12 @@ export declare const zDonut: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -57,10 +57,12 @@ export declare const zDualAxis: z.ZodObject<{
|
|
57
57
|
}>>>;
|
58
58
|
}, z.core.$strip>>>;
|
59
59
|
encoding: z.ZodOptional<z.ZodEnum<{
|
60
|
+
column: "column";
|
60
61
|
xAxis: "xAxis";
|
61
62
|
yAxis: "yAxis";
|
62
63
|
angle: "angle";
|
63
64
|
color: "color";
|
65
|
+
detail: "detail";
|
64
66
|
tooltip: "tooltip";
|
65
67
|
label: "label";
|
66
68
|
primaryYAxis: "primaryYAxis";
|
@@ -107,10 +109,12 @@ export declare const zDualAxis: z.ZodObject<{
|
|
107
109
|
}>>>;
|
108
110
|
}, z.core.$strip>>>;
|
109
111
|
encoding: z.ZodOptional<z.ZodEnum<{
|
112
|
+
column: "column";
|
110
113
|
xAxis: "xAxis";
|
111
114
|
yAxis: "yAxis";
|
112
115
|
angle: "angle";
|
113
116
|
color: "color";
|
117
|
+
detail: "detail";
|
114
118
|
tooltip: "tooltip";
|
115
119
|
label: "label";
|
116
120
|
primaryYAxis: "primaryYAxis";
|
@@ -154,10 +158,12 @@ export declare const zDualAxis: z.ZodObject<{
|
|
154
158
|
}>>>;
|
155
159
|
}, z.core.$strip>>>;
|
156
160
|
encoding: z.ZodOptional<z.ZodEnum<{
|
161
|
+
column: "column";
|
157
162
|
xAxis: "xAxis";
|
158
163
|
yAxis: "yAxis";
|
159
164
|
angle: "angle";
|
160
165
|
color: "color";
|
166
|
+
detail: "detail";
|
161
167
|
tooltip: "tooltip";
|
162
168
|
label: "label";
|
163
169
|
primaryYAxis: "primaryYAxis";
|
@@ -202,10 +208,12 @@ export declare const zDualAxis: z.ZodObject<{
|
|
202
208
|
}>>>;
|
203
209
|
}, z.core.$strip>>>;
|
204
210
|
encoding: z.ZodOptional<z.ZodEnum<{
|
211
|
+
column: "column";
|
205
212
|
xAxis: "xAxis";
|
206
213
|
yAxis: "yAxis";
|
207
214
|
angle: "angle";
|
208
215
|
color: "color";
|
216
|
+
detail: "detail";
|
209
217
|
tooltip: "tooltip";
|
210
218
|
label: "label";
|
211
219
|
primaryYAxis: "primaryYAxis";
|
@@ -249,10 +257,12 @@ export declare const zDualAxis: z.ZodObject<{
|
|
249
257
|
}>>>;
|
250
258
|
}, z.core.$strip>>>;
|
251
259
|
encoding: z.ZodOptional<z.ZodEnum<{
|
260
|
+
column: "column";
|
252
261
|
xAxis: "xAxis";
|
253
262
|
yAxis: "yAxis";
|
254
263
|
angle: "angle";
|
255
264
|
color: "color";
|
265
|
+
detail: "detail";
|
256
266
|
tooltip: "tooltip";
|
257
267
|
label: "label";
|
258
268
|
primaryYAxis: "primaryYAxis";
|
@@ -71,10 +71,12 @@ export declare const zFunnel: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -57,10 +57,12 @@ export declare const zHeatmap: z.ZodObject<{
|
|
57
57
|
}>>>;
|
58
58
|
}, z.core.$strip>>>;
|
59
59
|
encoding: z.ZodOptional<z.ZodEnum<{
|
60
|
+
column: "column";
|
60
61
|
xAxis: "xAxis";
|
61
62
|
yAxis: "yAxis";
|
62
63
|
angle: "angle";
|
63
64
|
color: "color";
|
65
|
+
detail: "detail";
|
64
66
|
tooltip: "tooltip";
|
65
67
|
label: "label";
|
66
68
|
primaryYAxis: "primaryYAxis";
|
@@ -4,6 +4,22 @@ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, Annotat
|
|
4
4
|
* 折线图类型定义
|
5
5
|
* @description
|
6
6
|
* 折线图,适用于展示数据随时间或有序类别变化的趋势,通过线段连接数据点形成趋势线
|
7
|
+
* @info
|
8
|
+
* Encoding规则
|
9
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
10
|
+
* 1. x: 第一个维度映射至X轴
|
11
|
+
* 2. color: 其余所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
12
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
13
|
+
* 1. y: 全部指标映射至Y轴
|
14
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
15
|
+
*
|
16
|
+
* 维度映射规则:
|
17
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
18
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
19
|
+
* 指标映射规则:
|
20
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
21
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
22
|
+
* 3. 所有指标均映射到Tooltip
|
7
23
|
* @warning
|
8
24
|
* 适用场景:
|
9
25
|
* - 展示时间序列数据的变化趋势
|
@@ -71,10 +71,12 @@ export declare const zLine: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -71,10 +71,12 @@ export declare const zPie: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|
@@ -57,10 +57,12 @@ export declare const zPivotTable: z.ZodObject<{
|
|
57
57
|
}>>>;
|
58
58
|
}, z.core.$strip>>>;
|
59
59
|
encoding: z.ZodOptional<z.ZodEnum<{
|
60
|
+
column: "column";
|
60
61
|
xAxis: "xAxis";
|
61
62
|
yAxis: "yAxis";
|
62
63
|
angle: "angle";
|
63
64
|
color: "color";
|
65
|
+
detail: "detail";
|
64
66
|
tooltip: "tooltip";
|
65
67
|
label: "label";
|
66
68
|
primaryYAxis: "primaryYAxis";
|
@@ -71,10 +71,12 @@ export declare const zRadar: z.ZodObject<{
|
|
71
71
|
}>>>;
|
72
72
|
}, z.core.$strip>>>;
|
73
73
|
encoding: z.ZodOptional<z.ZodEnum<{
|
74
|
+
column: "column";
|
74
75
|
xAxis: "xAxis";
|
75
76
|
yAxis: "yAxis";
|
76
77
|
angle: "angle";
|
77
78
|
color: "color";
|
79
|
+
detail: "detail";
|
78
80
|
tooltip: "tooltip";
|
79
81
|
label: "label";
|
80
82
|
primaryYAxis: "primaryYAxis";
|