@visactor/vseed 0.0.1 → 0.0.2
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/build.d.ts +3 -0
- package/dist/builder/builder/buildAdvanced.d.ts +3 -0
- package/dist/builder/builder/buildSpec.d.ts +4 -0
- package/dist/builder/builder/builder.d.ts +216 -0
- package/dist/builder/builder/index.d.ts +1 -0
- package/dist/builder/index.d.ts +2 -0
- package/dist/builder/register/index.d.ts +1 -0
- package/dist/builder/register/register.d.ts +3 -0
- package/dist/dataReshape/constant.d.ts +5 -0
- package/dist/dataReshape/dataReshapeFor1D1M.d.ts +13 -0
- package/dist/dataReshape/dataReshapeFor2D1M.d.ts +13 -0
- package/dist/dataReshape/foldMeasures.d.ts +31 -0
- package/dist/dataReshape/index.d.ts +4 -0
- package/dist/dataReshape/unfoldDimensions.d.ts +19 -0
- package/dist/index.cjs +616 -4
- package/dist/index.d.ts +5 -1
- package/dist/index.js +533 -2
- package/dist/pipeline/advanced/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipeline/bar.d.ts +2 -0
- package/dist/pipeline/advanced/pipeline/column.d.ts +2 -0
- package/dist/pipeline/advanced/pipeline/index.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/encoding/encodingCartesian.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/encoding/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipes/index.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/reshape/index.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/reshape/reshapeTo1D1M.d.ts +8 -0
- package/dist/pipeline/advanced/pipes/reshape/reshapeTo2D1M.d.ts +8 -0
- package/dist/pipeline/index.d.ts +3 -0
- package/dist/pipeline/spec/index.d.ts +1 -0
- package/dist/pipeline/spec/pipeline/bar.d.ts +2 -0
- package/dist/pipeline/spec/pipeline/column.d.ts +2 -0
- package/dist/pipeline/spec/pipeline/index.d.ts +2 -0
- package/dist/pipeline/spec/pipes/axes/index.d.ts +4 -0
- package/dist/pipeline/spec/pipes/axes/xBand copy.d.ts +0 -0
- package/dist/pipeline/spec/pipes/axes/xBand.d.ts +2 -0
- package/dist/pipeline/spec/pipes/axes/xLinear copy.d.ts +0 -0
- package/dist/pipeline/spec/pipes/axes/xLinear.d.ts +2 -0
- package/dist/pipeline/spec/pipes/axes/yBand.d.ts +2 -0
- package/dist/pipeline/spec/pipes/axes/yLinear copy.d.ts +0 -0
- package/dist/pipeline/spec/pipes/axes/yLinear.d.ts +2 -0
- package/dist/pipeline/spec/pipes/dataset/dataset.d.ts +2 -0
- package/dist/pipeline/spec/pipes/dataset/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/index.d.ts +3 -0
- package/dist/pipeline/spec/pipes/init/bar.d.ts +2 -0
- package/dist/pipeline/spec/pipes/init/column.d.ts +2 -0
- package/dist/pipeline/spec/pipes/init/index.d.ts +2 -0
- package/dist/pipeline/utils/index.d.ts +1 -0
- package/dist/pipeline/utils/pipeline.d.ts +9 -0
- package/dist/types/builder/builder.d.ts +10 -0
- package/dist/types/builder/index.d.ts +1 -0
- package/dist/types/chartType/area/area.d.ts +46 -0
- package/dist/types/chartType/area/index.d.ts +1 -0
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +45 -0
- package/dist/types/chartType/areaPercent/index.d.ts +1 -0
- package/dist/types/chartType/bar/bar.d.ts +45 -0
- package/dist/types/chartType/bar/index.d.ts +1 -0
- package/dist/types/chartType/barParallel/barParallel.d.ts +45 -0
- package/dist/types/chartType/barParallel/index.d.ts +1 -0
- package/dist/types/chartType/barPercent/barPercent.d.ts +45 -0
- package/dist/types/chartType/barPercent/index.d.ts +1 -0
- package/dist/types/chartType/column/column.d.ts +45 -0
- package/dist/types/chartType/column/index.d.ts +1 -0
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +45 -0
- package/dist/types/chartType/columnParallel/index.d.ts +1 -0
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +45 -0
- package/dist/types/chartType/columnPercent/index.d.ts +1 -0
- package/dist/types/chartType/donut/donut.d.ts +45 -0
- package/dist/types/chartType/donut/index.d.ts +1 -0
- package/dist/types/chartType/dualAxis/dualAxis.d.ts +47 -0
- package/dist/types/chartType/dualAxis/index.d.ts +1 -0
- package/dist/types/chartType/index.d.ts +16 -0
- package/dist/types/chartType/line/index.d.ts +1 -0
- package/dist/types/chartType/line/line.d.ts +45 -0
- package/dist/types/chartType/pie/index.d.ts +1 -0
- package/dist/types/chartType/pie/pie.d.ts +45 -0
- package/dist/types/chartType/pivotTable/index.d.ts +1 -0
- package/dist/types/chartType/pivotTable/pivotTable.d.ts +45 -0
- package/dist/types/chartType/rose/index.d.ts +1 -0
- package/dist/types/chartType/rose/rose.d.ts +45 -0
- package/dist/types/chartType/table/index.d.ts +1 -0
- package/dist/types/chartType/table/table.d.ts +45 -0
- package/dist/types/chartType/vseedDSL.d.ts +16 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/pipeline/advancedVSeed/advancedVSeed.d.ts +7 -0
- package/dist/types/pipeline/advancedVSeed/index.d.ts +1 -0
- package/dist/types/pipeline/index.d.ts +3 -0
- package/dist/types/pipeline/pipeline.d.ts +2 -0
- package/dist/types/pipeline/spec/index.d.ts +1 -0
- package/dist/types/pipeline/spec/spec.d.ts +9 -0
- package/dist/types/properties/advancedVSeed.d.ts +105 -0
- package/dist/types/properties/chartType/index.d.ts +2 -0
- package/dist/types/properties/chartType/zChartType.d.ts +36 -0
- package/dist/types/properties/dataset/dataset.d.ts +15 -0
- package/dist/types/properties/dataset/index.d.ts +2 -0
- package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +34 -0
- package/dist/types/properties/datasetReshapeInfo/index.d.ts +2 -0
- package/dist/types/properties/dimensions/dimensions.d.ts +23 -0
- package/dist/types/properties/dimensions/index.d.ts +2 -0
- package/dist/types/properties/encoding/encoding.d.ts +19 -0
- package/dist/types/properties/encoding/index.d.ts +2 -0
- package/dist/types/properties/index.d.ts +8 -0
- package/dist/types/properties/measures/index.d.ts +2 -0
- package/dist/types/properties/measures/measures.d.ts +109 -0
- package/dist/types/properties/vseed.d.ts +94 -0
- package/package.json +13 -2
@@ -0,0 +1 @@
|
|
1
|
+
export type * from './builder';
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 面积图类型定义
|
4
|
+
* @description 面积图, 适用于展示数据随时间变化的趋势及累积关系, 通过填充区域增强数据对比. X轴为类目轴(分类数据), Y轴为数值轴(连续数据).
|
5
|
+
* 适用场景:
|
6
|
+
* - 展示单一数据系列的趋势变化
|
7
|
+
* - 强调总量随时间的累积效果
|
8
|
+
* - 对比多个数据系列的总量差异
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个指标字段(度量)
|
11
|
+
* - 第一个维度字段映射到X轴,其余维度字段会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 模块开启堆叠
|
15
|
+
* - 默认开启图例、坐标轴、区域填充、数据标签、提示信息
|
16
|
+
*/
|
17
|
+
export interface Area {
|
18
|
+
/**
|
19
|
+
* 面积图
|
20
|
+
* @description 面积图,展示数据趋势及累积关系的图表类型
|
21
|
+
* @type {'area'}
|
22
|
+
* @example 'area'
|
23
|
+
*/
|
24
|
+
chartType: 'area';
|
25
|
+
/**
|
26
|
+
* 数据集
|
27
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 面积图的数据最终会被转换为2个维度, 1个指标.
|
28
|
+
* @type {Array<Record<string|number, any>>}
|
29
|
+
* @example [{month:'1月', value:100}, {month:'2月', value:150}, {month:'3月', value:120}]
|
30
|
+
*/
|
31
|
+
dataset: Dataset;
|
32
|
+
/**
|
33
|
+
* 维度
|
34
|
+
* @description 第一个维度被映射到X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
35
|
+
* @type {Dimensions}
|
36
|
+
* @example [{ id: 'month', alias: '月份' }, { id: 'year', alias: '年份' }]
|
37
|
+
*/
|
38
|
+
dimensions: Dimensions;
|
39
|
+
/**
|
40
|
+
* 指标
|
41
|
+
* @description 面积图的指标会自动合并为一个指标, 映射到Y轴, 指标名称会与其余维度合并, 作为图例项展示.
|
42
|
+
* @type {Measures}
|
43
|
+
* @example [{id: 'value', alias: '数值'}]
|
44
|
+
*/
|
45
|
+
measures: Measures;
|
46
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { Area } from './area';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 百分比面积图类型定义
|
4
|
+
* @description 百分比面积图,适用于展示多类别占比随时间变化的趋势,Y轴以百分比形式展示占比关系
|
5
|
+
* 适用场景:
|
6
|
+
* - 时间序列的构成变化分析
|
7
|
+
* - 多类别占比趋势对比
|
8
|
+
* - 累积占比与单一类别占比同时展示
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个指标字段(度量)
|
11
|
+
* - 第一个维度会放至Y轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、坐标轴、百分比标签、提示信息、占比计算
|
15
|
+
*/
|
16
|
+
export interface AreaPercent {
|
17
|
+
/**
|
18
|
+
* 百分比面积图
|
19
|
+
* @description 百分比面积图,以百分比形式展示多类别占比随某个维度的变化
|
20
|
+
* @type {'areaPercent'}
|
21
|
+
* @example 'areaPercent'
|
22
|
+
*/
|
23
|
+
chartType: 'areaPercent';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 百分比面积图的数据最终会被转换为2个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{month:'1月', category:'A', value:30}, {month:'1月', category:'B', value:70}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 第一个维度被映射到X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{ id: 'month', alias: '月份' }, { id: 'year', alias: '年份' }]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 百分比面积图的指标会自动合并为一个指标, 映射到Y轴, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { AreaPercent } from './areaPercent';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 条形图类型定义
|
4
|
+
* @description 条形图,适用于横向数据对比场景,Y轴为类目轴(分类数据),X轴为数值轴(连续数据),柱子横向排列
|
5
|
+
* 适用场景:
|
6
|
+
* - 数据项名称较长时
|
7
|
+
* - 需要展示数据排名对比
|
8
|
+
* - 展示正负双向数据
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个指标字段(度量)
|
11
|
+
* - 第一个维度会放至Y轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、坐标轴、数据标签、提示信息
|
15
|
+
*/
|
16
|
+
export interface Bar {
|
17
|
+
/**
|
18
|
+
* 条形图
|
19
|
+
* @description 条形图,适用于横向数据对比场景,Y轴为类目轴(分类数据),X轴为数值轴(连续数据),柱子横向排列
|
20
|
+
* @type {'bar'}
|
21
|
+
* @example 'bar'
|
22
|
+
*/
|
23
|
+
chartType: 'bar';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 条形图的数据最终会被转换为2个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{date:'2020-01-01', value:100}, {date:'2020-01-02', value:200}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 第一个维度被映射到Y轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: "date", alias: "日期"}, {id: "value", alias: "数值"}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 条形图指标会自动合并为一个指标, 映射到X轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: "value", alias: "数值"}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { Bar } from './bar';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 并列条形图类型定义
|
4
|
+
* @description 并列条形图,适用于多指标横向并行对比场景,多个条形平行排列展示不同指标值
|
5
|
+
* 适用场景:
|
6
|
+
* - 类别名称较长时的多指标对比
|
7
|
+
* - 排名与数值同时展示的横向比较
|
8
|
+
* - 多维度数据的并列分析
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个指标字段(度量)
|
11
|
+
* - 第一个维度会放至Y轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、坐标轴、数据标签、提示信息
|
15
|
+
*/
|
16
|
+
export interface BarParallel {
|
17
|
+
/**
|
18
|
+
* 并列条形图
|
19
|
+
* @description 并列条形图,适用于多指标横向并行对比场景
|
20
|
+
* @type {'barParallel'}
|
21
|
+
* @example 'barParallel'
|
22
|
+
*/
|
23
|
+
chartType: 'barParallel';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 并列条形图的数据最终会被转换为2个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{category:'A', value1:100, value2:200}, {category:'B', value1:150, value2:250}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 第一个维度被映射到Y轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: 'category', alias: '类别'}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 并列条形图指标会自动合并为一个指标, 映射到X轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: 'value1', alias: '指标1'}, {id: 'value2', alias: '指标2'}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { BarParallel } from './barParallel';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 百分比条形图类型定义
|
4
|
+
* @description 百分比条形图,适用于横向展示各类别占比关系的场景,X轴以百分比形式展示数据占比
|
5
|
+
* 适用场景:
|
6
|
+
* - 类别名称较长时的占比对比
|
7
|
+
* - 多维度数据的横向构成分析
|
8
|
+
* - 排名与占比同时展示的场景
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个维度字段和1个度量字段
|
11
|
+
* - 所有类别占比之和为100%
|
12
|
+
* - 支持多系列堆叠展示占比关系
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、坐标轴、百分比标签、提示信息、占比计算
|
15
|
+
*/
|
16
|
+
export interface BarPercent {
|
17
|
+
/**
|
18
|
+
* 百分比条形图
|
19
|
+
* @description 百分比条形图,以横向百分比形式展示各类别数据占比关系
|
20
|
+
* @type {'barPercent'}
|
21
|
+
* @example 'barPercent'
|
22
|
+
*/
|
23
|
+
chartType: 'barPercent';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 百分比条形图的数据最终会被转换为2个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{category:'A', value:30}, {category:'B', value:70}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 第一个维度会放至Y轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: 'category', alias: '类别'}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 指标会自动合并为一个指标, 映射到X轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { BarPercent } from './barPercent';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 柱状图类型定义
|
4
|
+
* @description 柱状图,适用于纵向数据对比场景,X轴为类目轴(分类数据),Y轴为数值轴(连续数据),柱子纵向排列
|
5
|
+
* 适用场景:
|
6
|
+
* - 数据项名称较短时
|
7
|
+
* - 需要直观比较不同类别的数值大小
|
8
|
+
* - 展示时间序列数据变化趋势
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个数值字段(度量)
|
11
|
+
* - 第一个维度会放至X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、坐标轴、数据标签、提示信息
|
15
|
+
*/
|
16
|
+
export interface Column {
|
17
|
+
/**
|
18
|
+
* 柱状图
|
19
|
+
* @description 柱状图,适用于纵向数据对比场景,X轴为类目轴(分类数据),Y轴为数值轴(连续数据),柱子纵向排列
|
20
|
+
* @type {'column'}
|
21
|
+
* @example 'column'
|
22
|
+
*/
|
23
|
+
chartType: 'column';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 柱状图的数据最终会被转换为2个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{category:'A', value:100}, {category:'B', value:200}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 柱状图的第一个维度被映射到X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: "category", alias: "类别"}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 柱状图的所有指标会自动合并为一个指标, 映射到Y轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: "value", alias: "数值"}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { Column } from './column';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 并列柱状图类型定义
|
4
|
+
* @description 并列柱状图,适用于多指标并行对比场景,多个柱子并列排列展示不同指标值
|
5
|
+
* 适用场景:
|
6
|
+
* - 同一维度下多指标并行对比
|
7
|
+
* - 多维度数据的横向比较
|
8
|
+
* - 指标间关联性分析
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个指标字段(度量)
|
11
|
+
* - 第一个维度会放至X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、坐标轴、数据标签、提示信息、指标排序
|
15
|
+
*/
|
16
|
+
export interface ColumnParallel {
|
17
|
+
/**
|
18
|
+
* 并列柱状图
|
19
|
+
* @description 并列柱状图,适用于多指标并行对比场景
|
20
|
+
* @type {'columnParallel'}
|
21
|
+
* @example 'columnParallel'
|
22
|
+
*/
|
23
|
+
chartType: 'columnParallel';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 并列柱状图的数据最终会被转换为2个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{category:'A', value1:100, value2:200}, {category:'B', value1:150, value2:250}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 第一个维度被映射到X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: 'category', alias: '类别'}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 并列柱状图的所有指标会自动合并为一个指标, 映射到Y轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: 'value1', alias: '指标1'}, {id: 'value2', alias: '指标2'}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { ColumnParallel } from './columnParallel';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 百分比柱状图类型定义
|
4
|
+
* @description 百分比柱状图,适用于展示各类别占比关系的场景,Y轴以百分比形式展示数据占比
|
5
|
+
* 适用场景:
|
6
|
+
* - 不同类别数据的占比对比
|
7
|
+
* - 多维度数据的构成分析
|
8
|
+
* - 时间序列的占比变化趋势
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个指标字段(度量)
|
11
|
+
* - 第一个维度会放至X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、坐标轴、百分比标签、提示信息、占比计算
|
15
|
+
*/
|
16
|
+
export interface ColumnPercent {
|
17
|
+
/**
|
18
|
+
* 百分比柱状图
|
19
|
+
* @description 百分比柱状图,以百分比形式展示各类别数据占比关系
|
20
|
+
* @type {'columnPercent'}
|
21
|
+
* @example 'columnPercent'
|
22
|
+
*/
|
23
|
+
chartType: 'columnPercent';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 百分比柱状图的数据最终会被转换为2个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{category:'A', value:30}, {category:'B', value:70}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 第一个维度被映射到X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: 'category', alias: '类别'}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 百分比柱状图指标会自动合并为一个指标, 映射到Y轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { ColumnPercent } from './columnPercent';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 环形图类型定义
|
4
|
+
* @description 环形图,适用于展示单一维度数据的占比关系,中心留有空白区域可展示汇总信息
|
5
|
+
* 适用场景:
|
6
|
+
* - 需要同时展示整体数据和各部分占比
|
7
|
+
* - 强调数据的整体与部分关系
|
8
|
+
* - 中心区域需要展示关键指标或标题
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个指标字段(度量)
|
11
|
+
* - 所有维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、数据标签、提示信息、占比计算、中心文本
|
15
|
+
*/
|
16
|
+
export interface Donut {
|
17
|
+
/**
|
18
|
+
* 环形图
|
19
|
+
* @description 环形图,中心留有空白区域的饼图变体
|
20
|
+
* @type {'donut'}
|
21
|
+
* @example 'donut'
|
22
|
+
*/
|
23
|
+
chartType: 'donut';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 环形图的数据最终会被转换为1个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{category:'A', value:30}, {category:'B', value:70}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 环形图的所有维度会与指标名称(存在多个指标时)合并成1个维度, 映射到饼图的角度, 并作为图例项展示.
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: 'category', alias: '类别'}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 环形图的所有指标会自动合并为一个指标, 映射到饼图的半径, 存在多个指标时, 指标名称会与其余维度合并, 并作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { Donut } from './donut';
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 双轴图类型定义
|
4
|
+
* @description 双轴图,适用于展示两个不同量级或不同单位指标的对比关系,包含主坐标轴和次坐标轴
|
5
|
+
* 适用场景:
|
6
|
+
* - 不同量级指标的对比分析
|
7
|
+
* - 相关性指标的趋势比较
|
8
|
+
* - 需要同时展示数值和增长率等复合指标
|
9
|
+
* - 支持不同类型图表组合(如折线图+柱状图/ 折线图+面积图/ 面积图+柱状图)
|
10
|
+
* 数据要求:
|
11
|
+
* - 至少1个指标字段(度量)
|
12
|
+
* - 支持指标组, 第一组指标会放置(主轴)左轴, 第二组指标会放置(次轴)右轴
|
13
|
+
* - 第一个维度会放至X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
14
|
+
* - 两组指标字段可分别映射到左右两个Y轴, 一个指标组内的所有会自动合并为一个指标
|
15
|
+
* 默认开启的功能:
|
16
|
+
* - 默认开启坐标轴、图例、数据标签、提示信息
|
17
|
+
*/
|
18
|
+
export interface DualAxis {
|
19
|
+
/**
|
20
|
+
* 双轴图
|
21
|
+
* @description 双轴图,展示两个不同量级指标对比关系的复合图表
|
22
|
+
* @type {'dualAxis'}
|
23
|
+
* @example 'dualAxis'
|
24
|
+
*/
|
25
|
+
chartType: 'dualAxis';
|
26
|
+
/**
|
27
|
+
* 数据集
|
28
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 双轴图的数据最终会被转换为2个维度, 1或2个指标(取决于用户是否配置了指标组).
|
29
|
+
* @type {Array<Record<string|number, any>>}
|
30
|
+
* @example [{month:'1月', value:100, growth:0.2}, {month:'2月', value:150, growth:0.5}]
|
31
|
+
*/
|
32
|
+
dataset: Dataset;
|
33
|
+
/**
|
34
|
+
* 维度
|
35
|
+
* @description 第一个维度会放至X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
36
|
+
* @type {Dimensions}
|
37
|
+
* @example [{id: 'month', alias: '月份'}]
|
38
|
+
*/
|
39
|
+
dimensions: Dimensions;
|
40
|
+
/**
|
41
|
+
* 指标
|
42
|
+
* @description 双轴图如果有2组指标组, 则每个组内的所有指标分别自动合并为一个指标, 分别映射到双轴图的左右轴, 如果指标不成组, 则会当作一组指标处理.
|
43
|
+
* @type {Measures}
|
44
|
+
* @example [{id: 'value', alias: '数值', axis: 'left'}, {id: 'growth', alias: '增长率', axis: 'right', format: 'percent'}]
|
45
|
+
*/
|
46
|
+
measures: Measures;
|
47
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { DualAxis } from './dualAxis';
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export type * from './table';
|
2
|
+
export type * from './pivotTable';
|
3
|
+
export type * from './line';
|
4
|
+
export type * from './column';
|
5
|
+
export type * from './columnParallel';
|
6
|
+
export type * from './columnPercent';
|
7
|
+
export type * from './bar';
|
8
|
+
export type * from './barParallel';
|
9
|
+
export type * from './barPercent';
|
10
|
+
export type * from './area';
|
11
|
+
export type * from './areaPercent';
|
12
|
+
export type * from './dualAxis';
|
13
|
+
export type * from './rose';
|
14
|
+
export type * from './pie';
|
15
|
+
export type * from './donut';
|
16
|
+
export type * from './vseedDSL';
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { Line } from './line';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 折线图类型定义
|
4
|
+
* @description 折线图,适用于展示数据随时间或有序类别变化的趋势,通过线段连接数据点形成趋势线
|
5
|
+
* 适用场景:
|
6
|
+
* - 展示时间序列数据的变化趋势
|
7
|
+
* - 比较多个数据系列的趋势对比
|
8
|
+
* - 分析数据的增长或下降规律
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个数值字段(度量)
|
11
|
+
* - 第一个维度会放至X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、坐标轴、数据点标记、提示信息、趋势线
|
15
|
+
*/
|
16
|
+
export interface Line {
|
17
|
+
/**
|
18
|
+
* 折线图
|
19
|
+
* @description 折线图,适用于展示数据随时间或有序类别变化的趋势
|
20
|
+
* @type {'line'}
|
21
|
+
* @example 'line'
|
22
|
+
*/
|
23
|
+
chartType: 'line';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 折线图的数据最终会被转换为2个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{month:'1月', value:100}, {month:'2月', value:150}, {month:'3月', value:120}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 折线图的第一个维度被映射到X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: "month", alias: "月份"}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 折线图的所有指标会自动合并为一个指标, 映射到Y轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: "value", alias: "数值"}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { Pie } from './pie';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 饼图类型定义
|
4
|
+
* @description 饼图,适用于展示单一维度数据的占比关系,通过扇形面积大小表示各类别占比
|
5
|
+
* 适用场景:
|
6
|
+
* - 展示分类数据的占比分布
|
7
|
+
* - 强调数据的整体与部分关系
|
8
|
+
* - 类别数量较少(建议不超过6个)的占比分析
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个数值字段(度量)
|
11
|
+
* - 所有维度会与指标名称(存在多个指标时)合并成一个维度, 作为图例项展示
|
12
|
+
* - 所有指标会自动合并为一个指标
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启图例、数据标签、提示信息、占比计算
|
15
|
+
*/
|
16
|
+
export interface Pie {
|
17
|
+
/**
|
18
|
+
* 饼图
|
19
|
+
* @description 饼图,展示单一维度数据的占比关系
|
20
|
+
* @type {'pie'}
|
21
|
+
* @example 'pie'
|
22
|
+
*/
|
23
|
+
chartType: 'pie';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 饼图的数据最终会被转换为1个维度, 1个指标.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{category:'A', value:30}, {category:'B', value:70}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 饼图的所有维度会与指标名称(存在多个指标时)合并成一个维度, 映射到角度, 并作为图例项展示
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: 'category', alias: '类别'}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 饼图的所有指标会自动合并为一个指标, 映射到半径轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { PivotTable } from './pivotTable';
|