@visactor/vseed 0.0.32 → 0.0.34

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 (81) hide show
  1. package/dist/builder/builder/buildAdvanced.d.ts +1 -1
  2. package/dist/builder/builder/buildSpec.d.ts +1 -1
  3. package/dist/builder/builder/builder.d.ts +2795 -4888
  4. package/dist/builder/register/chartType/dualAxis.d.ts +1 -0
  5. package/dist/builder/register/chartType/index.d.ts +12 -11
  6. package/dist/dataReshape/constant.d.ts +3 -1
  7. package/dist/index.cjs +1392 -236
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.js +1325 -196
  10. package/dist/index.js.map +1 -1
  11. package/dist/pipeline/advanced/chart/pipeline/dualAxis.d.ts +2 -0
  12. package/dist/pipeline/advanced/chart/pipeline/index.d.ts +1 -0
  13. package/dist/pipeline/advanced/chart/pipes/config/dualAxis.d.ts +2 -0
  14. package/dist/pipeline/advanced/chart/pipes/config/index.d.ts +1 -0
  15. package/dist/pipeline/advanced/chart/pipes/encoding/encodingAreaRange.d.ts +2 -0
  16. package/dist/pipeline/advanced/chart/pipes/encoding/index.d.ts +1 -0
  17. package/dist/pipeline/advanced/chart/pipes/init/autoDualMeasures.d.ts +2 -0
  18. package/dist/pipeline/advanced/chart/pipes/reshape/index.d.ts +2 -0
  19. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo2D2M.d.ts +8 -0
  20. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo2D2M.d.ts +8 -0
  21. package/dist/pipeline/spec/chart/pipeline/dualAxis.d.ts +2 -0
  22. package/dist/pipeline/spec/chart/pipeline/index.d.ts +1 -0
  23. package/dist/pipeline/spec/chart/pipes/axes/index.d.ts +2 -0
  24. package/dist/pipeline/spec/chart/pipes/axes/yLinearPrimary.d.ts +2 -0
  25. package/dist/pipeline/spec/chart/pipes/axes/yLinearSecondary.d.ts +2 -0
  26. package/dist/pipeline/spec/chart/pipes/dataset/datasetDualAxis.d.ts +3 -0
  27. package/dist/pipeline/spec/chart/pipes/dataset/index.d.ts +1 -0
  28. package/dist/pipeline/spec/chart/pipes/dual/dualChartType.d.ts +3 -0
  29. package/dist/pipeline/spec/chart/pipes/dual/index.d.ts +1 -0
  30. package/dist/pipeline/spec/chart/pipes/index.d.ts +1 -0
  31. package/dist/pipeline/spec/chart/pipes/init/index.d.ts +1 -0
  32. package/dist/pipeline/spec/chart/pipes/init/initDualAxis.d.ts +3 -0
  33. package/dist/pipeline/spec/chart/pipes/label/index.d.ts +1 -0
  34. package/dist/pipeline/spec/chart/pipes/label/labelDualAxis.d.ts +3 -0
  35. package/dist/pipeline/spec/chart/pipes/tooltip/index.d.ts +1 -0
  36. package/dist/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.d.ts +3 -0
  37. package/dist/pipeline/utils/chatType.d.ts +2 -2
  38. package/dist/pipeline/utils/measures/depth.d.ts +8 -0
  39. package/dist/pipeline/utils/measures/index.d.ts +1 -0
  40. package/dist/types/advancedVSeed.d.ts +547 -54
  41. package/dist/types/builder/builder.d.ts +16 -15
  42. package/dist/types/chartType/area/area.d.ts +0 -1494
  43. package/dist/types/chartType/area/index.d.ts +2 -1
  44. package/dist/types/chartType/area/zArea.d.ts +1494 -0
  45. package/dist/types/chartType/areaPercent/areaPercent.d.ts +0 -1494
  46. package/dist/types/chartType/areaPercent/index.d.ts +2 -1
  47. package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +1494 -0
  48. package/dist/types/chartType/areaRange/areaRange.d.ts +0 -1433
  49. package/dist/types/chartType/areaRange/index.d.ts +2 -1
  50. package/dist/types/chartType/areaRange/zAreaRange.d.ts +1433 -0
  51. package/dist/types/chartType/bar/bar.d.ts +40 -40
  52. package/dist/types/chartType/barParallel/barParallel.d.ts +40 -40
  53. package/dist/types/chartType/barPercent/barPercent.d.ts +40 -40
  54. package/dist/types/chartType/column/column.d.ts +40 -40
  55. package/dist/types/chartType/columnParallel/columnParallel.d.ts +40 -40
  56. package/dist/types/chartType/columnPercent/columnPercent.d.ts +40 -40
  57. package/dist/types/chartType/dualAxis/dualAxis.d.ts +123 -23
  58. package/dist/types/chartType/dualAxis/index.d.ts +1 -0
  59. package/dist/types/chartType/dualAxis/zDualAxis.d.ts +1963 -0
  60. package/dist/types/chartType/index.d.ts +1 -1
  61. package/dist/types/chartType/line/line.d.ts +40 -40
  62. package/dist/types/chartType/scatter/scatter.d.ts +40 -40
  63. package/dist/types/properties/annotation/annotation.d.ts +40 -40
  64. package/dist/types/properties/annotation/annotationArea.d.ts +27 -34
  65. package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +7 -7
  66. package/dist/types/properties/annotation/annotationPoint.d.ts +24 -22
  67. package/dist/types/properties/annotation/annotationVerticalLine.d.ts +7 -7
  68. package/dist/types/properties/chartType/dualChartType.d.ts +22 -0
  69. package/dist/types/properties/chartType/index.d.ts +2 -0
  70. package/dist/types/properties/config/config.d.ts +493 -7
  71. package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +7 -0
  72. package/dist/types/properties/measures/dualMeasures.d.ts +8 -0
  73. package/dist/types/properties/measures/index.d.ts +4 -1
  74. package/dist/types/properties/measures/measures.d.ts +0 -107
  75. package/dist/types/properties/measures/zDualMeasures.d.ts +287 -0
  76. package/dist/types/properties/measures/zMeasures.d.ts +108 -0
  77. package/dist/types/properties/theme/customTheme.d.ts +500 -14
  78. package/dist/types/vseed.d.ts +2401 -440
  79. package/dist/umd/index.js +1316 -178
  80. package/dist/umd/index.js.map +1 -1
  81. package/package.json +1 -1
@@ -217,16 +217,16 @@ export declare const zAnnotationHorizontalLine: z.ZodObject<{
217
217
  bottom: "bottom";
218
218
  middle: "middle";
219
219
  }>>>;
220
- lineVisible: z.ZodOptional<z.ZodBoolean>;
221
- lineColor: z.ZodOptional<z.ZodString>;
222
- lineWidth: z.ZodOptional<z.ZodNumber>;
223
- lineStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"solid">, z.ZodLiteral<"dashed">, z.ZodLiteral<"dotted">]>>;
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
224
  backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
225
225
  backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
226
- backgroundBorderColor: z.ZodOptional<z.ZodString>;
227
- backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
226
+ backgroundBorderColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
228
227
  backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
229
- backgroundPadding: z.ZodOptional<z.ZodNumber>;
228
+ backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
229
+ backgroundPadding: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
230
230
  offsetX: z.ZodDefault<z.ZodNumber>;
231
231
  offsetY: z.ZodDefault<z.ZodNumber>;
232
232
  }, z.core.$strip>;
@@ -1,90 +1,92 @@
1
1
  import { type Selector, type Selectors } from '../../dataSelector';
2
2
  import { z } from 'zod';
3
+ /**
4
+ * @description 标注点, 根据用户设置的selector, 在数据点的左下方, 显示一个带有背景的标签.
5
+ */
3
6
  export type AnnotationPoint = {
4
7
  /**
5
- * 依赖选择的数据, 进行数据标记.
8
+ * @description 标注点的选择器, 用于选择数据点.
6
9
  */
7
10
  selector: Selector | Selectors;
8
11
  /**
9
- * 标注的文本
10
12
  * @description 标注的文本
11
13
  * @default ''
12
14
  * @example '标注文本'
13
15
  */
14
16
  text?: string | string[];
15
17
  /**
16
- * 文本颜色
17
18
  * @description 文本颜色
18
19
  * @example 'red'
19
20
  */
20
21
  textColor?: string;
21
22
  /**
22
- * 文本字体大小
23
23
  * @description 文本字体大小
24
24
  * @example 12
25
25
  */
26
26
  textFontSize?: number;
27
27
  /**
28
- * 文本字体重量
29
28
  * @description 文本字体重量
30
29
  * @example 400
31
30
  */
32
31
  textFontWeight?: number;
33
32
  /**
34
- * 文本对齐方式
35
- * @description 文本对齐方式
36
- * @example 'left'
33
+ * @description 文本对齐方式, 一般情况下, 设置为right, 文本显示在标注点左侧, 确保显示在图表的可见区域
34
+ * 建议设置为'right', 这样可以确保文本在标注点的左侧
35
+ * right: 文本在标注点的左侧, 文本的右侧边缘对齐标注点
36
+ * left: 文本在标注点的右侧, 文本的左侧边缘对齐标注点
37
+ * center: 文本在标注点的中心, 文本的中心对齐标注点
38
+ * @example 'right' 文本在标注点的左侧
37
39
  */
38
40
  textAlign?: 'left' | 'right' | 'center';
39
41
  /**
40
- * 文本垂直对齐方式
41
- * @description 文本垂直对齐方式
42
- * @example 'middle'
42
+ * @description 文本垂直对齐方式, 一般情况下, 设置为top, 文本显示在标注点底部, 确保显示在图表的可见区域
43
+ * 建议设置为'top', 这样可以确保文本完整的显示在图表的可见区域
44
+ * top: 文本在标注点的底部, 文本的顶部边缘对齐标注点
45
+ * middle: 文本在标注点的中心, 文本的中心对齐标注点
46
+ * bottom: 文本在标注点的顶部, 文本的底部边缘对齐标注点
47
+ * @example 'top' 文本在标注点的底部
43
48
  */
44
49
  textBaseline?: 'top' | 'middle' | 'bottom';
45
50
  /**
46
- * 文本Y方向的, 偏移量
47
- * @example offsetY: 10
51
+ * @description 标注点整体在Y方向的偏移像素距离, 当标注点在图表上方(数值较大时)时, 建议设置为正值, 标注点在图表下方(数值较小时)时, 建议设置为负值.
52
+ * 负值则整体向上偏移, 例如设置为-10, 则整个标注点组件包括文本、文本背景, 一起向上偏移10像素
53
+ * 正值则整体向下偏移, 例如设置为10, 则整个标注点组件包括文本、文本背景, 一起向下偏移10像素
54
+ * @example offsetY: 5, 标注点整体向下偏移5像素
48
55
  */
49
56
  offsetY?: number;
50
57
  /**
51
- * 文本X方向的, 偏移量
52
- * @description 文本X方向的, 偏移量, 支持正负
53
- * @example offsetX: -10
58
+ * @description 标注点整体在X方向的偏移像素距离, 当标注点在图表左侧(类目轴起点)时, 建议设置为正值, 标注点在图表右侧(类目轴终点)时, 建议设置为负值.
59
+ * 负值则整体向左偏移, 例如设置为-10, 则整个标注点组件包括文本、文本背景, 一起向左偏移10像素
60
+ * 正值则整体向右偏移, 例如设置为10, 则整个标注点组件包括文本、文本背景, 一起向右偏移10像素
61
+ * @example offsetX: 5, 标注点整体向右偏移5像素
54
62
  */
55
63
  offsetX?: number;
56
64
  /**
57
- * 背景可见
58
65
  * @description 背景可见
59
66
  * @example true
60
67
  */
61
68
  backgroundVisible?: boolean;
62
69
  /**
63
- * 背景颜色
64
70
  * @description 背景颜色
65
71
  * @example 'red'
66
72
  */
67
73
  backgroundColor?: string;
68
74
  /**
69
- * 背景边框颜色
70
75
  * @description 背景边框颜色
71
76
  * @example 'red'
72
77
  */
73
78
  backgroundBorderColor?: string;
74
79
  /**
75
- * 背景边框宽度
76
80
  * @description 背景边框宽度
77
81
  * @example 2
78
82
  */
79
83
  backgroundBorderWidth?: number;
80
84
  /**
81
- * 背景边框圆角
82
85
  * @description 背景边框圆角
83
86
  * @example 4
84
87
  */
85
88
  backgroundBorderRadius?: number;
86
89
  /**
87
- * 背景内边距
88
90
  * @description 背景内边距
89
91
  * @example 4
90
92
  */
@@ -214,16 +214,16 @@ export declare const zAnnotationVerticalLine: z.ZodObject<{
214
214
  bottom: "bottom";
215
215
  middle: "middle";
216
216
  }>>>;
217
- lineVisible: z.ZodOptional<z.ZodBoolean>;
218
- lineColor: z.ZodOptional<z.ZodString>;
219
- lineWidth: z.ZodOptional<z.ZodNumber>;
220
- lineStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"solid">, z.ZodLiteral<"dashed">, z.ZodLiteral<"dotted">]>>;
217
+ lineVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
218
+ lineColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
219
+ lineWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
220
+ lineStyle: z.ZodOptional<z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"solid">, z.ZodLiteral<"dashed">, z.ZodLiteral<"dotted">]>>>;
221
221
  backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
222
222
  backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
223
- backgroundBorderColor: z.ZodOptional<z.ZodString>;
224
- backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
223
+ backgroundBorderColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
225
224
  backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
226
- backgroundPadding: z.ZodOptional<z.ZodNumber>;
225
+ backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
226
+ backgroundPadding: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
227
227
  offsetX: z.ZodDefault<z.ZodNumber>;
228
228
  offsetY: z.ZodDefault<z.ZodNumber>;
229
229
  }, z.core.$strip>;
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ export declare const zDualChartType: z.ZodObject<{
3
+ primary: z.ZodDefault<z.ZodEnum<{
4
+ line: "line";
5
+ column: "column";
6
+ columnPercent: "columnPercent";
7
+ columnParallel: "columnParallel";
8
+ area: "area";
9
+ areaPercent: "areaPercent";
10
+ scatter: "scatter";
11
+ }>>;
12
+ secondary: z.ZodDefault<z.ZodEnum<{
13
+ line: "line";
14
+ column: "column";
15
+ columnPercent: "columnPercent";
16
+ columnParallel: "columnParallel";
17
+ area: "area";
18
+ areaPercent: "areaPercent";
19
+ scatter: "scatter";
20
+ }>>;
21
+ }, z.core.$strip>;
22
+ export type DualChartType = z.infer<typeof zDualChartType>;
@@ -1,2 +1,4 @@
1
1
  export type { ChartType } from './chartType';
2
2
  export { zChartType } from './chartType';
3
+ export { zDualChartType } from './dualChartType';
4
+ export type { DualChartType } from './dualChartType';