@visactor/vseed 0.1.5 → 0.1.7
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 -4
- package/dist/index.cjs +574 -498
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +574 -498
- 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/{table/pipes/init/autoMeasures.d.ts → chart/pipes/default/defaultMeasureName.d.ts} +1 -1
- 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/bar.d.ts +19 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/column.d.ts +19 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/dualAxis.d.ts +19 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/funnel.d.ts +17 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/heatmap.d.ts +19 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/line.d.ts +18 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/pie.d.ts +18 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/radar.d.ts +19 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/rose.d.ts +19 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/scatter.d.ts +18 -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/{init/autoPivotMeasures.d.ts → default/defaultDimensions.d.ts} +1 -1
- package/dist/pipeline/advanced/table/pipes/default/defaultMeasureName.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipes/default/defaultMeasures.d.ts +5 -0
- package/dist/pipeline/advanced/table/pipes/default/index.d.ts +3 -0
- package/dist/pipeline/advanced/table/pipes/encoding/index.d.ts +1 -0
- package/dist/pipeline/advanced/table/pipes/encoding/pivotTable.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipes/index.d.ts +3 -0
- package/dist/pipeline/advanced/table/pipes/init/index.d.ts +0 -3
- package/dist/pipeline/advanced/table/pipes/reshape/index.d.ts +1 -0
- package/dist/pipeline/advanced/table/pipes/{init/autoDimensions.d.ts → reshape/reshapePivotTable.d.ts} +1 -1
- package/dist/types/advancedVSeed.d.ts +2 -5
- package/dist/types/chartType/area/area.d.ts +19 -3
- package/dist/types/chartType/area/zArea.d.ts +2 -5
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +15 -1
- package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +2 -5
- package/dist/types/chartType/bar/bar.d.ts +17 -1
- package/dist/types/chartType/bar/zBar.d.ts +2 -5
- package/dist/types/chartType/barParallel/barParallel.d.ts +17 -1
- package/dist/types/chartType/barParallel/zBarParallel.d.ts +2 -5
- package/dist/types/chartType/barPercent/barPercent.d.ts +17 -1
- package/dist/types/chartType/barPercent/zBarPercent.d.ts +2 -5
- package/dist/types/chartType/column/column.d.ts +17 -1
- package/dist/types/chartType/column/zColumn.d.ts +2 -5
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +17 -1
- package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +2 -5
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +17 -1
- package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +2 -5
- package/dist/types/chartType/donut/donut.d.ts +16 -1
- package/dist/types/chartType/donut/zDonut.d.ts +2 -5
- package/dist/types/chartType/dualAxis/dualAxis.d.ts +17 -1
- package/dist/types/chartType/dualAxis/zDualAxis.d.ts +10 -5
- package/dist/types/chartType/funnel/funnel.d.ts +15 -1
- package/dist/types/chartType/funnel/zFunnel.d.ts +2 -5
- package/dist/types/chartType/heatmap/heatmap.d.ts +17 -1
- package/dist/types/chartType/heatmap/zHeatmap.d.ts +2 -5
- package/dist/types/chartType/line/line.d.ts +16 -4
- package/dist/types/chartType/line/zLine.d.ts +2 -5
- package/dist/types/chartType/pie/pie.d.ts +16 -1
- package/dist/types/chartType/pie/zPie.d.ts +2 -5
- package/dist/types/chartType/pivotTable/pivotTable.d.ts +10 -3
- package/dist/types/chartType/pivotTable/zPivotTable.d.ts +2 -5
- package/dist/types/chartType/radar/radar.d.ts +17 -1
- package/dist/types/chartType/radar/zRadar.d.ts +2 -5
- package/dist/types/chartType/rose/rose.d.ts +17 -1
- package/dist/types/chartType/rose/zRose.d.ts +2 -5
- package/dist/types/chartType/roseParallel/roseParallel.d.ts +17 -1
- package/dist/types/chartType/roseParallel/zRoseParallel.d.ts +2 -5
- package/dist/types/chartType/scatter/scatter.d.ts +16 -1
- package/dist/types/chartType/scatter/zScatter.d.ts +10 -5
- package/dist/types/chartType/table/table.d.ts +2 -0
- package/dist/types/chartType/table/zTable.d.ts +2 -5
- package/dist/types/properties/dimensions/dimensions.d.ts +0 -4
- package/dist/types/properties/dimensions/zDimensions.d.ts +0 -15
- 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 -100
- package/dist/umd/index.js +606 -530
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
- 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,2 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
-
export declare const
|
2
|
+
export declare const defaultMeasureName: AdvancedPipe;
|
@@ -1,2 +1,21 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 条形图、堆叠条形图、并列条形图、百分比条形图
|
4
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
5
|
+
* 1. y: 第一个维度映射至Y轴
|
6
|
+
* 2. color: 非`Y`轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
7
|
+
* 3. detail: 非`Y`轴所有维度与指标名称, 映射至Detail通道
|
8
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
9
|
+
* 1. x: 全部指标映射至`X`轴
|
10
|
+
* 2. tooltip: 全部指标映射至`Tooltip`
|
11
|
+
*
|
12
|
+
* 维度映射规则:
|
13
|
+
* 1. 用户指定的`yAxis`维度映射至Y轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至Y轴
|
14
|
+
* 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
15
|
+
* 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
16
|
+
* 指标映射规则:
|
17
|
+
* 1. 指标未配置`encoding`, 则默认映射至Y轴;
|
18
|
+
* 2. 用户指定的`xAxis`指标映射至`X`轴, 支持多个指标;
|
19
|
+
* 3. 所有指标均映射到`Tooltip`
|
20
|
+
*/
|
2
21
|
export declare const encodingForBar: 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: 非`X`轴所有维度与指标名称, 映射至Detail通道
|
8
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
9
|
+
* 1. y: 全部指标映射至Y轴
|
10
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
11
|
+
*
|
12
|
+
* 维度映射规则:
|
13
|
+
* 1. 用户指定的`xAxis`维度映射至X轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至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,21 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 双轴图
|
4
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
5
|
+
* 1. x: 第一个维度映射至X轴
|
6
|
+
* 2. color: 非`X`轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
7
|
+
* 3. detail: 非`X`轴所有维度与指标名称, 映射至Detail通道
|
8
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
9
|
+
* 1. y: 第一个指标映射至主Y轴, 其余指标映射至次Y轴
|
10
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
11
|
+
*
|
12
|
+
* 维度映射规则:
|
13
|
+
* 1. 用户指定的`xAxis`维度映射至X轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至X轴
|
14
|
+
* 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
15
|
+
* 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
16
|
+
* 指标映射规则:
|
17
|
+
* 1. 指标未配置encoding, 则第一个指标默认映射至Y轴, 其余指标默认映射至次Y轴
|
18
|
+
* 2. 用户指定的yAxis指标映射至主Y轴或次Y轴, 支持多个指标;
|
19
|
+
* 3. 所有指标均映射到Tooltip
|
20
|
+
*/
|
2
21
|
export declare const encodingForDualAxis: AdvancedPipe;
|
@@ -1,2 +1,19 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 漏斗图
|
4
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
5
|
+
* 1. color: 所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
6
|
+
* 2. detail: 所有维度与指标名称, 映射至Detail通道
|
7
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
8
|
+
* 1. size: 全部指标映射至size通道
|
9
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
10
|
+
*
|
11
|
+
* 维度映射规则:
|
12
|
+
* 1. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
13
|
+
* 2. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
14
|
+
* 指标映射规则:
|
15
|
+
* 1. 指标未配置`encoding`, 则默认映射至size通道;
|
16
|
+
* 2. 用户指定的`size`指标映射至size通道, 支持多个指标;
|
17
|
+
* 3. 所有指标均映射到Tooltip
|
18
|
+
*/
|
2
19
|
export declare const encodingForFunnel: AdvancedPipe;
|
@@ -1,2 +1,21 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 热力图
|
4
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
5
|
+
* 1. x: 第一个维度, 合并映射至x轴通道
|
6
|
+
* 2. y: 第二个(若没有第二个则复用第一个)及其之后的维度, 合并映射至y轴通道
|
7
|
+
* 3. color: 所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
8
|
+
* 4. detail: 所有维度与指标名称, 映射至Detail通道
|
9
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
10
|
+
* 1. color: 第一个指标映射至Color通道
|
11
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
12
|
+
*
|
13
|
+
* 维度映射规则:
|
14
|
+
* 1. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
15
|
+
* 2. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
16
|
+
* 指标映射规则:
|
17
|
+
* 1. 指标未配置`encoding`, 则默认映射至color通道, 只有一个指标时才会映射至color通道
|
18
|
+
* 2. 用户指定的`detail`指标映射至Detail通道, 支持多个指标;
|
19
|
+
* 3. 所有指标均映射到Tooltip
|
20
|
+
*/
|
2
21
|
export declare const encodingForHeatmap: AdvancedPipe;
|
@@ -1,2 +1,20 @@
|
|
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轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至X轴
|
13
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
14
|
+
* 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
15
|
+
* 指标映射规则:
|
16
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
17
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
18
|
+
* 3. 所有指标均映射到Tooltip
|
19
|
+
*/
|
2
20
|
export declare const encodingForLine: AdvancedPipe;
|
@@ -1,2 +1,20 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 饼图、环形图
|
4
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
5
|
+
* 1. color: 所有维度, 合并映射至颜色通道, 作为图例展示
|
6
|
+
* 2. detail: 所有维度, 映射至Detail通道
|
7
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
8
|
+
* 1. angle: 全部指标映射至angle轴
|
9
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
10
|
+
*
|
11
|
+
* 维度映射规则:
|
12
|
+
* 1. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
13
|
+
* 2. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
14
|
+
* 指标映射规则:
|
15
|
+
* 1. 指标未配置`encoding`, 则默认映射至angle轴;
|
16
|
+
* 2. 用户指定的`angle`指标映射至angle轴, 支持多个指标;
|
17
|
+
* 3. 用户指定的`color`指标映射至color通道, 支持多个指标;
|
18
|
+
* 3. 所有指标均映射到Tooltip
|
19
|
+
*/
|
2
20
|
export declare const encodingForPie: AdvancedPipe;
|
@@ -1,2 +1,21 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 雷达图
|
4
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
5
|
+
* 1. angle: 第一个维度映射至angle轴
|
6
|
+
* 2. color: 非`Angle`轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
7
|
+
* 3. detail: 非`Angle`轴所有维度与指标名称, 映射至Detail通道
|
8
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
9
|
+
* 1. radius: 全部指标映射至radius轴
|
10
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
11
|
+
*
|
12
|
+
* 维度映射规则:
|
13
|
+
* 1. 用户指定的`angle`维度映射至angle轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至angle轴
|
14
|
+
* 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
15
|
+
* 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
16
|
+
* 指标映射规则:
|
17
|
+
* 1. 指标未配置`encoding`, 则默认映射至radius轴;
|
18
|
+
* 2. 用户指定的`radius`指标映射至radius轴, 支持多个指标;
|
19
|
+
* 3. 所有指标均映射到Tooltip
|
20
|
+
*/
|
2
21
|
export declare const encodingForRadar: AdvancedPipe;
|
@@ -1,2 +1,21 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 堆叠玫瑰图、并列玫瑰图
|
4
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
5
|
+
* 1. angle: 第一个维度映射至angle轴
|
6
|
+
* 2. color: 非`angle`轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
7
|
+
* 3. detail: 非`angle`轴所有维度与指标名称, 映射至Detail通道
|
8
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
9
|
+
* 1. radius: 全部指标映射至radius轴
|
10
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
11
|
+
*
|
12
|
+
* 维度映射规则:
|
13
|
+
* 1. 用户指定的`angle`维度映射至angle轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至angle轴
|
14
|
+
* 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
15
|
+
* 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
16
|
+
* 指标映射规则:
|
17
|
+
* 1. 指标未配置`encoding`, 则默认映射至Y轴;
|
18
|
+
* 2. 用户指定的`radius`指标映射至radius轴, 支持多个指标;
|
19
|
+
* 3. 所有指标均映射到Tooltip
|
20
|
+
*/
|
2
21
|
export declare const encodingForRose: AdvancedPipe;
|
@@ -1,2 +1,20 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
+
/**
|
3
|
+
* @description 散点图
|
4
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
5
|
+
* 1. color: 所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
6
|
+
* 2. detail: 所有维度与指标名称, 映射至Detail通道
|
7
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
8
|
+
* 1. x: 第一个指标映射至X轴
|
9
|
+
* 2. y: 第二个及其之后的指标映射至Y轴
|
10
|
+
* 3. tooltip: 全部指标映射至Tooltip
|
11
|
+
*
|
12
|
+
* 维度映射规则:
|
13
|
+
* 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
14
|
+
* 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
15
|
+
* 指标映射规则:
|
16
|
+
* 1. 指标未配置encoding, 则第一个指标默认映射至X轴, 第二个指标默认映射至Y轴
|
17
|
+
* 2. 用户指定的yAxis指标映射至Y轴X轴, 支持多个指标;
|
18
|
+
* 3. 所有指标均映射到Tooltip
|
19
|
+
*/
|
2
20
|
export declare const encodingForScatter: 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;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
-
export declare const
|
2
|
+
export declare const defaultDimensions: AdvancedPipe;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { encodingForPivotTable } from './pivotTable';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { reshapePivotTable } from './reshapePivotTable';
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { AdvancedPipe } from '../../../../../types';
|
2
|
-
export declare const
|
2
|
+
export declare const reshapePivotTable: AdvancedPipe;
|
@@ -56,11 +56,6 @@ export declare const zAdvancedVSeed: z.ZodObject<{
|
|
56
56
|
dimensions: z.ZodArray<z.ZodUnion<[z.ZodType<import("./properties").DimensionGroup, unknown, z.core.$ZodTypeInternals<import("./properties").DimensionGroup, unknown>>, z.ZodObject<{
|
57
57
|
id: z.ZodString;
|
58
58
|
alias: z.ZodOptional<z.ZodString>;
|
59
|
-
location: z.ZodDefault<z.ZodEnum<{
|
60
|
-
dimension: "dimension";
|
61
|
-
rowDimension: "rowDimension";
|
62
|
-
columnDimension: "columnDimension";
|
63
|
-
}>>;
|
64
59
|
encoding: z.ZodOptional<z.ZodEnum<{
|
65
60
|
column: "column";
|
66
61
|
xAxis: "xAxis";
|
@@ -108,10 +103,12 @@ export declare const zAdvancedVSeed: z.ZodObject<{
|
|
108
103
|
}>>>;
|
109
104
|
}, z.core.$strip>>>;
|
110
105
|
encoding: z.ZodOptional<z.ZodEnum<{
|
106
|
+
column: "column";
|
111
107
|
xAxis: "xAxis";
|
112
108
|
yAxis: "yAxis";
|
113
109
|
angle: "angle";
|
114
110
|
color: "color";
|
111
|
+
detail: "detail";
|
115
112
|
tooltip: "tooltip";
|
116
113
|
label: "label";
|
117
114
|
primaryYAxis: "primaryYAxis";
|
@@ -1,6 +1,25 @@
|
|
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
|
+
* @encoding
|
8
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
9
|
+
* 1. x: 第一个维度映射至X轴
|
10
|
+
* 2. color: 其余所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
11
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
12
|
+
* 1. y: 全部指标映射至Y轴
|
13
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
14
|
+
*
|
15
|
+
* 维度映射规则:
|
16
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
17
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
18
|
+
* 指标映射规则:
|
19
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
20
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
21
|
+
* 3. 所有指标均映射到Tooltip
|
22
|
+
*
|
4
23
|
* @description 面积图, 适用于展示数据随时间变化的趋势及累积关系, 通过填充区域增强数据对比. X轴为类目轴(分类数据), Y轴为数值轴(连续数据).
|
5
24
|
* 适用场景:
|
6
25
|
* - 展示单一数据系列的趋势变化
|
@@ -14,9 +33,6 @@ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, Annotat
|
|
14
33
|
* 默认开启的功能:
|
15
34
|
* - 模块开启堆叠
|
16
35
|
* - 默认开启图例、坐标轴、区域填充、数据标签、提示信息
|
17
|
-
* @recommend
|
18
|
-
* - 推荐字段配置: `1`个指标, `2`个维度
|
19
|
-
* - 支持数据重塑: 至少`1`个指标, `0`个维度
|
20
36
|
*/
|
21
37
|
export interface Area {
|
22
38
|
/**
|
@@ -19,11 +19,6 @@ export declare const zArea: z.ZodObject<{
|
|
19
19
|
dimensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
20
20
|
id: z.ZodString;
|
21
21
|
alias: z.ZodOptional<z.ZodString>;
|
22
|
-
location: z.ZodDefault<z.ZodEnum<{
|
23
|
-
dimension: "dimension";
|
24
|
-
rowDimension: "rowDimension";
|
25
|
-
columnDimension: "columnDimension";
|
26
|
-
}>>;
|
27
22
|
encoding: z.ZodOptional<z.ZodEnum<{
|
28
23
|
column: "column";
|
29
24
|
xAxis: "xAxis";
|
@@ -71,10 +66,12 @@ export declare const zArea: z.ZodObject<{
|
|
71
66
|
}>>>;
|
72
67
|
}, z.core.$strip>>>;
|
73
68
|
encoding: z.ZodOptional<z.ZodEnum<{
|
69
|
+
column: "column";
|
74
70
|
xAxis: "xAxis";
|
75
71
|
yAxis: "yAxis";
|
76
72
|
angle: "angle";
|
77
73
|
color: "color";
|
74
|
+
detail: "detail";
|
78
75
|
tooltip: "tooltip";
|
79
76
|
label: "label";
|
80
77
|
primaryYAxis: "primaryYAxis";
|
@@ -1,12 +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
|
-
* 百分比面积图类型定义
|
5
4
|
* @description 百分比面积图,适用于展示多类别占比随时间变化的趋势,Y轴以百分比形式展示占比关系
|
6
5
|
* 适用场景:
|
7
6
|
* - 时间序列的构成变化分析
|
8
7
|
* - 多类别占比趋势对比
|
9
8
|
* - 累积占比与单一类别占比同时展示
|
9
|
+
* @encoding
|
10
|
+
* 维度未包含任何encoding, 则使用默认映射规则:
|
11
|
+
* 1. x: 第一个维度映射至X轴
|
12
|
+
* 2. color: 其余所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
13
|
+
* 指标未包含任何encoding, 则使用默认映射规则:
|
14
|
+
* 1. y: 全部指标映射至Y轴
|
15
|
+
* 2. tooltip: 全部指标映射至Tooltip
|
16
|
+
*
|
17
|
+
* 维度映射规则:
|
18
|
+
* 1. 用户指定的xAxis维度映射至X轴, 支持多个维度; 若未指定, 则默认映射第一个维度
|
19
|
+
* 2. 用户指定的color维度映射至颜色通道, 支持多个维度; 若未指定, 则默认映射指标名称
|
20
|
+
* 指标映射规则:
|
21
|
+
* 1. 指标未配置encoding, 则默认映射至Y轴;
|
22
|
+
* 2. 用户指定的yAxis指标映射至Y轴, 支持多个指标;
|
23
|
+
* 3. 所有指标均映射到Tooltip
|
10
24
|
* @warning
|
11
25
|
* 数据要求:
|
12
26
|
* - 至少1个指标字段(度量)
|
@@ -19,11 +19,6 @@ export declare const zAreaPercent: z.ZodObject<{
|
|
19
19
|
dimensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
20
20
|
id: z.ZodString;
|
21
21
|
alias: z.ZodOptional<z.ZodString>;
|
22
|
-
location: z.ZodDefault<z.ZodEnum<{
|
23
|
-
dimension: "dimension";
|
24
|
-
rowDimension: "rowDimension";
|
25
|
-
columnDimension: "columnDimension";
|
26
|
-
}>>;
|
27
22
|
encoding: z.ZodOptional<z.ZodEnum<{
|
28
23
|
column: "column";
|
29
24
|
xAxis: "xAxis";
|
@@ -71,10 +66,12 @@ export declare const zAreaPercent: z.ZodObject<{
|
|
71
66
|
}>>>;
|
72
67
|
}, z.core.$strip>>>;
|
73
68
|
encoding: z.ZodOptional<z.ZodEnum<{
|
69
|
+
column: "column";
|
74
70
|
xAxis: "xAxis";
|
75
71
|
yAxis: "yAxis";
|
76
72
|
angle: "angle";
|
77
73
|
color: "color";
|
74
|
+
detail: "detail";
|
78
75
|
tooltip: "tooltip";
|
79
76
|
label: "label";
|
80
77
|
primaryYAxis: "primaryYAxis";
|
@@ -2,12 +2,28 @@ import { type Locale } from '../../i18n';
|
|
2
2
|
import type { Encoding, MeasureTree, Sort, SortLegend } from '../../properties';
|
3
3
|
import { type AnnotationArea, type AnnotationHorizontalLine, type AnnotationPoint, type AnnotationVerticalLine, type BackgroundColor, type BarStyle, type Color, type CrosshairRect, type Dataset, type Dimensions, type Label, type Legend, type StackCornerRadius, type Theme, type Tooltip, type XLinearAxis, type YBandAxis } from '../../properties';
|
4
4
|
/**
|
5
|
-
* 条形图类型定义
|
6
5
|
* @description 条形图,适用于横向数据对比场景,Y轴为类目轴(分类数据),X轴为数值轴(连续数据),柱子横向排列
|
7
6
|
* 适用场景:
|
8
7
|
* - 数据项名称较长时
|
9
8
|
* - 需要展示数据排名对比
|
10
9
|
* - 展示正负双向数据
|
10
|
+
* @encoding
|
11
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
12
|
+
* 1. y: 第一个维度映射至Y轴
|
13
|
+
* 2. color: 非`Y`轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
14
|
+
* 3. detail: 非`Y`轴所有维度与指标名称, 映射至Detail通道
|
15
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
16
|
+
* 1. x: 全部指标映射至`X`轴
|
17
|
+
* 2. tooltip: 全部指标映射至`Tooltip`
|
18
|
+
*
|
19
|
+
* 维度映射规则:
|
20
|
+
* 1. 用户指定的`yAxis`维度映射至Y轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至Y轴
|
21
|
+
* 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
22
|
+
* 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
23
|
+
* 指标映射规则:
|
24
|
+
* 1. 指标未配置`encoding`, 则默认映射至Y轴;
|
25
|
+
* 2. 用户指定的`xAxis`指标映射至`X`轴, 支持多个指标;
|
26
|
+
* 3. 所有指标均映射到`Tooltip`
|
11
27
|
* @warning
|
12
28
|
* 数据要求:
|
13
29
|
* - 至少1个指标(度量)
|
@@ -19,11 +19,6 @@ export declare const zBar: z.ZodObject<{
|
|
19
19
|
dimensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
20
20
|
id: z.ZodString;
|
21
21
|
alias: z.ZodOptional<z.ZodString>;
|
22
|
-
location: z.ZodDefault<z.ZodEnum<{
|
23
|
-
dimension: "dimension";
|
24
|
-
rowDimension: "rowDimension";
|
25
|
-
columnDimension: "columnDimension";
|
26
|
-
}>>;
|
27
22
|
encoding: z.ZodOptional<z.ZodEnum<{
|
28
23
|
column: "column";
|
29
24
|
xAxis: "xAxis";
|
@@ -71,10 +66,12 @@ export declare const zBar: z.ZodObject<{
|
|
71
66
|
}>>>;
|
72
67
|
}, z.core.$strip>>>;
|
73
68
|
encoding: z.ZodOptional<z.ZodEnum<{
|
69
|
+
column: "column";
|
74
70
|
xAxis: "xAxis";
|
75
71
|
yAxis: "yAxis";
|
76
72
|
angle: "angle";
|
77
73
|
color: "color";
|
74
|
+
detail: "detail";
|
78
75
|
tooltip: "tooltip";
|
79
76
|
label: "label";
|
80
77
|
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, XLinearAxis, YBandAxis, MeasureTree, Sort, SortLegend, Encoding } from '../../properties';
|
3
3
|
/**
|
4
|
-
* 并列条形图类型定义
|
5
4
|
* @description 并列条形图,适用于多指标横向并行对比场景,多个条形平行排列展示不同指标值
|
6
5
|
* 适用场景:
|
7
6
|
* - 类别名称较长时的多指标对比
|
8
7
|
* - 排名与数值同时展示的横向比较
|
9
8
|
* - 多维度数据的并列分析
|
9
|
+
* @encoding
|
10
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
11
|
+
* 1. y: 第一个维度映射至Y轴
|
12
|
+
* 2. color: 非`Y`轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
13
|
+
* 3. detail: 非`Y`轴所有维度与指标名称, 映射至Detail通道
|
14
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
15
|
+
* 1. x: 全部指标映射至`X`轴
|
16
|
+
* 2. tooltip: 全部指标映射至`Tooltip`
|
17
|
+
*
|
18
|
+
* 维度映射规则:
|
19
|
+
* 1. 用户指定的`yAxis`维度映射至Y轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至Y轴
|
20
|
+
* 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
21
|
+
* 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
22
|
+
* 指标映射规则:
|
23
|
+
* 1. 指标未配置`encoding`, 则默认映射至Y轴;
|
24
|
+
* 2. 用户指定的`xAxis`指标映射至`X`轴, 支持多个指标;
|
25
|
+
* 3. 所有指标均映射到`Tooltip`
|
10
26
|
* @warning
|
11
27
|
* 数据要求:
|
12
28
|
* - 至少1个指标字段(度量)
|
@@ -19,11 +19,6 @@ export declare const zBarParallel: z.ZodObject<{
|
|
19
19
|
dimensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
20
20
|
id: z.ZodString;
|
21
21
|
alias: z.ZodOptional<z.ZodString>;
|
22
|
-
location: z.ZodDefault<z.ZodEnum<{
|
23
|
-
dimension: "dimension";
|
24
|
-
rowDimension: "rowDimension";
|
25
|
-
columnDimension: "columnDimension";
|
26
|
-
}>>;
|
27
22
|
encoding: z.ZodOptional<z.ZodEnum<{
|
28
23
|
column: "column";
|
29
24
|
xAxis: "xAxis";
|
@@ -71,10 +66,12 @@ export declare const zBarParallel: z.ZodObject<{
|
|
71
66
|
}>>>;
|
72
67
|
}, z.core.$strip>>>;
|
73
68
|
encoding: z.ZodOptional<z.ZodEnum<{
|
69
|
+
column: "column";
|
74
70
|
xAxis: "xAxis";
|
75
71
|
yAxis: "yAxis";
|
76
72
|
angle: "angle";
|
77
73
|
color: "color";
|
74
|
+
detail: "detail";
|
78
75
|
tooltip: "tooltip";
|
79
76
|
label: "label";
|
80
77
|
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, XLinearAxis, YBandAxis, MeasureTree, Sort, SortLegend, Encoding } from '../../properties';
|
3
3
|
/**
|
4
|
-
* 百分比条形图类型定义
|
5
4
|
* @description 百分比条形图,适用于横向展示各类别占比关系的场景,X轴以百分比形式展示数据占比
|
6
5
|
* 适用场景:
|
7
6
|
* - 类别名称较长时的占比对比
|
8
7
|
* - 多维度数据的横向构成分析
|
9
8
|
* - 排名与占比同时展示的场景
|
9
|
+
* @encoding
|
10
|
+
* 维度未包含任何`encoding`, 则使用默认映射规则:
|
11
|
+
* 1. y: 第一个维度映射至Y轴
|
12
|
+
* 2. color: 非`Y`轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
|
13
|
+
* 3. detail: 非`Y`轴所有维度与指标名称, 映射至Detail通道
|
14
|
+
* 指标未包含任何`encoding`, 则使用默认映射规则:
|
15
|
+
* 1. x: 全部指标映射至`X`轴
|
16
|
+
* 2. tooltip: 全部指标映射至`Tooltip`
|
17
|
+
*
|
18
|
+
* 维度映射规则:
|
19
|
+
* 1. 用户指定的`yAxis`维度映射至Y轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至Y轴
|
20
|
+
* 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
|
21
|
+
* 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
|
22
|
+
* 指标映射规则:
|
23
|
+
* 1. 指标未配置`encoding`, 则默认映射至Y轴;
|
24
|
+
* 2. 用户指定的`xAxis`指标映射至`X`轴, 支持多个指标;
|
25
|
+
* 3. 所有指标均映射到`Tooltip`
|
10
26
|
* @warning
|
11
27
|
* 数据要求:
|
12
28
|
* - 至少1个维度字段和1个度量字段
|