@visactor/vseed 0.0.35 → 0.0.37

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 (115) hide show
  1. package/dist/builder/builder/builder.d.ts +8924 -8912
  2. package/dist/index.cjs +1128 -883
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +1097 -870
  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/dimensions/index.d.ts +1 -0
  18. package/dist/pipeline/utils/dimensions/typeGuard.d.ts +4 -0
  19. package/dist/pipeline/utils/measures/index.d.ts +1 -0
  20. package/dist/pipeline/utils/measures/typeGuard.d.ts +4 -0
  21. package/dist/types/advancedVSeed.d.ts +3843 -3839
  22. package/dist/types/chartType/area/zArea.d.ts +569 -569
  23. package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +569 -569
  24. package/dist/types/chartType/areaRange/zAreaRange.d.ts +550 -550
  25. package/dist/types/chartType/bar/bar.d.ts +0 -1183
  26. package/dist/types/chartType/bar/index.d.ts +2 -1
  27. package/dist/types/chartType/bar/zBar.d.ts +1183 -0
  28. package/dist/types/chartType/barParallel/barParallel.d.ts +0 -1183
  29. package/dist/types/chartType/barParallel/index.d.ts +2 -1
  30. package/dist/types/chartType/barParallel/zBarParallel.d.ts +1183 -0
  31. package/dist/types/chartType/barPercent/barPercent.d.ts +0 -1183
  32. package/dist/types/chartType/barPercent/index.d.ts +2 -1
  33. package/dist/types/chartType/barPercent/zBarPercent.d.ts +1183 -0
  34. package/dist/types/chartType/column/column.d.ts +0 -1183
  35. package/dist/types/chartType/column/index.d.ts +2 -1
  36. package/dist/types/chartType/column/zColumn.d.ts +1183 -0
  37. package/dist/types/chartType/columnParallel/columnParallel.d.ts +0 -1183
  38. package/dist/types/chartType/columnParallel/index.d.ts +2 -1
  39. package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +1183 -0
  40. package/dist/types/chartType/columnPercent/columnPercent.d.ts +0 -1183
  41. package/dist/types/chartType/columnPercent/index.d.ts +2 -1
  42. package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +1183 -0
  43. package/dist/types/chartType/donut/donut.d.ts +0 -119
  44. package/dist/types/chartType/donut/index.d.ts +2 -1
  45. package/dist/types/chartType/donut/zDonut.d.ts +119 -0
  46. package/dist/types/chartType/dualAxis/dualAxis.d.ts +58 -0
  47. package/dist/types/chartType/dualAxis/zDualAxis.d.ts +747 -749
  48. package/dist/types/chartType/funnel/funnel.d.ts +0 -89
  49. package/dist/types/chartType/funnel/index.d.ts +2 -1
  50. package/dist/types/chartType/funnel/zFunnel.d.ts +89 -0
  51. package/dist/types/chartType/heatmap/heatmap.d.ts +0 -89
  52. package/dist/types/chartType/heatmap/index.d.ts +2 -1
  53. package/dist/types/chartType/heatmap/zHeatmap.d.ts +89 -0
  54. package/dist/types/chartType/line/index.d.ts +2 -1
  55. package/dist/types/chartType/line/line.d.ts +0 -1365
  56. package/dist/types/chartType/line/zLine.d.ts +1365 -0
  57. package/dist/types/chartType/pie/index.d.ts +2 -1
  58. package/dist/types/chartType/pie/pie.d.ts +0 -119
  59. package/dist/types/chartType/pie/zPie.d.ts +119 -0
  60. package/dist/types/chartType/pivotTable/index.d.ts +2 -1
  61. package/dist/types/chartType/pivotTable/pivotTable.d.ts +44 -60
  62. package/dist/types/chartType/pivotTable/zPivotTable.d.ts +68 -0
  63. package/dist/types/chartType/radar/index.d.ts +2 -1
  64. package/dist/types/chartType/radar/radar.d.ts +0 -119
  65. package/dist/types/chartType/radar/zRadar.d.ts +119 -0
  66. package/dist/types/chartType/rose/index.d.ts +2 -1
  67. package/dist/types/chartType/rose/rose.d.ts +0 -119
  68. package/dist/types/chartType/rose/zRose.d.ts +119 -0
  69. package/dist/types/chartType/roseParallel/index.d.ts +2 -1
  70. package/dist/types/chartType/roseParallel/roseParallel.d.ts +0 -119
  71. package/dist/types/chartType/roseParallel/zRoseParallel.d.ts +119 -0
  72. package/dist/types/chartType/scatter/index.d.ts +2 -1
  73. package/dist/types/chartType/scatter/scatter.d.ts +0 -1191
  74. package/dist/types/chartType/scatter/zScatter.d.ts +1191 -0
  75. package/dist/types/chartType/table/index.d.ts +2 -1
  76. package/dist/types/chartType/table/table.d.ts +45 -64
  77. package/dist/types/chartType/table/zTable.d.ts +68 -0
  78. package/dist/types/dataSelector/selector.d.ts +16 -16
  79. package/dist/types/properties/analysis/analysis.d.ts +1 -1
  80. package/dist/types/properties/analysis/sort.d.ts +2 -4
  81. package/dist/types/properties/analysis/sortLegend.d.ts +2 -3
  82. package/dist/types/properties/annotation/annotation.d.ts +308 -308
  83. package/dist/types/properties/annotation/annotationArea.d.ts +20 -130
  84. package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +31 -138
  85. package/dist/types/properties/annotation/annotationPoint.d.ts +20 -114
  86. package/dist/types/properties/annotation/annotationVerticalLine.d.ts +6 -113
  87. package/dist/types/properties/annotation/index.d.ts +8 -4
  88. package/dist/types/properties/annotation/zAnnotationArea.d.ts +110 -0
  89. package/dist/types/properties/annotation/zAnnotationHorizontalLine.d.ts +107 -0
  90. package/dist/types/properties/annotation/zAnnotationPoint.d.ts +94 -0
  91. package/dist/types/properties/annotation/zAnnotationVerticalLine.d.ts +107 -0
  92. package/dist/types/properties/config/axes/axis.d.ts +45 -45
  93. package/dist/types/properties/config/axes/bandAxis.d.ts +74 -74
  94. package/dist/types/properties/config/axes/linearAxis.d.ts +76 -76
  95. package/dist/types/properties/config/backgroundColor/backgroundColor.d.ts +1 -1
  96. package/dist/types/properties/config/color/color.d.ts +3 -3
  97. package/dist/types/properties/config/config.d.ts +3286 -3282
  98. package/dist/types/properties/config/crosshair/crosshair.d.ts +10 -10
  99. package/dist/types/properties/config/label/label.d.ts +1 -1
  100. package/dist/types/properties/config/legend/legend.d.ts +13 -13
  101. package/dist/types/properties/config/tooltip/tooltip.d.ts +1 -1
  102. package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +2 -2
  103. package/dist/types/properties/encoding/encoding.d.ts +8 -8
  104. package/dist/types/properties/markStyle/areaStyle.d.ts +20 -20
  105. package/dist/types/properties/markStyle/barStyle.d.ts +24 -24
  106. package/dist/types/properties/markStyle/lineStyle.d.ts +24 -24
  107. package/dist/types/properties/markStyle/markStyle.d.ts +194 -194
  108. package/dist/types/properties/markStyle/pointStyle.d.ts +35 -35
  109. package/dist/types/properties/measures/dualMeasures.d.ts +0 -2
  110. package/dist/types/properties/measures/zDualMeasures.d.ts +0 -4
  111. package/dist/types/properties/theme/customTheme.d.ts +3334 -3330
  112. package/dist/types/vseed.d.ts +6781 -6757
  113. package/dist/umd/index.js +1148 -905
  114. package/dist/umd/index.js.map +1 -1
  115. 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,52 +48,52 @@ 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;
83
+ /**
84
+ * @description 标注面整体在Y方向的偏移像素距离, 当标注面在图表上方(数值较大时)时, 建议设置为正值, 标注面在图表下方(数值较小时)时, 建议设置为负值.
85
+ * 负值则整体向上偏移, 例如设置为-10, 则整个标注面组件包括文本、面图元, 一起向上偏移10像素
86
+ * 正值则整体向下偏移, 例如设置为10, 则整个标注面组件包括文本、面图元, 一起向下偏移10像素
87
+ * @example offsetY: 5, 标注面整体向下偏移5像素
88
+ */
89
+ offsetY?: number;
90
+ /**
91
+ * @description 标注面整体在X方向的偏移像素距离, 当标注面在图表左侧(类目轴起点)时, 建议设置为正值, 标注面在图表右侧(类目轴终点)时, 建议设置为负值.
92
+ * 负值则整体向左偏移, 例如设置为-10, 则整个标注面组件包括文本、面图元, 一起向左偏移10像素
93
+ * 正值则整体向右偏移, 例如设置为10, 则整个标注面组件包括文本、面图元, 一起向右偏移10像素
94
+ * @example offsetX: 5, 标注面整体向右偏移5像素
95
+ */
96
+ offsetX?: number;
98
97
  /**
99
98
  * @description 面积区域颜色
100
99
  * @example 'red'
@@ -127,112 +126,3 @@ export type AnnotationArea = {
127
126
  */
128
127
  outerPadding?: number;
129
128
  };
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,6 +56,37 @@ export type AnnotationHorizontalLine = {
57
56
  * @example 'top'
58
57
  */
59
58
  textBaseline?: 'top' | 'middle' | 'bottom';
59
+ /**
60
+ * @description 背景可见
61
+ * @example true
62
+ */
63
+ textBackgroundVisible?: boolean;
64
+ /**
65
+ * @description 背景颜色
66
+ * @example 'red'
67
+ */
68
+ textBackgroundColor?: string;
69
+ /**
70
+ * @description 背景边框颜色
71
+ * @example 'red'
72
+ */
73
+ textBackgroundBorderColor?: string;
74
+ /**
75
+ * 背景边框宽度
76
+ * @description 背景边框宽度
77
+ * @example 2
78
+ */
79
+ textBackgroundBorderWidth?: number;
80
+ /**
81
+ * @description 背景边框圆角
82
+ * @example 4
83
+ */
84
+ textBackgroundBorderRadius?: number;
85
+ /**
86
+ * @description 背景内边距
87
+ * @example 4
88
+ */
89
+ textBackgroundPadding?: number;
60
90
  /**
61
91
  * @description (水平)标注线整体在Y方向的偏移像素距离, 一般情况下, 无需设置
62
92
  * 负值则整体向上偏移, 例如设置为-10, 则整个(水平)标注线组件包括文本、箭头、线段, 一起向上偏移10像素
@@ -92,141 +122,4 @@ export type AnnotationHorizontalLine = {
92
122
  * @example 'solid'
93
123
  */
94
124
  lineStyle?: 'solid' | 'dashed' | 'dotted';
95
- /**
96
- * @description 背景可见
97
- * @example true
98
- */
99
- backgroundVisible?: boolean;
100
- /**
101
- * @description 背景颜色
102
- * @example 'red'
103
- */
104
- backgroundColor?: string;
105
- /**
106
- * @description 背景边框颜色
107
- * @example 'red'
108
- */
109
- backgroundBorderColor?: string;
110
- /**
111
- * 背景边框宽度
112
- * @description 背景边框宽度
113
- * @example 2
114
- */
115
- backgroundBorderWidth?: number;
116
- /**
117
- * @description 背景边框圆角
118
- * @example 4
119
- */
120
- backgroundBorderRadius?: number;
121
- /**
122
- * @description 背景内边距
123
- * @example 4
124
- */
125
- backgroundPadding?: number;
126
125
  };
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>;