@visactor/vseed 0.0.36 → 0.0.38

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.
Files changed (123) hide show
  1. package/dist/builder/builder/builder.d.ts +8922 -8928
  2. package/dist/index.cjs +1192 -917
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +1160 -903
  5. package/dist/index.js.map +1 -1
  6. package/dist/pipeline/advanced/table/pipes/config/index.d.ts +2 -0
  7. package/dist/pipeline/advanced/table/pipes/config/pivotTableConfig.d.ts +2 -0
  8. package/dist/pipeline/advanced/table/pipes/config/tableConfig.d.ts +2 -0
  9. package/dist/pipeline/advanced/table/pipes/index.d.ts +1 -0
  10. package/dist/pipeline/spec/chart/pipes/series/index.d.ts +1 -1
  11. package/dist/pipeline/spec/chart/pipes/series/series.d.ts +1 -0
  12. package/dist/pipeline/spec/table/pipes/columns/dimensionsToColumns.d.ts +2 -0
  13. package/dist/pipeline/spec/table/pipes/columns/index.d.ts +1 -0
  14. package/dist/pipeline/spec/table/pipes/columns/measuresToColumns.d.ts +0 -1
  15. package/dist/pipeline/spec/table/pipes/indicators/index.d.ts +1 -0
  16. package/dist/pipeline/spec/table/pipes/indicators/pivotDataConfig.d.ts +2 -0
  17. package/dist/pipeline/utils/constant.d.ts +2 -0
  18. package/dist/pipeline/utils/dimensions/index.d.ts +1 -0
  19. package/dist/pipeline/utils/dimensions/typeGuard.d.ts +4 -0
  20. package/dist/pipeline/utils/measures/index.d.ts +1 -0
  21. package/dist/pipeline/utils/measures/typeGuard.d.ts +4 -0
  22. package/dist/types/advancedVSeed.d.ts +3841 -3847
  23. package/dist/types/chartType/area/area.d.ts +11 -2
  24. package/dist/types/chartType/area/zArea.d.ts +565 -577
  25. package/dist/types/chartType/areaPercent/areaPercent.d.ts +4 -0
  26. package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +565 -577
  27. package/dist/types/chartType/areaRange/areaRange.d.ts +4 -0
  28. package/dist/types/chartType/areaRange/zAreaRange.d.ts +546 -558
  29. package/dist/types/chartType/bar/bar.d.ts +4 -1183
  30. package/dist/types/chartType/bar/index.d.ts +2 -1
  31. package/dist/types/chartType/bar/zBar.d.ts +1171 -0
  32. package/dist/types/chartType/barParallel/barParallel.d.ts +4 -1183
  33. package/dist/types/chartType/barParallel/index.d.ts +2 -1
  34. package/dist/types/chartType/barParallel/zBarParallel.d.ts +1171 -0
  35. package/dist/types/chartType/barPercent/barPercent.d.ts +4 -1183
  36. package/dist/types/chartType/barPercent/index.d.ts +2 -1
  37. package/dist/types/chartType/barPercent/zBarPercent.d.ts +1171 -0
  38. package/dist/types/chartType/column/column.d.ts +4 -1183
  39. package/dist/types/chartType/column/index.d.ts +2 -1
  40. package/dist/types/chartType/column/zColumn.d.ts +1171 -0
  41. package/dist/types/chartType/columnParallel/columnParallel.d.ts +4 -1183
  42. package/dist/types/chartType/columnParallel/index.d.ts +2 -1
  43. package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +1171 -0
  44. package/dist/types/chartType/columnPercent/columnPercent.d.ts +4 -1183
  45. package/dist/types/chartType/columnPercent/index.d.ts +2 -1
  46. package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +1171 -0
  47. package/dist/types/chartType/donut/donut.d.ts +4 -119
  48. package/dist/types/chartType/donut/index.d.ts +2 -1
  49. package/dist/types/chartType/donut/zDonut.d.ts +119 -0
  50. package/dist/types/chartType/dualAxis/dualAxis.d.ts +9 -0
  51. package/dist/types/chartType/dualAxis/zDualAxis.d.ts +744 -755
  52. package/dist/types/chartType/funnel/funnel.d.ts +4 -89
  53. package/dist/types/chartType/funnel/index.d.ts +2 -1
  54. package/dist/types/chartType/funnel/zFunnel.d.ts +89 -0
  55. package/dist/types/chartType/heatmap/heatmap.d.ts +4 -89
  56. package/dist/types/chartType/heatmap/index.d.ts +2 -1
  57. package/dist/types/chartType/heatmap/zHeatmap.d.ts +89 -0
  58. package/dist/types/chartType/line/index.d.ts +2 -1
  59. package/dist/types/chartType/line/line.d.ts +8 -1367
  60. package/dist/types/chartType/line/zLine.d.ts +1353 -0
  61. package/dist/types/chartType/pie/index.d.ts +2 -1
  62. package/dist/types/chartType/pie/pie.d.ts +4 -119
  63. package/dist/types/chartType/pie/zPie.d.ts +119 -0
  64. package/dist/types/chartType/pivotTable/index.d.ts +2 -1
  65. package/dist/types/chartType/pivotTable/pivotTable.d.ts +48 -60
  66. package/dist/types/chartType/pivotTable/zPivotTable.d.ts +68 -0
  67. package/dist/types/chartType/radar/index.d.ts +2 -1
  68. package/dist/types/chartType/radar/radar.d.ts +4 -119
  69. package/dist/types/chartType/radar/zRadar.d.ts +119 -0
  70. package/dist/types/chartType/rose/index.d.ts +2 -1
  71. package/dist/types/chartType/rose/rose.d.ts +4 -119
  72. package/dist/types/chartType/rose/zRose.d.ts +119 -0
  73. package/dist/types/chartType/roseParallel/index.d.ts +2 -1
  74. package/dist/types/chartType/roseParallel/roseParallel.d.ts +4 -119
  75. package/dist/types/chartType/roseParallel/zRoseParallel.d.ts +119 -0
  76. package/dist/types/chartType/scatter/index.d.ts +2 -1
  77. package/dist/types/chartType/scatter/scatter.d.ts +4 -1191
  78. package/dist/types/chartType/scatter/zScatter.d.ts +1179 -0
  79. package/dist/types/chartType/table/index.d.ts +2 -1
  80. package/dist/types/chartType/table/table.d.ts +49 -64
  81. package/dist/types/chartType/table/zTable.d.ts +68 -0
  82. package/dist/types/dataSelector/selector.d.ts +70 -16
  83. package/dist/types/properties/analysis/analysis.d.ts +1 -1
  84. package/dist/types/properties/analysis/sort.d.ts +2 -4
  85. package/dist/types/properties/analysis/sortLegend.d.ts +2 -3
  86. package/dist/types/properties/annotation/annotation.d.ts +304 -316
  87. package/dist/types/properties/annotation/annotationArea.d.ts +12 -137
  88. package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +27 -148
  89. package/dist/types/properties/annotation/annotationPoint.d.ts +20 -114
  90. package/dist/types/properties/annotation/annotationVerticalLine.d.ts +6 -127
  91. package/dist/types/properties/annotation/index.d.ts +8 -4
  92. package/dist/types/properties/annotation/zAnnotationArea.d.ts +108 -0
  93. package/dist/types/properties/annotation/zAnnotationHorizontalLine.d.ts +105 -0
  94. package/dist/types/properties/annotation/zAnnotationPoint.d.ts +94 -0
  95. package/dist/types/properties/annotation/zAnnotationVerticalLine.d.ts +105 -0
  96. package/dist/types/properties/config/axes/axis.d.ts +44 -58
  97. package/dist/types/properties/config/axes/bandAxis.d.ts +74 -74
  98. package/dist/types/properties/config/axes/linearAxis.d.ts +76 -76
  99. package/dist/types/properties/config/backgroundColor/backgroundColor.d.ts +1 -1
  100. package/dist/types/properties/config/color/color.d.ts +7 -9
  101. package/dist/types/properties/config/config.d.ts +3288 -3282
  102. package/dist/types/properties/config/crosshair/crosshair.d.ts +14 -17
  103. package/dist/types/properties/config/crosshair/index.d.ts +2 -1
  104. package/dist/types/properties/config/crosshair/zCrosshair.d.ts +15 -0
  105. package/dist/types/properties/config/label/label.d.ts +1 -1
  106. package/dist/types/properties/config/legend/legend.d.ts +13 -17
  107. package/dist/types/properties/config/tooltip/tooltip.d.ts +1 -1
  108. package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +2 -2
  109. package/dist/types/properties/dimensions/dimensions.d.ts +6 -29
  110. package/dist/types/properties/dimensions/index.d.ts +2 -1
  111. package/dist/types/properties/dimensions/zDimensions.d.ts +30 -0
  112. package/dist/types/properties/encoding/encoding.d.ts +8 -8
  113. package/dist/types/properties/markStyle/areaStyle.d.ts +20 -20
  114. package/dist/types/properties/markStyle/barStyle.d.ts +24 -24
  115. package/dist/types/properties/markStyle/lineStyle.d.ts +24 -24
  116. package/dist/types/properties/markStyle/markStyle.d.ts +194 -194
  117. package/dist/types/properties/markStyle/pointStyle.d.ts +35 -35
  118. package/dist/types/properties/measures/measures.d.ts +3 -0
  119. package/dist/types/properties/theme/customTheme.d.ts +3336 -3330
  120. package/dist/types/vseed.d.ts +6734 -6851
  121. package/dist/umd/index.js +1202 -939
  122. package/dist/umd/index.js.map +1 -1
  123. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
1
  import { type Selector, type Selectors } from '../../dataSelector';
2
- import { z } from 'zod';
3
2
  export type AnnotationArea = {
4
3
  /**
5
4
  * @description 依赖选择的数据, 进行数据标记.
@@ -49,190 +48,66 @@ export type AnnotationArea = {
49
48
  * @example 'top' 文本在标注面的底部
50
49
  */
51
50
  textBaseline?: 'top' | 'middle' | 'bottom';
52
- /**
53
- * @description 标注面整体在Y方向的偏移像素距离, 当标注面在图表上方(数值较大时)时, 建议设置为正值, 标注面在图表下方(数值较小时)时, 建议设置为负值.
54
- * 负值则整体向上偏移, 例如设置为-10, 则整个标注面组件包括文本、面图元, 一起向上偏移10像素
55
- * 正值则整体向下偏移, 例如设置为10, 则整个标注面组件包括文本、面图元, 一起向下偏移10像素
56
- * @example offsetY: 5, 标注面整体向下偏移5像素
57
- */
58
- offsetY?: number;
59
- /**
60
- * @description 标注面整体在X方向的偏移像素距离, 当标注面在图表左侧(类目轴起点)时, 建议设置为正值, 标注面在图表右侧(类目轴终点)时, 建议设置为负值.
61
- * 负值则整体向左偏移, 例如设置为-10, 则整个标注面组件包括文本、面图元, 一起向左偏移10像素
62
- * 正值则整体向右偏移, 例如设置为10, 则整个标注面组件包括文本、面图元, 一起向右偏移10像素
63
- * @example offsetX: 5, 标注面整体向右偏移5像素
64
- */
65
- offsetX?: number;
66
51
  /**
67
52
  * @description 背景可见
68
53
  * @example true
69
54
  */
70
- backgroundVisible?: boolean;
55
+ textBackgroundVisible?: boolean;
71
56
  /**
72
57
  * @description 背景颜色
73
58
  * @example 'red'
74
59
  */
75
- backgroundColor?: string;
60
+ textBackgroundColor?: string;
76
61
  /**
77
62
  * 背景边框颜色
78
63
  * @description 背景边框颜色
79
64
  * @example 'red'
80
65
  */
81
- backgroundBorderColor?: string;
66
+ textBackgroundBorderColor?: string;
82
67
  /**
83
68
  * @description 背景边框宽度
84
69
  * @example 2
85
70
  */
86
- backgroundBorderWidth?: number;
71
+ textBackgroundBorderWidth?: number;
87
72
  /**
88
73
  * 背景边框圆角
89
74
  * @description 背景边框圆角
90
75
  * @example 4
91
76
  */
92
- backgroundBorderRadius?: number;
77
+ textBackgroundBorderRadius?: number;
93
78
  /**
94
79
  * @description 背景内边距
95
80
  * @example 4
96
81
  */
97
- backgroundPadding?: number;
82
+ textBackgroundPadding?: number;
98
83
  /**
99
- * @description 面积区域颜色
84
+ * @description 标注面区域颜色
100
85
  * @example 'red'
101
86
  */
102
87
  areaColor?: string;
103
88
  /**
104
- * @description 面积区域颜色透明度
89
+ * @description 标注面区域颜色透明度
105
90
  * @example 0.5
106
91
  */
107
92
  areaColorOpacity?: number;
108
93
  /**
109
- * @description 面积区域边框颜色
110
- * @default 'red'
94
+ * @description 标注面区域边框颜色
111
95
  * @example 'red'
112
96
  */
113
97
  areaBorderColor?: number;
114
98
  /**
115
- * @description 面积区域边框宽度
99
+ * @description 标注面区域边框宽度
116
100
  * @example 2
117
101
  */
118
102
  areaBorderWidth?: number;
119
103
  /**
120
- * @description 面积区域边框圆角
104
+ * @description 标注面区域边框圆角
121
105
  * @example 4
122
106
  */
123
107
  areaBorderRadius?: number;
124
108
  /**
125
- * @description 面积区域的边距
109
+ * @description 标注面区域的边距
126
110
  * @example 0
127
111
  */
128
112
  outerPadding?: number;
129
113
  };
130
- export declare const zAnnotationArea: z.ZodObject<{
131
- selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
132
- field: z.ZodString;
133
- operator: z.ZodOptional<z.ZodEnum<{
134
- "=": "=";
135
- "==": "==";
136
- "!=": "!=";
137
- ">": ">";
138
- "<": "<";
139
- ">=": ">=";
140
- "<=": "<=";
141
- between: "between";
142
- }>>;
143
- op: z.ZodOptional<z.ZodEnum<{
144
- "=": "=";
145
- "==": "==";
146
- "!=": "!=";
147
- ">": ">";
148
- "<": "<";
149
- ">=": ">=";
150
- "<=": "<=";
151
- between: "between";
152
- }>>;
153
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
154
- }, z.core.$strip>, z.ZodObject<{
155
- field: z.ZodString;
156
- operator: z.ZodOptional<z.ZodEnum<{
157
- in: "in";
158
- "not in": "not in";
159
- }>>;
160
- op: z.ZodOptional<z.ZodEnum<{
161
- in: "in";
162
- "not in": "not in";
163
- }>>;
164
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
165
- }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
166
- field: z.ZodString;
167
- operator: z.ZodOptional<z.ZodEnum<{
168
- "=": "=";
169
- "==": "==";
170
- "!=": "!=";
171
- ">": ">";
172
- "<": "<";
173
- ">=": ">=";
174
- "<=": "<=";
175
- between: "between";
176
- }>>;
177
- op: z.ZodOptional<z.ZodEnum<{
178
- "=": "=";
179
- "==": "==";
180
- "!=": "!=";
181
- ">": ">";
182
- "<": "<";
183
- ">=": ">=";
184
- "<=": "<=";
185
- between: "between";
186
- }>>;
187
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
188
- }, z.core.$strip>, z.ZodObject<{
189
- field: z.ZodString;
190
- operator: z.ZodOptional<z.ZodEnum<{
191
- in: "in";
192
- "not in": "not in";
193
- }>>;
194
- op: z.ZodOptional<z.ZodEnum<{
195
- in: "in";
196
- "not in": "not in";
197
- }>>;
198
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
199
- }, z.core.$strip>]>>]>;
200
- textPosition: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
201
- left: "left";
202
- top: "top";
203
- topLeft: "topLeft";
204
- topRight: "topRight";
205
- right: "right";
206
- bottom: "bottom";
207
- bottomLeft: "bottomLeft";
208
- bottomRight: "bottomRight";
209
- }>>>;
210
- text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
211
- textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
212
- textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
213
- textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
214
- textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
215
- left: "left";
216
- right: "right";
217
- center: "center";
218
- }>>>;
219
- textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
220
- top: "top";
221
- bottom: "bottom";
222
- middle: "middle";
223
- }>>>;
224
- backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
225
- backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
226
- backgroundBorderColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
227
- backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
228
- backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
229
- backgroundPadding: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
230
- areaColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
231
- areaColorOpacity: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
232
- areaBorderColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
233
- areaBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
234
- areaBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
235
- outerPadding: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
236
- offsetX: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
237
- offsetY: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
238
- }, z.core.$strip>;
@@ -1,5 +1,4 @@
1
1
  import { type Selector, type Selectors } from '../../dataSelector';
2
- import { z } from 'zod';
3
2
  /**
4
3
  * @description 水平标注线, 根据用户设置的selector 或 yValue, 从左向右绘制一条末尾有箭头的线, 标签默认在标注线的终点正下方
5
4
  */
@@ -57,176 +56,56 @@ export type AnnotationHorizontalLine = {
57
56
  * @example 'top'
58
57
  */
59
58
  textBaseline?: 'top' | 'middle' | 'bottom';
60
- /**
61
- * @description (水平)标注线整体在Y方向的偏移像素距离, 一般情况下, 无需设置
62
- * 负值则整体向上偏移, 例如设置为-10, 则整个(水平)标注线组件包括文本、箭头、线段, 一起向上偏移10像素
63
- * 正值则整体向下偏移, 例如设置为10, 则整个(水平)标注线组件包括文本、箭头、线段, 一起向下偏移10像素
64
- * @example offsetY: 0
65
- */
66
- offsetY?: number;
67
- /**
68
- * @description (水平)标注线整体在X方向的偏移像素距离, 一般情况下, 无需设置
69
- * 负值则整体向左偏移, 例如设置为-10, 则整个(水平)标注线组件包括文本、箭头、线段, 一起向左偏移10像素
70
- * 正值则整体向右偏移, 例如设置为10, 则整个(水平)标注线组件包括文本、箭头、线段, 一起向右偏移10像素
71
- * @example offsetX: 0
72
- */
73
- offsetX?: number;
74
- /**
75
- * 线可见
76
- * @description 线可见
77
- * @example true
78
- */
79
- lineVisible?: boolean;
80
- /**
81
- * @description 线颜色
82
- * @example 'red'
83
- */
84
- lineColor?: string;
85
- /**
86
- * @description 线宽度
87
- * @example 2
88
- */
89
- lineWidth?: number;
90
- /**
91
- * @description 线样式
92
- * @example 'solid'
93
- */
94
- lineStyle?: 'solid' | 'dashed' | 'dotted';
95
59
  /**
96
60
  * @description 背景可见
97
61
  * @example true
98
62
  */
99
- backgroundVisible?: boolean;
63
+ textBackgroundVisible?: boolean;
100
64
  /**
101
65
  * @description 背景颜色
102
66
  * @example 'red'
103
67
  */
104
- backgroundColor?: string;
68
+ textBackgroundColor?: string;
105
69
  /**
106
70
  * @description 背景边框颜色
107
71
  * @example 'red'
108
72
  */
109
- backgroundBorderColor?: string;
73
+ textBackgroundBorderColor?: string;
110
74
  /**
111
75
  * 背景边框宽度
112
76
  * @description 背景边框宽度
113
77
  * @example 2
114
78
  */
115
- backgroundBorderWidth?: number;
79
+ textBackgroundBorderWidth?: number;
116
80
  /**
117
81
  * @description 背景边框圆角
118
82
  * @example 4
119
83
  */
120
- backgroundBorderRadius?: number;
84
+ textBackgroundBorderRadius?: number;
121
85
  /**
122
86
  * @description 背景内边距
123
87
  * @example 4
124
88
  */
125
- backgroundPadding?: number;
89
+ textBackgroundPadding?: number;
90
+ /**
91
+ * 线可见
92
+ * @description 线可见
93
+ * @example true
94
+ */
95
+ lineVisible?: boolean;
96
+ /**
97
+ * @description 线颜色
98
+ * @example 'red'
99
+ */
100
+ lineColor?: string;
101
+ /**
102
+ * @description 线宽度
103
+ * @example 2
104
+ */
105
+ lineWidth?: number;
106
+ /**
107
+ * @description 线样式
108
+ * @example 'solid'
109
+ */
110
+ lineStyle?: 'solid' | 'dashed' | 'dotted';
126
111
  };
127
- export declare const zAnnotationHorizontalLine: z.ZodObject<{
128
- selector: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
129
- field: z.ZodString;
130
- operator: z.ZodOptional<z.ZodEnum<{
131
- "=": "=";
132
- "==": "==";
133
- "!=": "!=";
134
- ">": ">";
135
- "<": "<";
136
- ">=": ">=";
137
- "<=": "<=";
138
- between: "between";
139
- }>>;
140
- op: z.ZodOptional<z.ZodEnum<{
141
- "=": "=";
142
- "==": "==";
143
- "!=": "!=";
144
- ">": ">";
145
- "<": "<";
146
- ">=": ">=";
147
- "<=": "<=";
148
- between: "between";
149
- }>>;
150
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
151
- }, z.core.$strip>, z.ZodObject<{
152
- field: z.ZodString;
153
- operator: z.ZodOptional<z.ZodEnum<{
154
- in: "in";
155
- "not in": "not in";
156
- }>>;
157
- op: z.ZodOptional<z.ZodEnum<{
158
- in: "in";
159
- "not in": "not in";
160
- }>>;
161
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
162
- }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
163
- field: z.ZodString;
164
- operator: z.ZodOptional<z.ZodEnum<{
165
- "=": "=";
166
- "==": "==";
167
- "!=": "!=";
168
- ">": ">";
169
- "<": "<";
170
- ">=": ">=";
171
- "<=": "<=";
172
- between: "between";
173
- }>>;
174
- op: z.ZodOptional<z.ZodEnum<{
175
- "=": "=";
176
- "==": "==";
177
- "!=": "!=";
178
- ">": ">";
179
- "<": "<";
180
- ">=": ">=";
181
- "<=": "<=";
182
- between: "between";
183
- }>>;
184
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
185
- }, z.core.$strip>, z.ZodObject<{
186
- field: z.ZodString;
187
- operator: z.ZodOptional<z.ZodEnum<{
188
- in: "in";
189
- "not in": "not in";
190
- }>>;
191
- op: z.ZodOptional<z.ZodEnum<{
192
- in: "in";
193
- "not in": "not in";
194
- }>>;
195
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
196
- }, z.core.$strip>]>>]>>;
197
- yValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>]>>;
198
- text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
199
- textPosition: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
200
- outsideStart: "outsideStart";
201
- outsideEnd: "outsideEnd";
202
- outsideMiddle: "outsideMiddle";
203
- insideStart: "insideStart";
204
- insideMiddle: "insideMiddle";
205
- insideEnd: "insideEnd";
206
- }>>>;
207
- textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
208
- textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
209
- textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
210
- textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
211
- left: "left";
212
- right: "right";
213
- center: "center";
214
- }>>>;
215
- textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
216
- top: "top";
217
- bottom: "bottom";
218
- middle: "middle";
219
- }>>>;
220
- lineVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
221
- lineColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
222
- lineWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
223
- lineStyle: z.ZodOptional<z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"solid">, z.ZodLiteral<"dashed">, z.ZodLiteral<"dotted">]>>>;
224
- backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
225
- backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
226
- backgroundBorderColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
227
- backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
228
- backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
229
- backgroundPadding: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
230
- offsetX: z.ZodDefault<z.ZodNumber>;
231
- offsetY: z.ZodDefault<z.ZodNumber>;
232
- }, z.core.$strip>;
@@ -1,5 +1,4 @@
1
1
  import { type Selector, type Selectors } from '../../dataSelector';
2
- import { z } from 'zod';
3
2
  /**
4
3
  * @description 标注点, 根据用户设置的selector, 在数据点的左下方, 显示一个带有背景的标签.
5
4
  */
@@ -47,141 +46,48 @@ export type AnnotationPoint = {
47
46
  * @example 'top' 文本在标注点的底部
48
47
  */
49
48
  textBaseline?: 'top' | 'middle' | 'bottom';
50
- /**
51
- * @description 标注点整体在Y方向的偏移像素距离, 当标注点在图表上方(数值较大时)时, 建议设置为正值, 标注点在图表下方(数值较小时)时, 建议设置为负值.
52
- * 负值则整体向上偏移, 例如设置为-10, 则整个标注点组件包括文本、文本背景, 一起向上偏移10像素
53
- * 正值则整体向下偏移, 例如设置为10, 则整个标注点组件包括文本、文本背景, 一起向下偏移10像素
54
- * @example offsetY: 5, 标注点整体向下偏移5像素
55
- */
56
- offsetY?: number;
57
- /**
58
- * @description 标注点整体在X方向的偏移像素距离, 当标注点在图表左侧(类目轴起点)时, 建议设置为正值, 标注点在图表右侧(类目轴终点)时, 建议设置为负值.
59
- * 负值则整体向左偏移, 例如设置为-10, 则整个标注点组件包括文本、文本背景, 一起向左偏移10像素
60
- * 正值则整体向右偏移, 例如设置为10, 则整个标注点组件包括文本、文本背景, 一起向右偏移10像素
61
- * @example offsetX: 5, 标注点整体向右偏移5像素
62
- */
63
- offsetX?: number;
64
49
  /**
65
50
  * @description 背景可见
66
51
  * @example true
67
52
  */
68
- backgroundVisible?: boolean;
53
+ textBackgroundVisible?: boolean;
69
54
  /**
70
55
  * @description 背景颜色
71
56
  * @example 'red'
72
57
  */
73
- backgroundColor?: string;
58
+ textBackgroundColor?: string;
74
59
  /**
75
60
  * @description 背景边框颜色
76
61
  * @example 'red'
77
62
  */
78
- backgroundBorderColor?: string;
63
+ textBackgroundBorderColor?: string;
79
64
  /**
80
65
  * @description 背景边框宽度
81
66
  * @example 2
82
67
  */
83
- backgroundBorderWidth?: number;
68
+ textBackgroundBorderWidth?: number;
84
69
  /**
85
70
  * @description 背景边框圆角
86
71
  * @example 4
87
72
  */
88
- backgroundBorderRadius?: number;
73
+ textBackgroundBorderRadius?: number;
89
74
  /**
90
75
  * @description 背景内边距
91
76
  * @example 4
92
77
  */
93
- backgroundPadding?: number;
78
+ textBackgroundPadding?: number;
79
+ /**
80
+ * @description 标注点整体在Y方向的偏移像素距离, 当标注点在图表上方(数值较大时)时, 建议设置为正值, 标注点在图表下方(数值较小时)时, 建议设置为负值.
81
+ * 负值则整体向上偏移, 例如设置为-10, 则整个标注点组件包括文本、文本背景, 一起向上偏移10像素
82
+ * 正值则整体向下偏移, 例如设置为10, 则整个标注点组件包括文本、文本背景, 一起向下偏移10像素
83
+ * @example offsetY: 5, 标注点整体向下偏移5像素
84
+ */
85
+ offsetY?: number;
86
+ /**
87
+ * @description 标注点整体在X方向的偏移像素距离, 当标注点在图表左侧(类目轴起点)时, 建议设置为正值, 标注点在图表右侧(类目轴终点)时, 建议设置为负值.
88
+ * 负值则整体向左偏移, 例如设置为-10, 则整个标注点组件包括文本、文本背景, 一起向左偏移10像素
89
+ * 正值则整体向右偏移, 例如设置为10, 则整个标注点组件包括文本、文本背景, 一起向右偏移10像素
90
+ * @example offsetX: 5, 标注点整体向右偏移5像素
91
+ */
92
+ offsetX?: number;
94
93
  };
95
- export declare const zAnnotationPoint: z.ZodObject<{
96
- selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
97
- field: z.ZodString;
98
- operator: z.ZodOptional<z.ZodEnum<{
99
- "=": "=";
100
- "==": "==";
101
- "!=": "!=";
102
- ">": ">";
103
- "<": "<";
104
- ">=": ">=";
105
- "<=": "<=";
106
- between: "between";
107
- }>>;
108
- op: z.ZodOptional<z.ZodEnum<{
109
- "=": "=";
110
- "==": "==";
111
- "!=": "!=";
112
- ">": ">";
113
- "<": "<";
114
- ">=": ">=";
115
- "<=": "<=";
116
- between: "between";
117
- }>>;
118
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
119
- }, z.core.$strip>, z.ZodObject<{
120
- field: z.ZodString;
121
- operator: z.ZodOptional<z.ZodEnum<{
122
- in: "in";
123
- "not in": "not in";
124
- }>>;
125
- op: z.ZodOptional<z.ZodEnum<{
126
- in: "in";
127
- "not in": "not in";
128
- }>>;
129
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
130
- }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
131
- field: z.ZodString;
132
- operator: z.ZodOptional<z.ZodEnum<{
133
- "=": "=";
134
- "==": "==";
135
- "!=": "!=";
136
- ">": ">";
137
- "<": "<";
138
- ">=": ">=";
139
- "<=": "<=";
140
- between: "between";
141
- }>>;
142
- op: z.ZodOptional<z.ZodEnum<{
143
- "=": "=";
144
- "==": "==";
145
- "!=": "!=";
146
- ">": ">";
147
- "<": "<";
148
- ">=": ">=";
149
- "<=": "<=";
150
- between: "between";
151
- }>>;
152
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
153
- }, z.core.$strip>, z.ZodObject<{
154
- field: z.ZodString;
155
- operator: z.ZodOptional<z.ZodEnum<{
156
- in: "in";
157
- "not in": "not in";
158
- }>>;
159
- op: z.ZodOptional<z.ZodEnum<{
160
- in: "in";
161
- "not in": "not in";
162
- }>>;
163
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
164
- }, z.core.$strip>]>>]>;
165
- text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
166
- textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
167
- textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
168
- textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
169
- textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
170
- left: "left";
171
- right: "right";
172
- center: "center";
173
- }>>>;
174
- textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
175
- top: "top";
176
- bottom: "bottom";
177
- middle: "middle";
178
- }>>>;
179
- backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
180
- backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
181
- backgroundBorderColor: z.ZodOptional<z.ZodString>;
182
- backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
183
- backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
184
- backgroundPadding: z.ZodOptional<z.ZodNumber>;
185
- offsetY: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
186
- offsetX: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
187
- }, z.core.$strip>;