@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,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 透视表类型定义
|
4
|
+
* @description 透视表,适用于多维度数据交叉分析场景,可灵活配置行、列维度和指标计算方式
|
5
|
+
* 适用场景:
|
6
|
+
* - 复杂多维数据统计分析
|
7
|
+
* - 数据钻取与聚合展示
|
8
|
+
* - 业务报表生成与数据探索
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个行维度 或 1个列维度 或 1个指标
|
11
|
+
* - 数据必须已聚合
|
12
|
+
* - 数据可被分组
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启行列排序、数据筛选、聚合计算、小计/总计
|
15
|
+
*/
|
16
|
+
export interface PivotTable {
|
17
|
+
/**
|
18
|
+
* 透视表
|
19
|
+
* @description 透视表,适用于多维度数据交叉分析场景
|
20
|
+
* @type {'pivotTable'}
|
21
|
+
* @example 'pivotTable'
|
22
|
+
*/
|
23
|
+
chartType: 'pivotTable';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 透视表的数据最终会被转换对应的树形结构, 用户无需手动进行数据处理.
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{region:'华东', product:'A', sales:1000}, {region:'华东', product:'B', sales:1500}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 透视表的行维度和列维度,会自动对数据进行处理为树形结构, 并映射到行和列轴, 可以通过 location : "rowDimension" | "columnDimension" 来控制一维度的映射位置
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: 'region', alias: '地区', isRow: true}, {id: 'product', alias: '产品', isColumn: true}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 透视表支持多个维度指标
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: 'sales', alias: '销售额', aggregation: 'sum'}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { Rose } from './rose';
|
@@ -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 Rose {
|
17
|
+
/**
|
18
|
+
* 玫瑰图
|
19
|
+
* @description 玫瑰图,通过极坐标系展示多维度数据对比关系
|
20
|
+
* @type {'rose'}
|
21
|
+
* @example 'rose'
|
22
|
+
*/
|
23
|
+
chartType: 'rose';
|
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 玫瑰图的第一个维度被映射到角度轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: 'category', alias: '类别'}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 玫瑰图的指标会自动合并为一个指标, 映射到半径轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: 'value', alias: '数值'}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type { Table } from './table';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { Dataset, Dimensions, Measures } from '../..';
|
2
|
+
/**
|
3
|
+
* 表格类型定义
|
4
|
+
* @description 表格,适用于详细数据展示场景,行列分明,便于查看具体数值
|
5
|
+
* 适用场景:
|
6
|
+
* - 需要展示详细数据明细
|
7
|
+
* - 数据项需要精确比对
|
8
|
+
* - 展示多维度数据属性
|
9
|
+
* 数据要求:
|
10
|
+
* - 至少1个维度字段
|
11
|
+
* - 至少1个度量字段
|
12
|
+
* - 维度字段会作为表格的列标题
|
13
|
+
* 默认开启的功能:
|
14
|
+
* - 默认开启排序、筛选、分页功能
|
15
|
+
*/
|
16
|
+
export interface Table {
|
17
|
+
/**
|
18
|
+
* 表格
|
19
|
+
* @description 标准表格组件,用于展示详细数据
|
20
|
+
* @type {'table'}
|
21
|
+
* @example 'table'
|
22
|
+
*/
|
23
|
+
chartType: 'table';
|
24
|
+
/**
|
25
|
+
* 数据集
|
26
|
+
* @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, 一个字段对应一列, 一个记录对应一行
|
27
|
+
* @type {Array<Record<string|number, any>>}
|
28
|
+
* @example [{id: 1, name: "A", value: 100}, {id: 2, name: "B", value: 200}]
|
29
|
+
*/
|
30
|
+
dataset: Dataset;
|
31
|
+
/**
|
32
|
+
* 维度
|
33
|
+
* @description 表格的每个维度会对应一列
|
34
|
+
* @type {Dimensions}
|
35
|
+
* @example [{id: "name", alias: "名称"}]
|
36
|
+
*/
|
37
|
+
dimensions: Dimensions;
|
38
|
+
/**
|
39
|
+
* 指标
|
40
|
+
* @description 表格的每个指标会对应一行, 并且天生支持指标组合.
|
41
|
+
* @type {Measures}
|
42
|
+
* @example [{id: "value", alias: "数值"}]
|
43
|
+
*/
|
44
|
+
measures: Measures;
|
45
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { Bar } from './bar';
|
2
|
+
import type { BarParallel } from './barParallel';
|
3
|
+
import type { Column } from './column';
|
4
|
+
import type { ColumnParallel } from './columnParallel';
|
5
|
+
import type { ColumnPercent } from './columnPercent';
|
6
|
+
import type { Line } from './line';
|
7
|
+
import type { Table } from './table';
|
8
|
+
import type { Rose } from './rose';
|
9
|
+
import type { BarPercent } from './barPercent';
|
10
|
+
import type { PivotTable } from './pivotTable';
|
11
|
+
import type { Pie } from './pie';
|
12
|
+
import type { Donut } from './donut';
|
13
|
+
import type { DualAxis } from './dualAxis';
|
14
|
+
import type { Area } from './area';
|
15
|
+
import type { AreaPercent } from './areaPercent';
|
16
|
+
export type VSeedDSL = Table | PivotTable | Line | Column | ColumnParallel | ColumnPercent | Bar | BarParallel | BarPercent | Area | AreaPercent | DualAxis | Rose | Pie | Donut;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { AdvancedVSeed, VSeed } from '../../properties';
|
2
|
+
import type { Pipe } from '../pipeline';
|
3
|
+
export type AdvancedPipelineContext = {
|
4
|
+
vseed: VSeed;
|
5
|
+
};
|
6
|
+
export type AdvancedPipe = Pipe<AdvancedVSeed, AdvancedPipelineContext>;
|
7
|
+
export type AdvancedPipeline = Pipe<AdvancedVSeed, AdvancedPipelineContext>[];
|
@@ -0,0 +1 @@
|
|
1
|
+
export type * from './advancedVSeed';
|
@@ -0,0 +1 @@
|
|
1
|
+
export type * from './spec';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { ISpec } from '@visactor/vchart';
|
2
|
+
import type { AdvancedVSeed, VSeed } from '../../properties';
|
3
|
+
import type { Pipe } from '../pipeline';
|
4
|
+
export type SpecPipelineContext = {
|
5
|
+
vseed: VSeed;
|
6
|
+
advancedVSeed: AdvancedVSeed;
|
7
|
+
};
|
8
|
+
export type SpecPipe = Pipe<ISpec, SpecPipelineContext>;
|
9
|
+
export type SpecPipeline = SpecPipe[];
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const zAdvancedVSeed: z.ZodObject<{
|
3
|
+
chartType: z.ZodEnum<{
|
4
|
+
table: "table";
|
5
|
+
pivotTable: "pivotTable";
|
6
|
+
line: "line";
|
7
|
+
column: "column";
|
8
|
+
columnPercent: "columnPercent";
|
9
|
+
columnParallel: "columnParallel";
|
10
|
+
bar: "bar";
|
11
|
+
barPercent: "barPercent";
|
12
|
+
barParallel: "barParallel";
|
13
|
+
area: "area";
|
14
|
+
areaPercent: "areaPercent";
|
15
|
+
rose: "rose";
|
16
|
+
pie: "pie";
|
17
|
+
donut: "donut";
|
18
|
+
dualAxis: "dualAxis";
|
19
|
+
}>;
|
20
|
+
dataset: z.ZodArray<z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>>;
|
21
|
+
datasetReshapeInfo: z.ZodObject<{
|
22
|
+
foldInfo: z.ZodObject<{
|
23
|
+
foldMap: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodUndefined]>>;
|
24
|
+
measureId: z.ZodString;
|
25
|
+
measureName: z.ZodString;
|
26
|
+
measureValue: z.ZodString;
|
27
|
+
}, z.core.$strip>;
|
28
|
+
unfoldInfo: z.ZodObject<{
|
29
|
+
colorItems: z.ZodArray<z.ZodString>;
|
30
|
+
groupName: z.ZodString;
|
31
|
+
}, z.core.$strip>;
|
32
|
+
}, z.core.$strip>;
|
33
|
+
dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
34
|
+
id: z.ZodString;
|
35
|
+
alias: z.ZodOptional<z.ZodString>;
|
36
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
37
|
+
location: z.ZodEnum<{
|
38
|
+
dimension: "dimension";
|
39
|
+
rowDimension: "rowDimension";
|
40
|
+
columnDimension: "columnDimension";
|
41
|
+
}>;
|
42
|
+
}, z.core.$strip>>>;
|
43
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
44
|
+
id: z.ZodString;
|
45
|
+
alias: z.ZodOptional<z.ZodString>;
|
46
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
47
|
+
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
48
|
+
id: z.ZodString;
|
49
|
+
alias: z.ZodOptional<z.ZodString>;
|
50
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
51
|
+
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
52
|
+
format: z.ZodOptional<z.ZodObject<{
|
53
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
54
|
+
number: "number";
|
55
|
+
percent: "percent";
|
56
|
+
permille: "permille";
|
57
|
+
}>>>;
|
58
|
+
ratio: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
59
|
+
symbol: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
60
|
+
thousandSeparator: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
61
|
+
decimalPlaces: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
62
|
+
round: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
63
|
+
round: "round";
|
64
|
+
floor: "floor";
|
65
|
+
ceil: "ceil";
|
66
|
+
}>>>;
|
67
|
+
prefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
68
|
+
suffix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
69
|
+
}, z.core.$strip>>;
|
70
|
+
}, z.core.$strip>]>>>;
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
72
|
+
id: z.ZodString;
|
73
|
+
alias: z.ZodOptional<z.ZodString>;
|
74
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
75
|
+
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
76
|
+
format: z.ZodOptional<z.ZodObject<{
|
77
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
78
|
+
number: "number";
|
79
|
+
percent: "percent";
|
80
|
+
permille: "permille";
|
81
|
+
}>>>;
|
82
|
+
ratio: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
83
|
+
symbol: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
84
|
+
thousandSeparator: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
85
|
+
decimalPlaces: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
86
|
+
round: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
87
|
+
round: "round";
|
88
|
+
floor: "floor";
|
89
|
+
ceil: "ceil";
|
90
|
+
}>>>;
|
91
|
+
prefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
92
|
+
suffix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
93
|
+
}, z.core.$strip>>;
|
94
|
+
}, z.core.$strip>]>>>;
|
95
|
+
encoding: z.ZodArray<z.ZodObject<{
|
96
|
+
x: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
97
|
+
y: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
98
|
+
color: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
99
|
+
group: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
100
|
+
angle: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
101
|
+
radius: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
102
|
+
tooltip: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
103
|
+
}, z.core.$strip>>;
|
104
|
+
}, z.core.$strip>;
|
105
|
+
export type AdvancedVSeed = z.infer<typeof zAdvancedVSeed>;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export type ChartType = 'table' | 'pivotTable' | 'line' | 'column' | 'columnPercent' | 'columnParallel' | 'bar' | 'barPercent' | 'barParallel' | 'area' | 'areaPercent' | 'rose' | 'pie' | 'donut' | 'dualAxis';
|
3
|
+
export declare enum ChartTypeEnum {
|
4
|
+
Table = "table",
|
5
|
+
PivotTable = "pivotTable",
|
6
|
+
Line = "line",
|
7
|
+
Column = "column",
|
8
|
+
ColumnPercent = "columnPercent",
|
9
|
+
ColumnParallel = "columnParallel",
|
10
|
+
Bar = "bar",
|
11
|
+
BarPercent = "barPercent",
|
12
|
+
BarParallel = "barParallel",
|
13
|
+
Area = "area",
|
14
|
+
AreaPercent = "areaPercent",
|
15
|
+
Rose = "rose",
|
16
|
+
Pie = "pie",
|
17
|
+
Donut = "donut",
|
18
|
+
DualAxis = "dualAxis"
|
19
|
+
}
|
20
|
+
export declare const zChartType: z.ZodEnum<{
|
21
|
+
table: "table";
|
22
|
+
pivotTable: "pivotTable";
|
23
|
+
line: "line";
|
24
|
+
column: "column";
|
25
|
+
columnPercent: "columnPercent";
|
26
|
+
columnParallel: "columnParallel";
|
27
|
+
bar: "bar";
|
28
|
+
barPercent: "barPercent";
|
29
|
+
barParallel: "barParallel";
|
30
|
+
area: "area";
|
31
|
+
areaPercent: "areaPercent";
|
32
|
+
rose: "rose";
|
33
|
+
pie: "pie";
|
34
|
+
donut: "donut";
|
35
|
+
dualAxis: "dualAxis";
|
36
|
+
}>;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
/**
|
3
|
+
* example dataset link:
|
4
|
+
* [
|
5
|
+
* { date: '2019', 20001:'type', profit:10, sales: null, },
|
6
|
+
* { date: '2020', 20001:'type', profit:30, sales: -1.1, },
|
7
|
+
* { date: '2021', 20001:'type', profit:30, sales: 1, },
|
8
|
+
* { date: '2023', 20001:'type', profit:40, sales: undefined, },
|
9
|
+
* { date: '2022', 20001:'type', profit:50, sales: 100, },
|
10
|
+
* ]
|
11
|
+
*/
|
12
|
+
export declare const zDatum: z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>;
|
13
|
+
export declare const zDataset: z.ZodArray<z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>>;
|
14
|
+
export type Datum = z.infer<typeof zDatum>;
|
15
|
+
export type Dataset = z.infer<typeof zDataset>;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export type FoldInfo = {
|
3
|
+
foldMap: Record<string, string | undefined>;
|
4
|
+
measureId: string;
|
5
|
+
measureName: string;
|
6
|
+
measureValue: string;
|
7
|
+
};
|
8
|
+
export type UnfoldInfo = {
|
9
|
+
groupName: string;
|
10
|
+
colorItems: string[];
|
11
|
+
};
|
12
|
+
export declare const zFoldInfo: z.ZodObject<{
|
13
|
+
foldMap: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodUndefined]>>;
|
14
|
+
measureId: z.ZodString;
|
15
|
+
measureName: z.ZodString;
|
16
|
+
measureValue: z.ZodString;
|
17
|
+
}, z.core.$strip>;
|
18
|
+
export declare const zUnfoldInfo: z.ZodObject<{
|
19
|
+
colorItems: z.ZodArray<z.ZodString>;
|
20
|
+
groupName: z.ZodString;
|
21
|
+
}, z.core.$strip>;
|
22
|
+
export declare const zDatasetReshapeInfo: z.ZodObject<{
|
23
|
+
foldInfo: z.ZodObject<{
|
24
|
+
foldMap: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodUndefined]>>;
|
25
|
+
measureId: z.ZodString;
|
26
|
+
measureName: z.ZodString;
|
27
|
+
measureValue: z.ZodString;
|
28
|
+
}, z.core.$strip>;
|
29
|
+
unfoldInfo: z.ZodObject<{
|
30
|
+
colorItems: z.ZodArray<z.ZodString>;
|
31
|
+
groupName: z.ZodString;
|
32
|
+
}, z.core.$strip>;
|
33
|
+
}, z.core.$strip>;
|
34
|
+
export type DatasetReshapeInfo = z.infer<typeof zDatasetReshapeInfo>;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const zDimension: z.ZodObject<{
|
3
|
+
id: z.ZodString;
|
4
|
+
alias: z.ZodOptional<z.ZodString>;
|
5
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
6
|
+
location: z.ZodEnum<{
|
7
|
+
dimension: "dimension";
|
8
|
+
rowDimension: "rowDimension";
|
9
|
+
columnDimension: "columnDimension";
|
10
|
+
}>;
|
11
|
+
}, z.core.$strip>;
|
12
|
+
export declare const zDimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
13
|
+
id: z.ZodString;
|
14
|
+
alias: z.ZodOptional<z.ZodString>;
|
15
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
16
|
+
location: z.ZodEnum<{
|
17
|
+
dimension: "dimension";
|
18
|
+
rowDimension: "rowDimension";
|
19
|
+
columnDimension: "columnDimension";
|
20
|
+
}>;
|
21
|
+
}, z.core.$strip>>>;
|
22
|
+
export type Dimension = z.infer<typeof zDimension>;
|
23
|
+
export type Dimensions = z.infer<typeof zDimensions>;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const zEncoding: z.ZodArray<z.ZodObject<{
|
3
|
+
x: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
4
|
+
y: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
5
|
+
color: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
6
|
+
group: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
7
|
+
angle: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
8
|
+
radius: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
9
|
+
tooltip: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
10
|
+
}, z.core.$strip>>;
|
11
|
+
export type Encoding = Array<{
|
12
|
+
x?: string[];
|
13
|
+
y?: string[];
|
14
|
+
color?: string[];
|
15
|
+
group?: string[];
|
16
|
+
angle?: string[];
|
17
|
+
radius?: string[];
|
18
|
+
tooltip?: string[];
|
19
|
+
}>;
|
@@ -0,0 +1,109 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const zMeasure: z.ZodObject<{
|
3
|
+
id: z.ZodString;
|
4
|
+
alias: z.ZodOptional<z.ZodString>;
|
5
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
6
|
+
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
7
|
+
format: z.ZodOptional<z.ZodObject<{
|
8
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
9
|
+
number: "number";
|
10
|
+
percent: "percent";
|
11
|
+
permille: "permille";
|
12
|
+
}>>>;
|
13
|
+
ratio: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
14
|
+
symbol: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
15
|
+
thousandSeparator: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
16
|
+
decimalPlaces: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
17
|
+
round: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
18
|
+
round: "round";
|
19
|
+
floor: "floor";
|
20
|
+
ceil: "ceil";
|
21
|
+
}>>>;
|
22
|
+
prefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
23
|
+
suffix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
24
|
+
}, z.core.$strip>>;
|
25
|
+
}, z.core.$strip>;
|
26
|
+
export declare const zMeasureGroup: z.ZodObject<{
|
27
|
+
id: z.ZodString;
|
28
|
+
alias: z.ZodOptional<z.ZodString>;
|
29
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
30
|
+
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
31
|
+
id: z.ZodString;
|
32
|
+
alias: z.ZodOptional<z.ZodString>;
|
33
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
34
|
+
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
35
|
+
format: z.ZodOptional<z.ZodObject<{
|
36
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
37
|
+
number: "number";
|
38
|
+
percent: "percent";
|
39
|
+
permille: "permille";
|
40
|
+
}>>>;
|
41
|
+
ratio: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
42
|
+
symbol: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
43
|
+
thousandSeparator: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
44
|
+
decimalPlaces: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
45
|
+
round: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
46
|
+
round: "round";
|
47
|
+
floor: "floor";
|
48
|
+
ceil: "ceil";
|
49
|
+
}>>>;
|
50
|
+
prefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
51
|
+
suffix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
52
|
+
}, z.core.$strip>>;
|
53
|
+
}, z.core.$strip>]>>>;
|
54
|
+
}, z.core.$strip>;
|
55
|
+
export declare const zMeasures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
56
|
+
id: z.ZodString;
|
57
|
+
alias: z.ZodOptional<z.ZodString>;
|
58
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
59
|
+
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
60
|
+
id: z.ZodString;
|
61
|
+
alias: z.ZodOptional<z.ZodString>;
|
62
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
63
|
+
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
64
|
+
format: z.ZodOptional<z.ZodObject<{
|
65
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
66
|
+
number: "number";
|
67
|
+
percent: "percent";
|
68
|
+
permille: "permille";
|
69
|
+
}>>>;
|
70
|
+
ratio: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
71
|
+
symbol: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
72
|
+
thousandSeparator: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
73
|
+
decimalPlaces: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
74
|
+
round: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
75
|
+
round: "round";
|
76
|
+
floor: "floor";
|
77
|
+
ceil: "ceil";
|
78
|
+
}>>>;
|
79
|
+
prefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
80
|
+
suffix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
81
|
+
}, z.core.$strip>>;
|
82
|
+
}, z.core.$strip>]>>>;
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
84
|
+
id: z.ZodString;
|
85
|
+
alias: z.ZodOptional<z.ZodString>;
|
86
|
+
visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
87
|
+
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
88
|
+
format: z.ZodOptional<z.ZodObject<{
|
89
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
90
|
+
number: "number";
|
91
|
+
percent: "percent";
|
92
|
+
permille: "permille";
|
93
|
+
}>>>;
|
94
|
+
ratio: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
95
|
+
symbol: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
96
|
+
thousandSeparator: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
97
|
+
decimalPlaces: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
98
|
+
round: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
99
|
+
round: "round";
|
100
|
+
floor: "floor";
|
101
|
+
ceil: "ceil";
|
102
|
+
}>>>;
|
103
|
+
prefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
104
|
+
suffix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
105
|
+
}, z.core.$strip>>;
|
106
|
+
}, z.core.$strip>]>>>;
|
107
|
+
export type Measures = z.infer<typeof zMeasures>;
|
108
|
+
export type Measure = z.infer<typeof zMeasure>;
|
109
|
+
export type MeasureGroup = z.infer<typeof zMeasureGroup>;
|