@visactor/vseed 0.0.8 → 0.0.10

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 (46) hide show
  1. package/dist/builder/builder/builder.d.ts +338 -0
  2. package/dist/dataReshape/constant.d.ts +1 -0
  3. package/dist/dataSelector/index.d.ts +1 -0
  4. package/dist/dataSelector/selector.d.ts +7 -0
  5. package/dist/index.cjs +652 -89
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.js +637 -89
  8. package/dist/index.js.map +1 -1
  9. package/dist/pipeline/advanced/pipes/annotation/annotation.d.ts +2 -0
  10. package/dist/pipeline/advanced/pipes/annotation/index.d.ts +1 -0
  11. package/dist/pipeline/advanced/pipes/index.d.ts +2 -0
  12. package/dist/pipeline/advanced/pipes/markStyle/index.d.ts +1 -0
  13. package/dist/pipeline/advanced/pipes/markStyle/markStyle.d.ts +2 -0
  14. package/dist/pipeline/spec/pipes/annotation/annotationPoint.d.ts +2 -0
  15. package/dist/pipeline/spec/pipes/annotation/index.d.ts +1 -0
  16. package/dist/pipeline/spec/pipes/index.d.ts +2 -0
  17. package/dist/pipeline/spec/pipes/legend/{pivotLegend.d.ts → discreteLegend.d.ts} +1 -1
  18. package/dist/pipeline/spec/pipes/legend/index.d.ts +2 -2
  19. package/dist/pipeline/spec/pipes/legend/pivotDiscreteLegend.d.ts +2 -0
  20. package/dist/pipeline/spec/pipes/{legend/legend.d.ts → markStyle/barStyle.d.ts} +1 -1
  21. package/dist/pipeline/spec/pipes/markStyle/index.d.ts +1 -0
  22. package/dist/pipeline/spec/pipes/stack/index.d.ts +1 -1
  23. package/dist/pipeline/spec/pipes/stack/stack.d.ts +2 -2
  24. package/dist/types/advancedVSeed.d.ts +212 -0
  25. package/dist/types/chartType/area/area.d.ts +6 -1
  26. package/dist/types/chartType/areaPercent/areaPercent.d.ts +6 -1
  27. package/dist/types/chartType/bar/bar.d.ts +15 -1
  28. package/dist/types/chartType/barParallel/barParallel.d.ts +15 -1
  29. package/dist/types/chartType/barPercent/barPercent.d.ts +15 -1
  30. package/dist/types/chartType/column/column.d.ts +15 -1
  31. package/dist/types/chartType/columnParallel/columnParallel.d.ts +15 -1
  32. package/dist/types/chartType/columnPercent/columnPercent.d.ts +15 -1
  33. package/dist/types/chartType/line/line.d.ts +6 -1
  34. package/dist/types/dataSelector/index.d.ts +1 -0
  35. package/dist/types/dataSelector/selector.d.ts +34 -0
  36. package/dist/types/properties/annotation/annotation.d.ts +85 -0
  37. package/dist/types/properties/annotation/annotationPoint.d.ts +147 -0
  38. package/dist/types/properties/annotation/index.d.ts +2 -0
  39. package/dist/types/properties/baseConfig/baseConfig.d.ts +102 -0
  40. package/dist/types/properties/baseConfig/legend.d.ts +101 -4
  41. package/dist/types/properties/index.d.ts +2 -0
  42. package/dist/types/properties/markStyle/barStyle.d.ts +114 -0
  43. package/dist/types/properties/markStyle/index.d.ts +2 -0
  44. package/dist/types/properties/markStyle/markStyle.d.ts +29 -0
  45. package/dist/types/properties/theme/customTheme.d.ts +102 -0
  46. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ import type { AdvancedPipe } from '../../../../types';
2
+ export declare const annotation: AdvancedPipe;
@@ -0,0 +1 @@
1
+ export { annotation } from './annotation';
@@ -5,3 +5,5 @@ export * from './baseConfig';
5
5
  export * from './config';
6
6
  export * from './theme';
7
7
  export * from './pivot';
8
+ export * from './markStyle';
9
+ export * from './annotation';
@@ -0,0 +1 @@
1
+ export { markStyle } from './markStyle';
@@ -0,0 +1,2 @@
1
+ import type { AdvancedPipe } from '../../../../types';
2
+ export declare const markStyle: AdvancedPipe;
@@ -0,0 +1,2 @@
1
+ import type { SpecPipe } from '../../../../types';
2
+ export declare const annotationPoint: SpecPipe;
@@ -0,0 +1 @@
1
+ export { annotationPoint } from './annotationPoint';
@@ -9,3 +9,5 @@ export * from './label';
9
9
  export * from './legend';
10
10
  export * from './color';
11
11
  export * from './pivotChart';
12
+ export * from './markStyle';
13
+ export * from './annotation';
@@ -1,2 +1,2 @@
1
1
  import type { SpecPipe } from '../../../../types';
2
- export declare const pivotLegend: SpecPipe;
2
+ export declare const discreteLegend: SpecPipe;
@@ -1,2 +1,2 @@
1
- export { legend } from './legend';
2
- export { pivotLegend } from './pivotLegend';
1
+ export { discreteLegend } from './discreteLegend';
2
+ export { pivotDiscreteLegend } from './pivotDiscreteLegend';
@@ -0,0 +1,2 @@
1
+ import type { SpecPipe } from '../../../../types';
2
+ export declare const pivotDiscreteLegend: SpecPipe;
@@ -1,2 +1,2 @@
1
1
  import type { SpecPipe } from '../../../../types';
2
- export declare const legend: SpecPipe;
2
+ export declare const barStyle: SpecPipe;
@@ -0,0 +1 @@
1
+ export { barStyle } from './barStyle';
@@ -1 +1 @@
1
- export { stack } from './stack';
1
+ export { stackInverse } from './stack';
@@ -1,2 +1,2 @@
1
- import { SpecPipe } from '../../../../types';
2
- export declare const stack: SpecPipe;
1
+ import type { SpecPipe } from '../../../../types';
2
+ export declare const stackInverse: SpecPipe;
@@ -117,6 +117,57 @@ export declare const zAdvancedVSeed: z.ZodObject<{
117
117
  }, z.core.$strip>>;
118
118
  legend: z.ZodOptional<z.ZodObject<{
119
119
  enable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
120
+ border: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
121
+ maxSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
122
+ shapeType: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
123
+ circle: "circle";
124
+ cross: "cross";
125
+ diamond: "diamond";
126
+ square: "square";
127
+ arrow: "arrow";
128
+ arrow2Left: "arrow2Left";
129
+ arrow2Right: "arrow2Right";
130
+ wedge: "wedge";
131
+ thinTriangle: "thinTriangle";
132
+ triangle: "triangle";
133
+ triangleUp: "triangleUp";
134
+ triangleDown: "triangleDown";
135
+ triangleRight: "triangleRight";
136
+ triangleLeft: "triangleLeft";
137
+ stroke: "stroke";
138
+ star: "star";
139
+ wye: "wye";
140
+ rect: "rect";
141
+ arrowLeft: "arrowLeft";
142
+ arrowRight: "arrowRight";
143
+ rectRound: "rectRound";
144
+ roundLine: "roundLine";
145
+ }>>>;
146
+ position: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
147
+ left: "left";
148
+ leftTop: "leftTop";
149
+ leftBottom: "leftBottom";
150
+ lt: "lt";
151
+ lb: "lb";
152
+ top: "top";
153
+ topLeft: "topLeft";
154
+ topRight: "topRight";
155
+ tl: "tl";
156
+ tr: "tr";
157
+ right: "right";
158
+ rightTop: "rightTop";
159
+ rightBottom: "rightBottom";
160
+ rt: "rt";
161
+ rb: "rb";
162
+ bottom: "bottom";
163
+ bottomLeft: "bottomLeft";
164
+ bottomRight: "bottomRight";
165
+ bl: "bl";
166
+ br: "br";
167
+ }>>>;
168
+ labelFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
169
+ labelFontColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
170
+ labelFontWeight: z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
120
171
  }, z.core.$strip>>;
121
172
  }, z.core.$strip>>;
122
173
  vtable: z.ZodOptional<z.ZodObject<{
@@ -843,6 +894,33 @@ export declare const zAdvancedVSeed: z.ZodObject<{
843
894
  pivotTable: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
844
895
  }, z.core.$strip>;
845
896
  theme: z.ZodString;
897
+ markStyle: z.ZodObject<{
898
+ barStyle: z.ZodOptional<z.ZodObject<{
899
+ selector: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
900
+ field: z.ZodString;
901
+ operator: z.ZodString;
902
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
903
+ }, z.core.$strip>, z.ZodObject<{
904
+ field: z.ZodString;
905
+ operator: z.ZodString;
906
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
907
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
908
+ field: z.ZodString;
909
+ operator: z.ZodString;
910
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
911
+ }, z.core.$strip>, z.ZodObject<{
912
+ field: z.ZodString;
913
+ operator: z.ZodString;
914
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
915
+ }, z.core.$strip>]>>]>>;
916
+ barColor: z.ZodOptional<z.ZodString>;
917
+ barColorOpacity: z.ZodOptional<z.ZodNumber>;
918
+ barBorderColor: z.ZodOptional<z.ZodString>;
919
+ barBorderWidth: z.ZodOptional<z.ZodNumber>;
920
+ barBorderStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"solid">, z.ZodLiteral<"dashed">, z.ZodLiteral<"dotted">]>>;
921
+ barRadius: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
922
+ }, z.core.$strip>>;
923
+ }, z.core.$strip>;
846
924
  customTheme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
847
925
  baseConfig: z.ZodOptional<z.ZodObject<{
848
926
  vchart: z.ZodOptional<z.ZodObject<{
@@ -859,6 +937,57 @@ export declare const zAdvancedVSeed: z.ZodObject<{
859
937
  }, z.core.$strip>>;
860
938
  legend: z.ZodOptional<z.ZodObject<{
861
939
  enable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
940
+ border: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
941
+ maxSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
942
+ shapeType: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
943
+ circle: "circle";
944
+ cross: "cross";
945
+ diamond: "diamond";
946
+ square: "square";
947
+ arrow: "arrow";
948
+ arrow2Left: "arrow2Left";
949
+ arrow2Right: "arrow2Right";
950
+ wedge: "wedge";
951
+ thinTriangle: "thinTriangle";
952
+ triangle: "triangle";
953
+ triangleUp: "triangleUp";
954
+ triangleDown: "triangleDown";
955
+ triangleRight: "triangleRight";
956
+ triangleLeft: "triangleLeft";
957
+ stroke: "stroke";
958
+ star: "star";
959
+ wye: "wye";
960
+ rect: "rect";
961
+ arrowLeft: "arrowLeft";
962
+ arrowRight: "arrowRight";
963
+ rectRound: "rectRound";
964
+ roundLine: "roundLine";
965
+ }>>>;
966
+ position: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
967
+ left: "left";
968
+ leftTop: "leftTop";
969
+ leftBottom: "leftBottom";
970
+ lt: "lt";
971
+ lb: "lb";
972
+ top: "top";
973
+ topLeft: "topLeft";
974
+ topRight: "topRight";
975
+ tl: "tl";
976
+ tr: "tr";
977
+ right: "right";
978
+ rightTop: "rightTop";
979
+ rightBottom: "rightBottom";
980
+ rt: "rt";
981
+ rb: "rb";
982
+ bottom: "bottom";
983
+ bottomLeft: "bottomLeft";
984
+ bottomRight: "bottomRight";
985
+ bl: "bl";
986
+ br: "br";
987
+ }>>>;
988
+ labelFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
989
+ labelFontColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
990
+ labelFontWeight: z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
862
991
  }, z.core.$strip>>;
863
992
  }, z.core.$strip>>;
864
993
  vtable: z.ZodOptional<z.ZodObject<{
@@ -1585,5 +1714,88 @@ export declare const zAdvancedVSeed: z.ZodObject<{
1585
1714
  pivotTable: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
1586
1715
  }, z.core.$strip>>;
1587
1716
  }, z.core.$strip>>>;
1717
+ annotation: z.ZodObject<{
1718
+ annotationPoint: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1719
+ selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
1720
+ field: z.ZodString;
1721
+ operator: z.ZodString;
1722
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1723
+ }, z.core.$strip>, z.ZodObject<{
1724
+ field: z.ZodString;
1725
+ operator: z.ZodString;
1726
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1727
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
1728
+ field: z.ZodString;
1729
+ operator: z.ZodString;
1730
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1731
+ }, z.core.$strip>, z.ZodObject<{
1732
+ field: z.ZodString;
1733
+ operator: z.ZodString;
1734
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1735
+ }, z.core.$strip>]>>]>;
1736
+ text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
1737
+ textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1738
+ textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1739
+ textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1740
+ textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
1741
+ left: "left";
1742
+ right: "right";
1743
+ center: "center";
1744
+ }>>>;
1745
+ textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
1746
+ top: "top";
1747
+ bottom: "bottom";
1748
+ middle: "middle";
1749
+ }>>>;
1750
+ backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1751
+ backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1752
+ backgroundBorderColor: z.ZodOptional<z.ZodString>;
1753
+ backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1754
+ backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1755
+ backgroundPadding: z.ZodOptional<z.ZodNumber>;
1756
+ offsetY: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1757
+ offsetX: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1758
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
1759
+ selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
1760
+ field: z.ZodString;
1761
+ operator: z.ZodString;
1762
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1763
+ }, z.core.$strip>, z.ZodObject<{
1764
+ field: z.ZodString;
1765
+ operator: z.ZodString;
1766
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1767
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
1768
+ field: z.ZodString;
1769
+ operator: z.ZodString;
1770
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1771
+ }, z.core.$strip>, z.ZodObject<{
1772
+ field: z.ZodString;
1773
+ operator: z.ZodString;
1774
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1775
+ }, z.core.$strip>]>>]>;
1776
+ text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
1777
+ textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1778
+ textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1779
+ textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1780
+ textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
1781
+ left: "left";
1782
+ right: "right";
1783
+ center: "center";
1784
+ }>>>;
1785
+ textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
1786
+ top: "top";
1787
+ bottom: "bottom";
1788
+ middle: "middle";
1789
+ }>>>;
1790
+ backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1791
+ backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1792
+ backgroundBorderColor: z.ZodOptional<z.ZodString>;
1793
+ backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1794
+ backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1795
+ backgroundPadding: z.ZodOptional<z.ZodNumber>;
1796
+ offsetY: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1797
+ offsetX: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1798
+ }, z.core.$strip>>]>>;
1799
+ }, z.core.$strip>;
1588
1800
  }, z.core.$strip>;
1589
1801
  export type AdvancedVSeed = z.infer<typeof zAdvancedVSeed>;
@@ -1,4 +1,4 @@
1
- import type { BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
1
+ import type { AnnotationPoint, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
2
2
  /**
3
3
  * 面积图类型定义
4
4
  * @description 面积图, 适用于展示数据随时间变化的趋势及累积关系, 通过填充区域增强数据对比. X轴为类目轴(分类数据), Y轴为数值轴(连续数据).
@@ -88,4 +88,9 @@ export interface Area {
88
88
  * @example 'customThemeName'
89
89
  */
90
90
  theme?: Theme;
91
+ /**
92
+ * 标注点
93
+ * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
94
+ */
95
+ annotationPoint?: AnnotationPoint | AnnotationPoint[];
91
96
  }
@@ -1,4 +1,4 @@
1
- import type { BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
1
+ import type { AnnotationPoint, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
2
2
  /**
3
3
  * 百分比面积图类型定义
4
4
  * @description 百分比面积图,适用于展示多类别占比随时间变化的趋势,Y轴以百分比形式展示占比关系
@@ -87,4 +87,9 @@ export interface AreaPercent {
87
87
  * @example 'customThemeName'
88
88
  */
89
89
  theme?: Theme;
90
+ /**
91
+ * 标注点
92
+ * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
93
+ */
94
+ annotationPoint?: AnnotationPoint | AnnotationPoint[];
90
95
  }
@@ -1,4 +1,4 @@
1
- import type { BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XLinearAxis, YBandAxis } from '../../properties';
1
+ import type { AnnotationPoint, BackgroundColor, BarStyle, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XLinearAxis, YBandAxis } from '../../properties';
2
2
  /**
3
3
  * 条形图类型定义
4
4
  * @description 条形图,适用于横向数据对比场景,Y轴为类目轴(分类数据),X轴为数值轴(连续数据),柱子横向排列
@@ -87,4 +87,18 @@ export interface Bar {
87
87
  * @example 'customThemeName'
88
88
  */
89
89
  theme?: Theme;
90
+ /**
91
+ * 矩形图元样式
92
+ * @description 条形图样式配置, 用于定义图表的条形图样式, 包括条形图的颜色, 边框, 圆角等.
93
+ * 支持全局样式或条件样式配置
94
+ * 数据筛选器
95
+ * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
96
+ * 若未配置selector, 则样式全局生效.
97
+ */
98
+ barStyle?: BarStyle;
99
+ /**
100
+ * 标注点
101
+ * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
102
+ */
103
+ annotationPoint?: AnnotationPoint | AnnotationPoint[];
90
104
  }
@@ -1,4 +1,4 @@
1
- import type { BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XLinearAxis, YBandAxis } from '../../properties';
1
+ import type { AnnotationPoint, BackgroundColor, BarStyle, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XLinearAxis, YBandAxis } from '../../properties';
2
2
  /**
3
3
  * 并列条形图类型定义
4
4
  * @description 并列条形图,适用于多指标横向并行对比场景,多个条形平行排列展示不同指标值
@@ -87,4 +87,18 @@ export interface BarParallel {
87
87
  * @example 'customThemeName'
88
88
  */
89
89
  theme?: Theme;
90
+ /**
91
+ * 矩形图元样式
92
+ * @description 条形图样式配置, 用于定义图表的条形图样式, 包括条形图的颜色, 边框, 圆角等.
93
+ * 支持全局样式或条件样式配置
94
+ * 数据筛选器
95
+ * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
96
+ * 若未配置selector, 则样式全局生效.
97
+ */
98
+ barStyle?: BarStyle;
99
+ /**
100
+ * 标注点
101
+ * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
102
+ */
103
+ annotationPoint?: AnnotationPoint | AnnotationPoint[];
90
104
  }
@@ -1,4 +1,4 @@
1
- import type { BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XLinearAxis, YBandAxis } from '../../properties';
1
+ import type { AnnotationPoint, BackgroundColor, BarStyle, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XLinearAxis, YBandAxis } from '../../properties';
2
2
  /**
3
3
  * 百分比条形图类型定义
4
4
  * @description 百分比条形图,适用于横向展示各类别占比关系的场景,X轴以百分比形式展示数据占比
@@ -87,4 +87,18 @@ export interface BarPercent {
87
87
  * @example 'customThemeName'
88
88
  */
89
89
  theme?: Theme;
90
+ /**
91
+ * 矩形图元样式
92
+ * @description 条形图样式配置, 用于定义图表的条形图样式, 包括条形图的颜色, 边框, 圆角等.
93
+ * 支持全局样式或条件样式配置
94
+ * 数据筛选器
95
+ * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
96
+ * 若未配置selector, 则样式全局生效.
97
+ */
98
+ barStyle?: BarStyle;
99
+ /**
100
+ * 标注点
101
+ * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
102
+ */
103
+ annotationPoint?: AnnotationPoint | AnnotationPoint[];
90
104
  }
@@ -1,4 +1,4 @@
1
- import type { BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
1
+ import type { AnnotationPoint, BackgroundColor, BarStyle, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
2
2
  /**
3
3
  * 柱状图类型定义
4
4
  * @description 柱状图,适用于纵向数据对比场景,X轴为类目轴(分类数据),Y轴为数值轴(连续数据),柱子纵向排列
@@ -87,4 +87,18 @@ export interface Column {
87
87
  * @example 'customThemeName'
88
88
  */
89
89
  theme?: Theme;
90
+ /**
91
+ * 矩形图元样式
92
+ * @description 条形图样式配置, 用于定义图表的条形图样式, 包括条形图的颜色, 边框, 圆角等.
93
+ * 支持全局样式或条件样式配置
94
+ * 数据筛选器
95
+ * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
96
+ * 若未配置selector, 则样式全局生效.
97
+ */
98
+ barStyle?: BarStyle;
99
+ /**
100
+ * 标注点
101
+ * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
102
+ */
103
+ annotationPoint?: AnnotationPoint | AnnotationPoint[];
90
104
  }
@@ -1,4 +1,4 @@
1
- import type { BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
1
+ import type { AnnotationPoint, BackgroundColor, BarStyle, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
2
2
  /**
3
3
  * 并列柱状图类型定义
4
4
  * @description 并列柱状图,适用于多指标并行对比场景,多个柱子并列排列展示不同指标值
@@ -87,4 +87,18 @@ export interface ColumnParallel {
87
87
  * @example 'customThemeName'
88
88
  */
89
89
  theme?: Theme;
90
+ /**
91
+ * 矩形图元样式
92
+ * @description 条形图样式配置, 用于定义图表的条形图样式, 包括条形图的颜色, 边框, 圆角等.
93
+ * 支持全局样式或条件样式配置
94
+ * 数据筛选器
95
+ * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
96
+ * 若未配置selector, 则样式全局生效.
97
+ */
98
+ barStyle?: BarStyle;
99
+ /**
100
+ * 标注点
101
+ * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
102
+ */
103
+ annotationPoint?: AnnotationPoint | AnnotationPoint[];
90
104
  }
@@ -1,4 +1,4 @@
1
- import type { BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
1
+ import type { AnnotationPoint, BackgroundColor, BarStyle, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
2
2
  /**
3
3
  * 百分比柱状图类型定义
4
4
  * @description 百分比柱状图,适用于展示各类别占比关系的场景,Y轴以百分比形式展示数据占比
@@ -87,4 +87,18 @@ export interface ColumnPercent {
87
87
  * @example 'customThemeName'
88
88
  */
89
89
  theme?: Theme;
90
+ /**
91
+ * 矩形图元样式
92
+ * @description 条形图样式配置, 用于定义图表的条形图样式, 包括条形图的颜色, 边框, 圆角等.
93
+ * 支持全局样式或条件样式配置
94
+ * 数据筛选器
95
+ * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
96
+ * 若未配置selector, 则样式全局生效.
97
+ */
98
+ barStyle?: BarStyle;
99
+ /**
100
+ * 标注点
101
+ * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
102
+ */
103
+ annotationPoint?: AnnotationPoint | AnnotationPoint[];
90
104
  }
@@ -1,4 +1,4 @@
1
- import type { BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
1
+ import type { AnnotationPoint, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, Measures, Theme, Tooltip, XBandAxis, YLinearAxis } from '../../properties';
2
2
  /**
3
3
  * 折线图类型定义
4
4
  * @description 折线图,适用于展示数据随时间或有序类别变化的趋势,通过线段连接数据点形成趋势线
@@ -87,4 +87,9 @@ export interface Line {
87
87
  * @example 'customThemeName'
88
88
  */
89
89
  theme?: Theme;
90
+ /**
91
+ * 标注点
92
+ * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
93
+ */
94
+ annotationPoint?: AnnotationPoint | AnnotationPoint[];
90
95
  }
@@ -0,0 +1 @@
1
+ export * from './selector';
@@ -0,0 +1,34 @@
1
+ import { z } from 'zod';
2
+ import type { Datum } from '../properties';
3
+ export type ValueSelector = string | number;
4
+ export type PartialDatumSelector = Datum;
5
+ export type MeasureSelector = {
6
+ field: string;
7
+ operator: '=' | '!=' | '>' | '<' | '>=' | '<=' | 'between';
8
+ value: string | number | Array<string | number>;
9
+ };
10
+ export type DimensionSelector = {
11
+ field: string;
12
+ operator: 'in' | 'not in';
13
+ value: string | number | Array<string | number>;
14
+ };
15
+ export type Selector = ValueSelector | PartialDatumSelector | MeasureSelector | DimensionSelector;
16
+ export type Selectors = Array<Selector>;
17
+ export declare const zSelector: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
18
+ field: z.ZodString;
19
+ operator: z.ZodString;
20
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ field: z.ZodString;
23
+ operator: z.ZodString;
24
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
25
+ }, z.core.$strip>]>;
26
+ export declare const zSelectors: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
27
+ field: z.ZodString;
28
+ operator: z.ZodString;
29
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ field: z.ZodString;
32
+ operator: z.ZodString;
33
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
34
+ }, z.core.$strip>]>>;
@@ -0,0 +1,85 @@
1
+ import { z } from 'zod';
2
+ export declare const zAnnotation: z.ZodObject<{
3
+ annotationPoint: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
4
+ selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
5
+ field: z.ZodString;
6
+ operator: z.ZodString;
7
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ field: z.ZodString;
10
+ operator: z.ZodString;
11
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
12
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
13
+ field: z.ZodString;
14
+ operator: z.ZodString;
15
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
16
+ }, z.core.$strip>, z.ZodObject<{
17
+ field: z.ZodString;
18
+ operator: z.ZodString;
19
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
20
+ }, z.core.$strip>]>>]>;
21
+ text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
22
+ textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
23
+ textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
24
+ textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
25
+ textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
26
+ left: "left";
27
+ right: "right";
28
+ center: "center";
29
+ }>>>;
30
+ textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
31
+ top: "top";
32
+ bottom: "bottom";
33
+ middle: "middle";
34
+ }>>>;
35
+ backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
36
+ backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
37
+ backgroundBorderColor: z.ZodOptional<z.ZodString>;
38
+ backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
39
+ backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
40
+ backgroundPadding: z.ZodOptional<z.ZodNumber>;
41
+ offsetY: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
42
+ offsetX: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
43
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
44
+ selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
45
+ field: z.ZodString;
46
+ operator: z.ZodString;
47
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
48
+ }, z.core.$strip>, z.ZodObject<{
49
+ field: z.ZodString;
50
+ operator: z.ZodString;
51
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
52
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
53
+ field: z.ZodString;
54
+ operator: z.ZodString;
55
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ field: z.ZodString;
58
+ operator: z.ZodString;
59
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
60
+ }, z.core.$strip>]>>]>;
61
+ text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
62
+ textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
63
+ textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
64
+ textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
65
+ textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
66
+ left: "left";
67
+ right: "right";
68
+ center: "center";
69
+ }>>>;
70
+ textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
71
+ top: "top";
72
+ bottom: "bottom";
73
+ middle: "middle";
74
+ }>>>;
75
+ backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
76
+ backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
77
+ backgroundBorderColor: z.ZodOptional<z.ZodString>;
78
+ backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
79
+ backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
80
+ backgroundPadding: z.ZodOptional<z.ZodNumber>;
81
+ offsetY: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
82
+ offsetX: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
83
+ }, z.core.$strip>>]>>;
84
+ }, z.core.$strip>;
85
+ export type Annotation = z.infer<typeof zAnnotation>;