@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
@@ -0,0 +1 @@
|
|
1
|
+
export { sortXBandAxis, sortYBandAxis, sortLegend } from './sort';
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { dataset } from './dataset';
|
2
|
-
export { datasetPivot
|
2
|
+
export { datasetPivot } from './datasetPivot';
|
@@ -36,70 +36,20 @@ export declare const zAdvancedVSeed: z.ZodObject<{
|
|
36
36
|
groupName: z.ZodString;
|
37
37
|
}, z.core.$strip>;
|
38
38
|
}, z.core.$strip>>;
|
39
|
-
dimensions: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
39
|
+
dimensions: z.ZodArray<z.ZodUnion<[z.ZodType<import("./properties").DimensionGroup, unknown, z.core.$ZodTypeInternals<import("./properties").DimensionGroup, unknown>>, z.ZodObject<{
|
40
40
|
id: z.ZodString;
|
41
41
|
alias: z.ZodOptional<z.ZodString>;
|
42
|
-
|
43
|
-
id: z.ZodString;
|
44
|
-
alias: z.ZodOptional<z.ZodString>;
|
45
|
-
location: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
46
|
-
dimension: "dimension";
|
47
|
-
rowDimension: "rowDimension";
|
48
|
-
columnDimension: "columnDimension";
|
49
|
-
}>>>;
|
50
|
-
}, z.core.$strip>]>>>;
|
51
|
-
}, z.core.$strip>, z.ZodObject<{
|
52
|
-
id: z.ZodString;
|
53
|
-
alias: z.ZodOptional<z.ZodString>;
|
54
|
-
location: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
42
|
+
location: z.ZodDefault<z.ZodEnum<{
|
55
43
|
dimension: "dimension";
|
56
44
|
rowDimension: "rowDimension";
|
57
45
|
columnDimension: "columnDimension";
|
58
|
-
}
|
46
|
+
}>>;
|
59
47
|
}, z.core.$strip>]>>;
|
60
|
-
measures: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
48
|
+
measures: z.ZodArray<z.ZodUnion<[z.ZodType<import("./properties").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("./properties").MeasureGroup, unknown>>, z.ZodObject<{
|
61
49
|
id: z.ZodString;
|
62
50
|
alias: z.ZodOptional<z.ZodString>;
|
63
|
-
|
64
|
-
|
65
|
-
alias: z.ZodOptional<z.ZodString>;
|
66
|
-
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
67
|
-
format: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
68
|
-
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
69
|
-
number: "number";
|
70
|
-
percent: "percent";
|
71
|
-
permille: "permille";
|
72
|
-
scientific: "scientific";
|
73
|
-
}>>>;
|
74
|
-
ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
75
|
-
symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
76
|
-
thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
77
|
-
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
78
|
-
suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
79
|
-
fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
80
|
-
significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
81
|
-
roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
82
|
-
morePrecision: "morePrecision";
|
83
|
-
lessPrecision: "lessPrecision";
|
84
|
-
}>>>;
|
85
|
-
roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
86
|
-
floor: "floor";
|
87
|
-
ceil: "ceil";
|
88
|
-
expand: "expand";
|
89
|
-
trunc: "trunc";
|
90
|
-
halfCeil: "halfCeil";
|
91
|
-
halfFloor: "halfFloor";
|
92
|
-
halfExpand: "halfExpand";
|
93
|
-
halfTrunc: "halfTrunc";
|
94
|
-
halfEven: "halfEven";
|
95
|
-
}>>>;
|
96
|
-
}, z.core.$strip>>>>;
|
97
|
-
}, z.core.$strip>]>>>;
|
98
|
-
}, z.core.$strip>, z.ZodObject<{
|
99
|
-
id: z.ZodString;
|
100
|
-
alias: z.ZodOptional<z.ZodString>;
|
101
|
-
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
102
|
-
format: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
51
|
+
autoFormat: z.ZodDefault<z.ZodBoolean>;
|
52
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
103
53
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
104
54
|
number: "number";
|
105
55
|
percent: "percent";
|
@@ -128,7 +78,7 @@ export declare const zAdvancedVSeed: z.ZodObject<{
|
|
128
78
|
halfTrunc: "halfTrunc";
|
129
79
|
halfEven: "halfEven";
|
130
80
|
}>>>;
|
131
|
-
}, z.core.$strip
|
81
|
+
}, z.core.$strip>>>;
|
132
82
|
}, z.core.$strip>]>>;
|
133
83
|
encoding: z.ZodArray<z.ZodObject<{
|
134
84
|
x: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
@@ -141,8 +91,30 @@ export declare const zAdvancedVSeed: z.ZodObject<{
|
|
141
91
|
size: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
142
92
|
}, z.core.$strip>>;
|
143
93
|
config: z.ZodObject<{
|
144
|
-
table: z.ZodOptional<z.ZodObject<{
|
145
|
-
|
94
|
+
table: z.ZodOptional<z.ZodObject<{
|
95
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
96
|
+
bodyFontSize: z.ZodOptional<z.ZodNumber>;
|
97
|
+
bodyFontColor: z.ZodOptional<z.ZodString>;
|
98
|
+
bodyBackgroundColor: z.ZodOptional<z.ZodString>;
|
99
|
+
hoverBodyBackgroundColor: z.ZodOptional<z.ZodString>;
|
100
|
+
headerFontSize: z.ZodOptional<z.ZodNumber>;
|
101
|
+
headerFontColor: z.ZodOptional<z.ZodString>;
|
102
|
+
headerBackgroundColor: z.ZodOptional<z.ZodString>;
|
103
|
+
hoverHeaderBackgroundColor: z.ZodOptional<z.ZodString>;
|
104
|
+
selectedBorderColor: z.ZodOptional<z.ZodString>;
|
105
|
+
}, z.core.$strip>>;
|
106
|
+
pivotTable: z.ZodOptional<z.ZodObject<{
|
107
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
108
|
+
bodyFontSize: z.ZodOptional<z.ZodNumber>;
|
109
|
+
bodyFontColor: z.ZodOptional<z.ZodString>;
|
110
|
+
bodyBackgroundColor: z.ZodOptional<z.ZodString>;
|
111
|
+
hoverBodyBackgroundColor: z.ZodOptional<z.ZodString>;
|
112
|
+
headerFontSize: z.ZodOptional<z.ZodNumber>;
|
113
|
+
headerFontColor: z.ZodOptional<z.ZodString>;
|
114
|
+
headerBackgroundColor: z.ZodOptional<z.ZodString>;
|
115
|
+
hoverHeaderBackgroundColor: z.ZodOptional<z.ZodString>;
|
116
|
+
selectedBorderColor: z.ZodOptional<z.ZodString>;
|
117
|
+
}, z.core.$strip>>;
|
146
118
|
line: z.ZodOptional<z.ZodObject<{
|
147
119
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
148
120
|
label: z.ZodOptional<z.ZodObject<{
|
@@ -2083,6 +2055,9 @@ export declare const zAdvancedVSeed: z.ZodObject<{
|
|
2083
2055
|
}, z.core.$strip>>;
|
2084
2056
|
}, z.core.$strip>>;
|
2085
2057
|
}, z.core.$strip>;
|
2058
|
+
analysis: z.ZodObject<{
|
2059
|
+
orderMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
2060
|
+
}, z.core.$strip>;
|
2086
2061
|
theme: z.ZodString;
|
2087
2062
|
markStyle: z.ZodObject<{
|
2088
2063
|
barStyle: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
@@ -2706,8 +2681,30 @@ export declare const zAdvancedVSeed: z.ZodObject<{
|
|
2706
2681
|
}, z.core.$strip>;
|
2707
2682
|
customTheme: z.ZodObject<{
|
2708
2683
|
config: z.ZodOptional<z.ZodObject<{
|
2709
|
-
table: z.ZodOptional<z.ZodObject<{
|
2710
|
-
|
2684
|
+
table: z.ZodOptional<z.ZodObject<{
|
2685
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
2686
|
+
bodyFontSize: z.ZodOptional<z.ZodNumber>;
|
2687
|
+
bodyFontColor: z.ZodOptional<z.ZodString>;
|
2688
|
+
bodyBackgroundColor: z.ZodOptional<z.ZodString>;
|
2689
|
+
hoverBodyBackgroundColor: z.ZodOptional<z.ZodString>;
|
2690
|
+
headerFontSize: z.ZodOptional<z.ZodNumber>;
|
2691
|
+
headerFontColor: z.ZodOptional<z.ZodString>;
|
2692
|
+
headerBackgroundColor: z.ZodOptional<z.ZodString>;
|
2693
|
+
hoverHeaderBackgroundColor: z.ZodOptional<z.ZodString>;
|
2694
|
+
selectedBorderColor: z.ZodOptional<z.ZodString>;
|
2695
|
+
}, z.core.$strip>>;
|
2696
|
+
pivotTable: z.ZodOptional<z.ZodObject<{
|
2697
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
2698
|
+
bodyFontSize: z.ZodOptional<z.ZodNumber>;
|
2699
|
+
bodyFontColor: z.ZodOptional<z.ZodString>;
|
2700
|
+
bodyBackgroundColor: z.ZodOptional<z.ZodString>;
|
2701
|
+
hoverBodyBackgroundColor: z.ZodOptional<z.ZodString>;
|
2702
|
+
headerFontSize: z.ZodOptional<z.ZodNumber>;
|
2703
|
+
headerFontColor: z.ZodOptional<z.ZodString>;
|
2704
|
+
headerBackgroundColor: z.ZodOptional<z.ZodString>;
|
2705
|
+
hoverHeaderBackgroundColor: z.ZodOptional<z.ZodString>;
|
2706
|
+
selectedBorderColor: z.ZodOptional<z.ZodString>;
|
2707
|
+
}, z.core.$strip>>;
|
2711
2708
|
line: z.ZodOptional<z.ZodObject<{
|
2712
2709
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
2713
2710
|
label: z.ZodOptional<z.ZodObject<{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Locale } from '../../i18n';
|
2
|
-
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine,
|
2
|
+
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, MeasureTree, SortAxis, SortLegend } from '../../properties';
|
3
3
|
import { z } from 'zod';
|
4
4
|
/**
|
5
5
|
* 面积图类型定义
|
@@ -44,7 +44,7 @@ export interface Area {
|
|
44
44
|
* @type {DimensionTree}
|
45
45
|
* @example [{id: 'value', alias: '数值'}]
|
46
46
|
*/
|
47
|
-
measures?:
|
47
|
+
measures?: MeasureTree;
|
48
48
|
/**
|
49
49
|
* 图表的背景颜色
|
50
50
|
* @default transparent 默认为透明背景
|
@@ -86,6 +86,30 @@ export interface Area {
|
|
86
86
|
* @description 鼠标移动到图表上时, 显示的垂直提示线
|
87
87
|
*/
|
88
88
|
crosshairLine?: CrosshairLine;
|
89
|
+
/**
|
90
|
+
* @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
91
|
+
* @example
|
92
|
+
* sortAxis: {
|
93
|
+
* orderBy: 'profit',
|
94
|
+
* order: 'asc',
|
95
|
+
* }
|
96
|
+
* sortAxis: {
|
97
|
+
* customOrder:['2019', '2020', '2021']
|
98
|
+
* }
|
99
|
+
*/
|
100
|
+
sortAxis?: SortAxis;
|
101
|
+
/**
|
102
|
+
* @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
103
|
+
* @example
|
104
|
+
* sortLegend: {
|
105
|
+
* orderBy: 'profit',
|
106
|
+
* order: 'asc',
|
107
|
+
* }
|
108
|
+
* sortLegend: {
|
109
|
+
* customOrder:['2019', '2020', '2021']
|
110
|
+
* }
|
111
|
+
*/
|
112
|
+
sortLegend?: SortLegend;
|
89
113
|
/**
|
90
114
|
* 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
|
91
115
|
* @default light 默认为亮色主题
|
@@ -155,55 +179,17 @@ export declare const zArea: z.ZodObject<{
|
|
155
179
|
dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
156
180
|
id: z.ZodString;
|
157
181
|
alias: z.ZodOptional<z.ZodString>;
|
158
|
-
location: z.
|
182
|
+
location: z.ZodDefault<z.ZodEnum<{
|
159
183
|
dimension: "dimension";
|
160
184
|
rowDimension: "rowDimension";
|
161
185
|
columnDimension: "columnDimension";
|
162
|
-
}
|
186
|
+
}>>;
|
163
187
|
}, z.core.$strip>>>;
|
164
|
-
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
165
|
-
id: z.ZodString;
|
166
|
-
alias: z.ZodOptional<z.ZodString>;
|
167
|
-
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
168
|
-
id: z.ZodString;
|
169
|
-
alias: z.ZodOptional<z.ZodString>;
|
170
|
-
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
171
|
-
format: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
172
|
-
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
173
|
-
number: "number";
|
174
|
-
percent: "percent";
|
175
|
-
permille: "permille";
|
176
|
-
scientific: "scientific";
|
177
|
-
}>>>;
|
178
|
-
ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
179
|
-
symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
180
|
-
thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
181
|
-
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
182
|
-
suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
183
|
-
fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
184
|
-
significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
185
|
-
roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
186
|
-
morePrecision: "morePrecision";
|
187
|
-
lessPrecision: "lessPrecision";
|
188
|
-
}>>>;
|
189
|
-
roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
190
|
-
floor: "floor";
|
191
|
-
ceil: "ceil";
|
192
|
-
expand: "expand";
|
193
|
-
trunc: "trunc";
|
194
|
-
halfCeil: "halfCeil";
|
195
|
-
halfFloor: "halfFloor";
|
196
|
-
halfExpand: "halfExpand";
|
197
|
-
halfTrunc: "halfTrunc";
|
198
|
-
halfEven: "halfEven";
|
199
|
-
}>>>;
|
200
|
-
}, z.core.$strip>>>>;
|
201
|
-
}, z.core.$strip>]>>>;
|
202
|
-
}, z.core.$strip>, z.ZodObject<{
|
188
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
|
203
189
|
id: z.ZodString;
|
204
190
|
alias: z.ZodOptional<z.ZodString>;
|
205
|
-
autoFormat: z.
|
206
|
-
format: z.
|
191
|
+
autoFormat: z.ZodDefault<z.ZodBoolean>;
|
192
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
207
193
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
208
194
|
number: "number";
|
209
195
|
percent: "percent";
|
@@ -232,7 +218,7 @@ export declare const zArea: z.ZodObject<{
|
|
232
218
|
halfTrunc: "halfTrunc";
|
233
219
|
halfEven: "halfEven";
|
234
220
|
}>>>;
|
235
|
-
}, z.core.$strip
|
221
|
+
}, z.core.$strip>>>;
|
236
222
|
}, z.core.$strip>]>>>;
|
237
223
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
238
224
|
color: z.ZodOptional<z.ZodObject<{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Locale } from '../../i18n';
|
2
|
-
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle,
|
2
|
+
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, MeasureTree, SortAxis, SortLegend } from '../../properties';
|
3
3
|
import { z } from 'zod';
|
4
4
|
/**
|
5
5
|
* 百分比面积图类型定义
|
@@ -43,7 +43,7 @@ export interface AreaPercent {
|
|
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 默认为透明背景
|
@@ -85,6 +85,30 @@ export interface AreaPercent {
|
|
85
85
|
* @description 鼠标移动到图表上时, 显示的垂直提示线
|
86
86
|
*/
|
87
87
|
crosshairLine?: CrosshairLine;
|
88
|
+
/**
|
89
|
+
* @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
90
|
+
* @example
|
91
|
+
* sortAxis: {
|
92
|
+
* orderBy: 'profit',
|
93
|
+
* order: 'asc',
|
94
|
+
* }
|
95
|
+
* sortAxis: {
|
96
|
+
* customOrder:['2019', '2020', '2021']
|
97
|
+
* }
|
98
|
+
*/
|
99
|
+
sortAxis?: SortAxis;
|
100
|
+
/**
|
101
|
+
* @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
102
|
+
* @example
|
103
|
+
* sortLegend: {
|
104
|
+
* orderBy: 'profit',
|
105
|
+
* order: 'asc',
|
106
|
+
* }
|
107
|
+
* sortLegend: {
|
108
|
+
* customOrder:['2019', '2020', '2021']
|
109
|
+
* }
|
110
|
+
*/
|
111
|
+
sortLegend?: SortLegend;
|
88
112
|
/**
|
89
113
|
* 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
|
90
114
|
* @default light 默认为亮色主题
|
@@ -154,55 +178,17 @@ export declare const zAreaPercent: z.ZodObject<{
|
|
154
178
|
dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
155
179
|
id: z.ZodString;
|
156
180
|
alias: z.ZodOptional<z.ZodString>;
|
157
|
-
location: z.
|
181
|
+
location: z.ZodDefault<z.ZodEnum<{
|
158
182
|
dimension: "dimension";
|
159
183
|
rowDimension: "rowDimension";
|
160
184
|
columnDimension: "columnDimension";
|
161
|
-
}
|
185
|
+
}>>;
|
162
186
|
}, z.core.$strip>>>;
|
163
|
-
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
164
|
-
id: z.ZodString;
|
165
|
-
alias: z.ZodOptional<z.ZodString>;
|
166
|
-
children: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject</*elided*/ any, z.core.$strip>, z.ZodObject<{
|
167
|
-
id: z.ZodString;
|
168
|
-
alias: z.ZodOptional<z.ZodString>;
|
169
|
-
autoFormat: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
170
|
-
format: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
171
|
-
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
172
|
-
number: "number";
|
173
|
-
percent: "percent";
|
174
|
-
permille: "permille";
|
175
|
-
scientific: "scientific";
|
176
|
-
}>>>;
|
177
|
-
ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
178
|
-
symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
179
|
-
thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
180
|
-
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
181
|
-
suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
182
|
-
fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
183
|
-
significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
184
|
-
roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
185
|
-
morePrecision: "morePrecision";
|
186
|
-
lessPrecision: "lessPrecision";
|
187
|
-
}>>>;
|
188
|
-
roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
189
|
-
floor: "floor";
|
190
|
-
ceil: "ceil";
|
191
|
-
expand: "expand";
|
192
|
-
trunc: "trunc";
|
193
|
-
halfCeil: "halfCeil";
|
194
|
-
halfFloor: "halfFloor";
|
195
|
-
halfExpand: "halfExpand";
|
196
|
-
halfTrunc: "halfTrunc";
|
197
|
-
halfEven: "halfEven";
|
198
|
-
}>>>;
|
199
|
-
}, z.core.$strip>>>>;
|
200
|
-
}, z.core.$strip>]>>>;
|
201
|
-
}, z.core.$strip>, z.ZodObject<{
|
187
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
|
202
188
|
id: z.ZodString;
|
203
189
|
alias: z.ZodOptional<z.ZodString>;
|
204
|
-
autoFormat: z.
|
205
|
-
format: z.
|
190
|
+
autoFormat: z.ZodDefault<z.ZodBoolean>;
|
191
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
206
192
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
207
193
|
number: "number";
|
208
194
|
percent: "percent";
|
@@ -231,7 +217,7 @@ export declare const zAreaPercent: z.ZodObject<{
|
|
231
217
|
halfTrunc: "halfTrunc";
|
232
218
|
halfEven: "halfEven";
|
233
219
|
}>>>;
|
234
|
-
}, z.core.$strip
|
220
|
+
}, z.core.$strip>>>;
|
235
221
|
}, z.core.$strip>]>>>;
|
236
222
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
237
223
|
color: z.ZodOptional<z.ZodObject<{
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { type Locale } from '../../i18n';
|
2
|
-
import
|
2
|
+
import type { MeasureTree, SortAxis, SortLegend } from '../../properties';
|
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';
|
3
4
|
import { z } from 'zod';
|
4
5
|
/**
|
5
6
|
* 条形图类型定义
|
@@ -43,7 +44,7 @@ export interface Bar {
|
|
43
44
|
* @type {DimensionTree}
|
44
45
|
* @example [{id: "value", alias: "数值"}]
|
45
46
|
*/
|
46
|
-
measures?:
|
47
|
+
measures?: MeasureTree;
|
47
48
|
/**
|
48
49
|
* 图表的背景颜色
|
49
50
|
* @default transparent 默认为透明背景
|
@@ -91,6 +92,30 @@ export interface Bar {
|
|
91
92
|
* @default 8
|
92
93
|
*/
|
93
94
|
stackCornerRadius?: StackCornerRadius;
|
95
|
+
/**
|
96
|
+
* @description Y轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
97
|
+
* @example
|
98
|
+
* sortAxis: {
|
99
|
+
* orderBy: 'profit',
|
100
|
+
* order: 'asc',
|
101
|
+
* }
|
102
|
+
* sortAxis: {
|
103
|
+
* customOrder:['2019', '2020', '2021']
|
104
|
+
* }
|
105
|
+
*/
|
106
|
+
sortAxis?: SortAxis;
|
107
|
+
/**
|
108
|
+
* @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
|
109
|
+
* @example
|
110
|
+
* sortLegend: {
|
111
|
+
* orderBy: 'profit',
|
112
|
+
* order: 'asc',
|
113
|
+
* }
|
114
|
+
* sortLegend: {
|
115
|
+
* customOrder:['2019', '2020', '2021']
|
116
|
+
* }
|
117
|
+
*/
|
118
|
+
sortLegend?: SortLegend;
|
94
119
|
/**
|
95
120
|
* 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
|
96
121
|
* @default light 默认为亮色主题
|
@@ -142,55 +167,17 @@ export declare const zBar: z.ZodObject<{
|
|
142
167
|
dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
143
168
|
id: z.ZodString;
|
144
169
|
alias: z.ZodOptional<z.ZodString>;
|
145
|
-
location: z.
|
170
|
+
location: z.ZodDefault<z.ZodEnum<{
|
146
171
|
dimension: "dimension";
|
147
172
|
rowDimension: "rowDimension";
|
148
173
|
columnDimension: "columnDimension";
|
149
|
-
}
|
174
|
+
}>>;
|
150
175
|
}, 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<{
|
176
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
|
190
177
|
id: z.ZodString;
|
191
178
|
alias: z.ZodOptional<z.ZodString>;
|
192
|
-
autoFormat: z.
|
193
|
-
format: z.
|
179
|
+
autoFormat: z.ZodDefault<z.ZodBoolean>;
|
180
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
194
181
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
195
182
|
number: "number";
|
196
183
|
percent: "percent";
|
@@ -219,7 +206,7 @@ export declare const zBar: z.ZodObject<{
|
|
219
206
|
halfTrunc: "halfTrunc";
|
220
207
|
halfEven: "halfEven";
|
221
208
|
}>>>;
|
222
|
-
}, z.core.$strip
|
209
|
+
}, z.core.$strip>>>;
|
223
210
|
}, z.core.$strip>]>>>;
|
224
211
|
backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
225
212
|
color: z.ZodOptional<z.ZodObject<{
|