@visactor/vseed 0.0.20 → 0.0.22
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/advanced/colorItems.d.ts +1 -0
- package/dist/builder/builder/advanced/index.d.ts +1 -1
- package/dist/builder/builder/builder.d.ts +220 -118
- package/dist/index.cjs +595 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +558 -62
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/chart/pipes/analysis/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/analysis/sort.d.ts +4 -0
- package/dist/pipeline/advanced/chart/pipes/index.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipes/dataset/datasetPivot.d.ts +0 -1
- package/dist/pipeline/spec/chart/pipes/dataset/index.d.ts +1 -1
- package/dist/pipeline/spec/table/pipes/index.d.ts +1 -0
- package/dist/pipeline/spec/table/pipes/theme/bodyStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/cornerHeaderStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/frameStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/headerStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/index.d.ts +6 -0
- package/dist/pipeline/spec/table/pipes/theme/rowHeaderStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/scrollStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/selectionStyle.d.ts +2 -0
- package/dist/types/advancedVSeed.d.ts +58 -61
- package/dist/types/chartType/area/area.d.ts +32 -46
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +32 -46
- package/dist/types/chartType/bar/bar.d.ts +33 -46
- package/dist/types/chartType/barParallel/barParallel.d.ts +32 -46
- package/dist/types/chartType/barPercent/barPercent.d.ts +32 -46
- package/dist/types/chartType/column/column.d.ts +32 -46
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +32 -46
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +32 -46
- package/dist/types/chartType/donut/donut.d.ts +8 -46
- package/dist/types/chartType/dualAxis/dualAxis.d.ts +2 -2
- package/dist/types/chartType/funnel/funnel.d.ts +8 -46
- package/dist/types/chartType/line/line.d.ts +48 -46
- package/dist/types/chartType/pie/pie.d.ts +8 -46
- package/dist/types/chartType/pivotTable/pivotTable.d.ts +8 -7
- package/dist/types/chartType/rose/rose.d.ts +9 -46
- package/dist/types/chartType/roseParallel/roseParallel.d.ts +10 -47
- package/dist/types/chartType/scatter/scatter.d.ts +8 -46
- package/dist/types/chartType/table/table.d.ts +6 -44
- package/dist/types/properties/analysis/analysis.d.ts +4 -0
- package/dist/types/properties/analysis/index.d.ts +3 -0
- package/dist/types/properties/analysis/sortAxis.d.ts +39 -0
- package/dist/types/properties/analysis/sortLegend.d.ts +39 -0
- package/dist/types/properties/config/config.d.ts +50 -2
- package/dist/types/properties/dimensions/dimensions.d.ts +20 -44
- package/dist/types/properties/index.d.ts +1 -0
- package/dist/types/properties/measures/measures.d.ts +11 -87
- package/dist/types/properties/theme/customTheme.d.ts +48 -4
- package/dist/types/vseed.d.ts +117 -709
- package/dist/umd/index.js +8818 -128
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import type { Locale } from '../../i18n';
|
3
|
-
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend,
|
3
|
+
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XLinearAxis, YBandAxis, MeasureTree, SortAxis, SortLegend } from '../../properties';
|
4
4
|
/**
|
5
5
|
* 并列条形图类型定义
|
6
6
|
* @description 并列条形图,适用于多指标横向并行对比场景,多个条形平行排列展示不同指标值
|
@@ -43,7 +43,7 @@ export interface BarParallel {
|
|
43
43
|
* @type {DimensionTree}
|
44
44
|
* @example [{id: 'value1', alias: '指标1'}, {id: 'value2', alias: '指标2'}]
|
45
45
|
*/
|
46
|
-
measures?:
|
46
|
+
measures?: MeasureTree;
|
47
47
|
/**
|
48
48
|
* 图表的背景颜色
|
49
49
|
* @default transparent 默认为透明背景
|
@@ -91,6 +91,30 @@ export interface BarParallel {
|
|
91
91
|
* @default 8
|
92
92
|
*/
|
93
93
|
stackCornerRadius?: StackCornerRadius;
|
94
|
+
/**
|
95
|
+
* @description Y轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
96
|
+
* @example
|
97
|
+
* sortAxis: {
|
98
|
+
* orderBy: 'profit',
|
99
|
+
* order: 'asc',
|
100
|
+
* }
|
101
|
+
* sortAxis: {
|
102
|
+
* customOrder:['2019', '2020', '2021']
|
103
|
+
* }
|
104
|
+
*/
|
105
|
+
sortAxis?: SortAxis;
|
106
|
+
/**
|
107
|
+
* @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
108
|
+
* @example
|
109
|
+
* sortLegend: {
|
110
|
+
* orderBy: 'profit',
|
111
|
+
* order: 'asc',
|
112
|
+
* }
|
113
|
+
* sortLegend: {
|
114
|
+
* customOrder:['2019', '2020', '2021']
|
115
|
+
* }
|
116
|
+
*/
|
117
|
+
sortLegend?: SortLegend;
|
94
118
|
/**
|
95
119
|
* 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
|
96
120
|
* @default light 默认为亮色主题
|
@@ -142,55 +166,17 @@ export declare const zBarParallel: z.ZodObject<{
|
|
142
166
|
dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
143
167
|
id: z.ZodString;
|
144
168
|
alias: z.ZodOptional<z.ZodString>;
|
145
|
-
location: z.
|
169
|
+
location: z.ZodDefault<z.ZodEnum<{
|
146
170
|
dimension: "dimension";
|
147
171
|
rowDimension: "rowDimension";
|
148
172
|
columnDimension: "columnDimension";
|
149
|
-
}
|
173
|
+
}>>;
|
150
174
|
}, z.core.$strip>>>;
|
151
|
-
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
152
|
-
id: z.ZodString;
|
153
|
-
alias: z.ZodOptional<z.ZodString>;
|
154
|
-
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
155
|
-
id: z.ZodString;
|
156
|
-
alias: z.ZodOptional<z.ZodString>;
|
157
|
-
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
158
|
-
format: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
159
|
-
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
160
|
-
number: "number";
|
161
|
-
percent: "percent";
|
162
|
-
permille: "permille";
|
163
|
-
scientific: "scientific";
|
164
|
-
}>>>;
|
165
|
-
ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
166
|
-
symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
167
|
-
thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
168
|
-
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
169
|
-
suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
170
|
-
fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
171
|
-
significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
172
|
-
roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
173
|
-
morePrecision: "morePrecision";
|
174
|
-
lessPrecision: "lessPrecision";
|
175
|
-
}>>>;
|
176
|
-
roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
177
|
-
floor: "floor";
|
178
|
-
ceil: "ceil";
|
179
|
-
expand: "expand";
|
180
|
-
trunc: "trunc";
|
181
|
-
halfCeil: "halfCeil";
|
182
|
-
halfFloor: "halfFloor";
|
183
|
-
halfExpand: "halfExpand";
|
184
|
-
halfTrunc: "halfTrunc";
|
185
|
-
halfEven: "halfEven";
|
186
|
-
}>>>;
|
187
|
-
}, z.core.$strip>>>>;
|
188
|
-
}, z.core.$strip>]>>>;
|
189
|
-
}, z.core.$strip>, z.ZodObject<{
|
175
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
|
190
176
|
id: z.ZodString;
|
191
177
|
alias: z.ZodOptional<z.ZodString>;
|
192
|
-
autoFormat: z.
|
193
|
-
format: z.
|
178
|
+
autoFormat: z.ZodDefault<z.ZodBoolean>;
|
179
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
194
180
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
195
181
|
number: "number";
|
196
182
|
percent: "percent";
|
@@ -219,7 +205,7 @@ export declare const zBarParallel: z.ZodObject<{
|
|
219
205
|
halfTrunc: "halfTrunc";
|
220
206
|
halfEven: "halfEven";
|
221
207
|
}>>>;
|
222
|
-
}, z.core.$strip
|
208
|
+
}, z.core.$strip>>>;
|
223
209
|
}, z.core.$strip>]>>>;
|
224
210
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
225
211
|
color: z.ZodOptional<z.ZodObject<{
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import type { Locale } from '../../i18n';
|
3
|
-
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend,
|
3
|
+
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XLinearAxis, YBandAxis, MeasureTree, SortAxis, SortLegend } from '../../properties';
|
4
4
|
/**
|
5
5
|
* 百分比条形图类型定义
|
6
6
|
* @description 百分比条形图,适用于横向展示各类别占比关系的场景,X轴以百分比形式展示数据占比
|
@@ -43,7 +43,7 @@ export interface BarPercent {
|
|
43
43
|
* @type {DimensionTree}
|
44
44
|
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
45
45
|
*/
|
46
|
-
measures?:
|
46
|
+
measures?: MeasureTree;
|
47
47
|
/**
|
48
48
|
* 图表的背景颜色
|
49
49
|
* @default transparent 默认为透明背景
|
@@ -91,6 +91,30 @@ export interface BarPercent {
|
|
91
91
|
* @default 8
|
92
92
|
*/
|
93
93
|
stackCornerRadius?: StackCornerRadius;
|
94
|
+
/**
|
95
|
+
* @description Y轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
96
|
+
* @example
|
97
|
+
* sortAxis: {
|
98
|
+
* orderBy: 'profit',
|
99
|
+
* order: 'asc',
|
100
|
+
* }
|
101
|
+
* sortAxis: {
|
102
|
+
* customOrder:['2019', '2020', '2021']
|
103
|
+
* }
|
104
|
+
*/
|
105
|
+
sortAxis?: SortAxis;
|
106
|
+
/**
|
107
|
+
* @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
108
|
+
* @example
|
109
|
+
* sortLegend: {
|
110
|
+
* orderBy: 'profit',
|
111
|
+
* order: 'asc',
|
112
|
+
* }
|
113
|
+
* sortLegend: {
|
114
|
+
* customOrder:['2019', '2020', '2021']
|
115
|
+
* }
|
116
|
+
*/
|
117
|
+
sortLegend?: SortLegend;
|
94
118
|
/**
|
95
119
|
* 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
|
96
120
|
* @default light 默认为亮色主题
|
@@ -142,55 +166,17 @@ export declare const zBarPercent: z.ZodObject<{
|
|
142
166
|
dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
143
167
|
id: z.ZodString;
|
144
168
|
alias: z.ZodOptional<z.ZodString>;
|
145
|
-
location: z.
|
169
|
+
location: z.ZodDefault<z.ZodEnum<{
|
146
170
|
dimension: "dimension";
|
147
171
|
rowDimension: "rowDimension";
|
148
172
|
columnDimension: "columnDimension";
|
149
|
-
}
|
173
|
+
}>>;
|
150
174
|
}, z.core.$strip>>>;
|
151
|
-
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
152
|
-
id: z.ZodString;
|
153
|
-
alias: z.ZodOptional<z.ZodString>;
|
154
|
-
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
155
|
-
id: z.ZodString;
|
156
|
-
alias: z.ZodOptional<z.ZodString>;
|
157
|
-
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
158
|
-
format: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
159
|
-
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
160
|
-
number: "number";
|
161
|
-
percent: "percent";
|
162
|
-
permille: "permille";
|
163
|
-
scientific: "scientific";
|
164
|
-
}>>>;
|
165
|
-
ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
166
|
-
symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
167
|
-
thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
168
|
-
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
169
|
-
suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
170
|
-
fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
171
|
-
significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
172
|
-
roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
173
|
-
morePrecision: "morePrecision";
|
174
|
-
lessPrecision: "lessPrecision";
|
175
|
-
}>>>;
|
176
|
-
roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
177
|
-
floor: "floor";
|
178
|
-
ceil: "ceil";
|
179
|
-
expand: "expand";
|
180
|
-
trunc: "trunc";
|
181
|
-
halfCeil: "halfCeil";
|
182
|
-
halfFloor: "halfFloor";
|
183
|
-
halfExpand: "halfExpand";
|
184
|
-
halfTrunc: "halfTrunc";
|
185
|
-
halfEven: "halfEven";
|
186
|
-
}>>>;
|
187
|
-
}, z.core.$strip>>>>;
|
188
|
-
}, z.core.$strip>]>>>;
|
189
|
-
}, z.core.$strip>, z.ZodObject<{
|
175
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
|
190
176
|
id: z.ZodString;
|
191
177
|
alias: z.ZodOptional<z.ZodString>;
|
192
|
-
autoFormat: z.
|
193
|
-
format: z.
|
178
|
+
autoFormat: z.ZodDefault<z.ZodBoolean>;
|
179
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
194
180
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
195
181
|
number: "number";
|
196
182
|
percent: "percent";
|
@@ -219,7 +205,7 @@ export declare const zBarPercent: z.ZodObject<{
|
|
219
205
|
halfTrunc: "halfTrunc";
|
220
206
|
halfEven: "halfEven";
|
221
207
|
}>>>;
|
222
|
-
}, z.core.$strip
|
208
|
+
}, z.core.$strip>>>;
|
223
209
|
}, z.core.$strip>]>>>;
|
224
210
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
225
211
|
color: z.ZodOptional<z.ZodObject<{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Locale } from '../../i18n';
|
2
|
-
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend,
|
2
|
+
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree, SortAxis, SortLegend } from '../../properties';
|
3
3
|
import { z } from 'zod';
|
4
4
|
/**
|
5
5
|
* 柱状图类型定义
|
@@ -43,7 +43,7 @@ export interface Column {
|
|
43
43
|
* @type {DimensionTree}
|
44
44
|
* @example [{id: "value", alias: "数值"}]
|
45
45
|
*/
|
46
|
-
measures?:
|
46
|
+
measures?: MeasureTree;
|
47
47
|
/**
|
48
48
|
* 图表的背景颜色
|
49
49
|
* @default transparent 默认为透明背景
|
@@ -80,6 +80,30 @@ export interface Column {
|
|
80
80
|
* @description 数值轴, y轴配置, 用于定义图表的y轴, 包括y轴的位置, 格式, 样式等.
|
81
81
|
*/
|
82
82
|
yAxis?: YLinearAxis;
|
83
|
+
/**
|
84
|
+
* @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
85
|
+
* @example
|
86
|
+
* sortAxis: {
|
87
|
+
* orderBy: 'profit',
|
88
|
+
* order: 'asc',
|
89
|
+
* }
|
90
|
+
* sortAxis: {
|
91
|
+
* customOrder:['2019', '2020', '2021']
|
92
|
+
* }
|
93
|
+
*/
|
94
|
+
sortAxis?: SortAxis;
|
95
|
+
/**
|
96
|
+
* @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
97
|
+
* @example
|
98
|
+
* sortLegend: {
|
99
|
+
* orderBy: 'profit',
|
100
|
+
* order: 'asc',
|
101
|
+
* }
|
102
|
+
* sortLegend: {
|
103
|
+
* customOrder:['2019', '2020', '2021']
|
104
|
+
* }
|
105
|
+
*/
|
106
|
+
sortLegend?: SortLegend;
|
83
107
|
/**
|
84
108
|
* 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
|
85
109
|
* @default light 默认为亮色主题
|
@@ -142,55 +166,17 @@ export declare const zColumn: z.ZodObject<{
|
|
142
166
|
dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
143
167
|
id: z.ZodString;
|
144
168
|
alias: z.ZodOptional<z.ZodString>;
|
145
|
-
location: z.
|
169
|
+
location: z.ZodDefault<z.ZodEnum<{
|
146
170
|
dimension: "dimension";
|
147
171
|
rowDimension: "rowDimension";
|
148
172
|
columnDimension: "columnDimension";
|
149
|
-
}
|
173
|
+
}>>;
|
150
174
|
}, z.core.$strip>>>;
|
151
|
-
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
152
|
-
id: z.ZodString;
|
153
|
-
alias: z.ZodOptional<z.ZodString>;
|
154
|
-
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
155
|
-
id: z.ZodString;
|
156
|
-
alias: z.ZodOptional<z.ZodString>;
|
157
|
-
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
158
|
-
format: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
159
|
-
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
160
|
-
number: "number";
|
161
|
-
percent: "percent";
|
162
|
-
permille: "permille";
|
163
|
-
scientific: "scientific";
|
164
|
-
}>>>;
|
165
|
-
ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
166
|
-
symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
167
|
-
thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
168
|
-
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
169
|
-
suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
170
|
-
fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
171
|
-
significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
172
|
-
roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
173
|
-
morePrecision: "morePrecision";
|
174
|
-
lessPrecision: "lessPrecision";
|
175
|
-
}>>>;
|
176
|
-
roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
177
|
-
floor: "floor";
|
178
|
-
ceil: "ceil";
|
179
|
-
expand: "expand";
|
180
|
-
trunc: "trunc";
|
181
|
-
halfCeil: "halfCeil";
|
182
|
-
halfFloor: "halfFloor";
|
183
|
-
halfExpand: "halfExpand";
|
184
|
-
halfTrunc: "halfTrunc";
|
185
|
-
halfEven: "halfEven";
|
186
|
-
}>>>;
|
187
|
-
}, z.core.$strip>>>>;
|
188
|
-
}, z.core.$strip>]>>>;
|
189
|
-
}, z.core.$strip>, z.ZodObject<{
|
175
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
|
190
176
|
id: z.ZodString;
|
191
177
|
alias: z.ZodOptional<z.ZodString>;
|
192
|
-
autoFormat: z.
|
193
|
-
format: z.
|
178
|
+
autoFormat: z.ZodDefault<z.ZodBoolean>;
|
179
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
194
180
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
195
181
|
number: "number";
|
196
182
|
percent: "percent";
|
@@ -219,7 +205,7 @@ export declare const zColumn: z.ZodObject<{
|
|
219
205
|
halfTrunc: "halfTrunc";
|
220
206
|
halfEven: "halfEven";
|
221
207
|
}>>>;
|
222
|
-
}, z.core.$strip
|
208
|
+
}, z.core.$strip>>>;
|
223
209
|
}, z.core.$strip>]>>>;
|
224
210
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
225
211
|
color: z.ZodOptional<z.ZodObject<{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Locale } from '../../i18n';
|
2
|
-
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend,
|
2
|
+
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree, SortLegend, SortAxis } from '../../properties';
|
3
3
|
import { z } from 'zod';
|
4
4
|
/**
|
5
5
|
* 并列柱状图类型定义
|
@@ -43,7 +43,7 @@ export interface ColumnParallel {
|
|
43
43
|
* @type {DimensionTree}
|
44
44
|
* @example [{id: 'value1', alias: '指标1'}, {id: 'value2', alias: '指标2'}]
|
45
45
|
*/
|
46
|
-
measures?:
|
46
|
+
measures?: MeasureTree;
|
47
47
|
/**
|
48
48
|
* 图表的背景颜色
|
49
49
|
* @default transparent 默认为透明背景
|
@@ -91,6 +91,30 @@ export interface ColumnParallel {
|
|
91
91
|
* @default 8
|
92
92
|
*/
|
93
93
|
stackCornerRadius?: StackCornerRadius;
|
94
|
+
/**
|
95
|
+
* @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
96
|
+
* @example
|
97
|
+
* sortAxis: {
|
98
|
+
* orderBy: 'profit',
|
99
|
+
* order: 'asc',
|
100
|
+
* }
|
101
|
+
* sortAxis: {
|
102
|
+
* customOrder:['2019', '2020', '2021']
|
103
|
+
* }
|
104
|
+
*/
|
105
|
+
sortAxis?: SortAxis;
|
106
|
+
/**
|
107
|
+
* @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
108
|
+
* @example
|
109
|
+
* sortLegend: {
|
110
|
+
* orderBy: 'profit',
|
111
|
+
* order: 'asc',
|
112
|
+
* }
|
113
|
+
* sortLegend: {
|
114
|
+
* customOrder:['2019', '2020', '2021']
|
115
|
+
* }
|
116
|
+
*/
|
117
|
+
sortLegend?: SortLegend;
|
94
118
|
/**
|
95
119
|
* 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
|
96
120
|
* @default light 默认为亮色主题
|
@@ -142,55 +166,17 @@ export declare const zColumnParallel: z.ZodObject<{
|
|
142
166
|
dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
143
167
|
id: z.ZodString;
|
144
168
|
alias: z.ZodOptional<z.ZodString>;
|
145
|
-
location: z.
|
169
|
+
location: z.ZodDefault<z.ZodEnum<{
|
146
170
|
dimension: "dimension";
|
147
171
|
rowDimension: "rowDimension";
|
148
172
|
columnDimension: "columnDimension";
|
149
|
-
}
|
173
|
+
}>>;
|
150
174
|
}, z.core.$strip>>>;
|
151
|
-
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
152
|
-
id: z.ZodString;
|
153
|
-
alias: z.ZodOptional<z.ZodString>;
|
154
|
-
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
155
|
-
id: z.ZodString;
|
156
|
-
alias: z.ZodOptional<z.ZodString>;
|
157
|
-
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
158
|
-
format: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
159
|
-
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
160
|
-
number: "number";
|
161
|
-
percent: "percent";
|
162
|
-
permille: "permille";
|
163
|
-
scientific: "scientific";
|
164
|
-
}>>>;
|
165
|
-
ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
166
|
-
symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
167
|
-
thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
168
|
-
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
169
|
-
suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
170
|
-
fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
171
|
-
significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
172
|
-
roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
173
|
-
morePrecision: "morePrecision";
|
174
|
-
lessPrecision: "lessPrecision";
|
175
|
-
}>>>;
|
176
|
-
roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
177
|
-
floor: "floor";
|
178
|
-
ceil: "ceil";
|
179
|
-
expand: "expand";
|
180
|
-
trunc: "trunc";
|
181
|
-
halfCeil: "halfCeil";
|
182
|
-
halfFloor: "halfFloor";
|
183
|
-
halfExpand: "halfExpand";
|
184
|
-
halfTrunc: "halfTrunc";
|
185
|
-
halfEven: "halfEven";
|
186
|
-
}>>>;
|
187
|
-
}, z.core.$strip>>>>;
|
188
|
-
}, z.core.$strip>]>>>;
|
189
|
-
}, z.core.$strip>, z.ZodObject<{
|
175
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
|
190
176
|
id: z.ZodString;
|
191
177
|
alias: z.ZodOptional<z.ZodString>;
|
192
|
-
autoFormat: z.
|
193
|
-
format: z.
|
178
|
+
autoFormat: z.ZodDefault<z.ZodBoolean>;
|
179
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
194
180
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
195
181
|
number: "number";
|
196
182
|
percent: "percent";
|
@@ -219,7 +205,7 @@ export declare const zColumnParallel: z.ZodObject<{
|
|
219
205
|
halfTrunc: "halfTrunc";
|
220
206
|
halfEven: "halfEven";
|
221
207
|
}>>>;
|
222
|
-
}, z.core.$strip
|
208
|
+
}, z.core.$strip>>>;
|
223
209
|
}, z.core.$strip>]>>>;
|
224
210
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
225
211
|
color: z.ZodOptional<z.ZodObject<{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Locale } from '../../i18n';
|
2
|
-
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend,
|
2
|
+
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree, SortAxis, SortLegend } from '../../properties';
|
3
3
|
import { z } from 'zod';
|
4
4
|
/**
|
5
5
|
* 百分比柱状图类型定义
|
@@ -43,7 +43,7 @@ export interface ColumnPercent {
|
|
43
43
|
* @type {DimensionTree}
|
44
44
|
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
45
45
|
*/
|
46
|
-
measures?:
|
46
|
+
measures?: MeasureTree;
|
47
47
|
/**
|
48
48
|
* 图表的背景颜色
|
49
49
|
* @default transparent 默认为透明背景
|
@@ -91,6 +91,30 @@ export interface ColumnPercent {
|
|
91
91
|
* @default 8
|
92
92
|
*/
|
93
93
|
stackCornerRadius?: StackCornerRadius;
|
94
|
+
/**
|
95
|
+
* @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
96
|
+
* @example
|
97
|
+
* sortAxis: {
|
98
|
+
* orderBy: 'profit',
|
99
|
+
* order: 'asc',
|
100
|
+
* }
|
101
|
+
* sortAxis: {
|
102
|
+
* customOrder:['2019', '2020', '2021']
|
103
|
+
* }
|
104
|
+
*/
|
105
|
+
sortAxis?: SortAxis;
|
106
|
+
/**
|
107
|
+
* @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
108
|
+
* @example
|
109
|
+
* sortLegend: {
|
110
|
+
* orderBy: 'profit',
|
111
|
+
* order: 'asc',
|
112
|
+
* }
|
113
|
+
* sortLegend: {
|
114
|
+
* customOrder:['2019', '2020', '2021']
|
115
|
+
* }
|
116
|
+
*/
|
117
|
+
sortLegend?: SortLegend;
|
94
118
|
/**
|
95
119
|
* 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
|
96
120
|
* @default light 默认为亮色主题
|
@@ -142,55 +166,17 @@ export declare const zColumnPercent: z.ZodObject<{
|
|
142
166
|
dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
143
167
|
id: z.ZodString;
|
144
168
|
alias: z.ZodOptional<z.ZodString>;
|
145
|
-
location: z.
|
169
|
+
location: z.ZodDefault<z.ZodEnum<{
|
146
170
|
dimension: "dimension";
|
147
171
|
rowDimension: "rowDimension";
|
148
172
|
columnDimension: "columnDimension";
|
149
|
-
}
|
173
|
+
}>>;
|
150
174
|
}, z.core.$strip>>>;
|
151
|
-
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
152
|
-
id: z.ZodString;
|
153
|
-
alias: z.ZodOptional<z.ZodString>;
|
154
|
-
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
155
|
-
id: z.ZodString;
|
156
|
-
alias: z.ZodOptional<z.ZodString>;
|
157
|
-
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
158
|
-
format: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
159
|
-
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
160
|
-
number: "number";
|
161
|
-
percent: "percent";
|
162
|
-
permille: "permille";
|
163
|
-
scientific: "scientific";
|
164
|
-
}>>>;
|
165
|
-
ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
166
|
-
symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
167
|
-
thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
168
|
-
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
169
|
-
suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
170
|
-
fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
171
|
-
significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
172
|
-
roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
173
|
-
morePrecision: "morePrecision";
|
174
|
-
lessPrecision: "lessPrecision";
|
175
|
-
}>>>;
|
176
|
-
roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
177
|
-
floor: "floor";
|
178
|
-
ceil: "ceil";
|
179
|
-
expand: "expand";
|
180
|
-
trunc: "trunc";
|
181
|
-
halfCeil: "halfCeil";
|
182
|
-
halfFloor: "halfFloor";
|
183
|
-
halfExpand: "halfExpand";
|
184
|
-
halfTrunc: "halfTrunc";
|
185
|
-
halfEven: "halfEven";
|
186
|
-
}>>>;
|
187
|
-
}, z.core.$strip>>>>;
|
188
|
-
}, z.core.$strip>]>>>;
|
189
|
-
}, z.core.$strip>, z.ZodObject<{
|
175
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
|
190
176
|
id: z.ZodString;
|
191
177
|
alias: z.ZodOptional<z.ZodString>;
|
192
|
-
autoFormat: z.
|
193
|
-
format: z.
|
178
|
+
autoFormat: z.ZodDefault<z.ZodBoolean>;
|
179
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
194
180
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
195
181
|
number: "number";
|
196
182
|
percent: "percent";
|
@@ -219,7 +205,7 @@ export declare const zColumnPercent: z.ZodObject<{
|
|
219
205
|
halfTrunc: "halfTrunc";
|
220
206
|
halfEven: "halfEven";
|
221
207
|
}>>>;
|
222
|
-
}, z.core.$strip
|
208
|
+
}, z.core.$strip>>>;
|
223
209
|
}, z.core.$strip>]>>>;
|
224
210
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
225
211
|
color: z.ZodOptional<z.ZodObject<{
|