@visactor/vseed 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/builder/builder/advanced/colorItems.d.ts +1 -0
  2. package/dist/builder/builder/advanced/index.d.ts +1 -1
  3. package/dist/builder/builder/builder.d.ts +10 -0
  4. package/dist/index.cjs +214 -38
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.js +198 -41
  7. package/dist/index.js.map +1 -1
  8. package/dist/pipeline/advanced/chart/pipes/analysis/index.d.ts +1 -0
  9. package/dist/pipeline/advanced/chart/pipes/analysis/sort.d.ts +4 -0
  10. package/dist/pipeline/advanced/chart/pipes/index.d.ts +1 -0
  11. package/dist/pipeline/spec/chart/pipes/dataset/datasetPivot.d.ts +0 -1
  12. package/dist/pipeline/spec/chart/pipes/dataset/index.d.ts +1 -1
  13. package/dist/types/advancedVSeed.d.ts +3 -0
  14. package/dist/types/chartType/area/area.d.ts +25 -1
  15. package/dist/types/chartType/areaPercent/areaPercent.d.ts +25 -1
  16. package/dist/types/chartType/bar/bar.d.ts +25 -1
  17. package/dist/types/chartType/barParallel/barParallel.d.ts +25 -1
  18. package/dist/types/chartType/barPercent/barPercent.d.ts +25 -1
  19. package/dist/types/chartType/column/column.d.ts +25 -1
  20. package/dist/types/chartType/columnParallel/columnParallel.d.ts +25 -1
  21. package/dist/types/chartType/columnPercent/columnPercent.d.ts +25 -1
  22. package/dist/types/chartType/line/line.d.ts +41 -1
  23. package/dist/types/properties/analysis/analysis.d.ts +4 -0
  24. package/dist/types/properties/analysis/index.d.ts +3 -0
  25. package/dist/types/properties/analysis/sortAxis.d.ts +39 -0
  26. package/dist/types/properties/analysis/sortLegend.d.ts +39 -0
  27. package/dist/types/properties/index.d.ts +1 -0
  28. package/dist/types/vseed.d.ts +16 -0
  29. package/dist/umd/index.js +8105 -78
  30. package/dist/umd/index.js.map +1 -1
  31. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export { sortXBandAxis, sortYBandAxis, sortLegend } from './sort';
@@ -0,0 +1,4 @@
1
+ import type { AdvancedPipe } from '../../../../../types';
2
+ export declare const sortXBandAxis: AdvancedPipe;
3
+ export declare const sortYBandAxis: AdvancedPipe;
4
+ export declare const sortLegend: AdvancedPipe;
@@ -6,3 +6,4 @@ export * from './theme';
6
6
  export * from './pivot';
7
7
  export * from './markStyle';
8
8
  export * from './annotation';
9
+ export * from './analysis';
@@ -1,3 +1,2 @@
1
1
  import type { SpecPipe } from '../../../../../types';
2
2
  export declare const datasetPivot: SpecPipe;
3
- export declare const datasetPivotPlaceholder: SpecPipe;
@@ -1,2 +1,2 @@
1
1
  export { dataset } from './dataset';
2
- export { datasetPivot, datasetPivotPlaceholder } from './datasetPivot';
2
+ export { datasetPivot } from './datasetPivot';
@@ -2055,6 +2055,9 @@ export declare const zAdvancedVSeed: z.ZodObject<{
2055
2055
  }, z.core.$strip>>;
2056
2056
  }, z.core.$strip>>;
2057
2057
  }, z.core.$strip>;
2058
+ analysis: z.ZodObject<{
2059
+ orderMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
2060
+ }, z.core.$strip>;
2058
2061
  theme: z.ZodString;
2059
2062
  markStyle: z.ZodObject<{
2060
2063
  barStyle: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -1,5 +1,5 @@
1
1
  import type { Locale } from '../../i18n';
2
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, MeasureTree } from '../../properties';
2
+ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, MeasureTree, SortAxis, SortLegend } from '../../properties';
3
3
  import { z } from 'zod';
4
4
  /**
5
5
  * 面积图类型定义
@@ -86,6 +86,30 @@ export interface Area {
86
86
  * @description 鼠标移动到图表上时, 显示的垂直提示线
87
87
  */
88
88
  crosshairLine?: CrosshairLine;
89
+ /**
90
+ * @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
91
+ * @example
92
+ * sortAxis: {
93
+ * orderBy: 'profit',
94
+ * order: 'asc',
95
+ * }
96
+ * sortAxis: {
97
+ * customOrder:['2019', '2020', '2021']
98
+ * }
99
+ */
100
+ sortAxis?: SortAxis;
101
+ /**
102
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
103
+ * @example
104
+ * sortLegend: {
105
+ * orderBy: 'profit',
106
+ * order: 'asc',
107
+ * }
108
+ * sortLegend: {
109
+ * customOrder:['2019', '2020', '2021']
110
+ * }
111
+ */
112
+ sortLegend?: SortLegend;
89
113
  /**
90
114
  * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
91
115
  * @default light 默认为亮色主题
@@ -1,5 +1,5 @@
1
1
  import type { Locale } from '../../i18n';
2
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, MeasureTree } from '../../properties';
2
+ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, MeasureTree, SortAxis, SortLegend } from '../../properties';
3
3
  import { z } from 'zod';
4
4
  /**
5
5
  * 百分比面积图类型定义
@@ -85,6 +85,30 @@ export interface AreaPercent {
85
85
  * @description 鼠标移动到图表上时, 显示的垂直提示线
86
86
  */
87
87
  crosshairLine?: CrosshairLine;
88
+ /**
89
+ * @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
90
+ * @example
91
+ * sortAxis: {
92
+ * orderBy: 'profit',
93
+ * order: 'asc',
94
+ * }
95
+ * sortAxis: {
96
+ * customOrder:['2019', '2020', '2021']
97
+ * }
98
+ */
99
+ sortAxis?: SortAxis;
100
+ /**
101
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
102
+ * @example
103
+ * sortLegend: {
104
+ * orderBy: 'profit',
105
+ * order: 'asc',
106
+ * }
107
+ * sortLegend: {
108
+ * customOrder:['2019', '2020', '2021']
109
+ * }
110
+ */
111
+ sortLegend?: SortLegend;
88
112
  /**
89
113
  * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
90
114
  * @default light 默认为亮色主题
@@ -1,5 +1,5 @@
1
1
  import { type Locale } from '../../i18n';
2
- import type { MeasureTree } from '../../properties';
2
+ import type { MeasureTree, SortAxis, SortLegend } from '../../properties';
3
3
  import { type AnnotationArea, type AnnotationHorizontalLine, type AnnotationPoint, type AnnotationVerticalLine, type BackgroundColor, type BarStyle, type Color, type CrosshairRect, type Dataset, type Dimensions, type Label, type Legend, type StackCornerRadius, type Theme, type Tooltip, type XLinearAxis, type YBandAxis } from '../../properties';
4
4
  import { z } from 'zod';
5
5
  /**
@@ -92,6 +92,30 @@ export interface Bar {
92
92
  * @default 8
93
93
  */
94
94
  stackCornerRadius?: StackCornerRadius;
95
+ /**
96
+ * @description Y轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
97
+ * @example
98
+ * sortAxis: {
99
+ * orderBy: 'profit',
100
+ * order: 'asc',
101
+ * }
102
+ * sortAxis: {
103
+ * customOrder:['2019', '2020', '2021']
104
+ * }
105
+ */
106
+ sortAxis?: SortAxis;
107
+ /**
108
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
109
+ * @example
110
+ * sortLegend: {
111
+ * orderBy: 'profit',
112
+ * order: 'asc',
113
+ * }
114
+ * sortLegend: {
115
+ * customOrder:['2019', '2020', '2021']
116
+ * }
117
+ */
118
+ sortLegend?: SortLegend;
95
119
  /**
96
120
  * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
97
121
  * @default light 默认为亮色主题
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { Locale } from '../../i18n';
3
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XLinearAxis, YBandAxis, MeasureTree } from '../../properties';
3
+ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XLinearAxis, YBandAxis, MeasureTree, SortAxis, SortLegend } from '../../properties';
4
4
  /**
5
5
  * 并列条形图类型定义
6
6
  * @description 并列条形图,适用于多指标横向并行对比场景,多个条形平行排列展示不同指标值
@@ -91,6 +91,30 @@ export interface BarParallel {
91
91
  * @default 8
92
92
  */
93
93
  stackCornerRadius?: StackCornerRadius;
94
+ /**
95
+ * @description Y轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
96
+ * @example
97
+ * sortAxis: {
98
+ * orderBy: 'profit',
99
+ * order: 'asc',
100
+ * }
101
+ * sortAxis: {
102
+ * customOrder:['2019', '2020', '2021']
103
+ * }
104
+ */
105
+ sortAxis?: SortAxis;
106
+ /**
107
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
108
+ * @example
109
+ * sortLegend: {
110
+ * orderBy: 'profit',
111
+ * order: 'asc',
112
+ * }
113
+ * sortLegend: {
114
+ * customOrder:['2019', '2020', '2021']
115
+ * }
116
+ */
117
+ sortLegend?: SortLegend;
94
118
  /**
95
119
  * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
96
120
  * @default light 默认为亮色主题
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { Locale } from '../../i18n';
3
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XLinearAxis, YBandAxis, MeasureTree } from '../../properties';
3
+ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XLinearAxis, YBandAxis, MeasureTree, SortAxis, SortLegend } from '../../properties';
4
4
  /**
5
5
  * 百分比条形图类型定义
6
6
  * @description 百分比条形图,适用于横向展示各类别占比关系的场景,X轴以百分比形式展示数据占比
@@ -91,6 +91,30 @@ export interface BarPercent {
91
91
  * @default 8
92
92
  */
93
93
  stackCornerRadius?: StackCornerRadius;
94
+ /**
95
+ * @description Y轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
96
+ * @example
97
+ * sortAxis: {
98
+ * orderBy: 'profit',
99
+ * order: 'asc',
100
+ * }
101
+ * sortAxis: {
102
+ * customOrder:['2019', '2020', '2021']
103
+ * }
104
+ */
105
+ sortAxis?: SortAxis;
106
+ /**
107
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
108
+ * @example
109
+ * sortLegend: {
110
+ * orderBy: 'profit',
111
+ * order: 'asc',
112
+ * }
113
+ * sortLegend: {
114
+ * customOrder:['2019', '2020', '2021']
115
+ * }
116
+ */
117
+ sortLegend?: SortLegend;
94
118
  /**
95
119
  * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
96
120
  * @default light 默认为亮色主题
@@ -1,5 +1,5 @@
1
1
  import type { Locale } from '../../i18n';
2
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree } from '../../properties';
2
+ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree, SortAxis, SortLegend } from '../../properties';
3
3
  import { z } from 'zod';
4
4
  /**
5
5
  * 柱状图类型定义
@@ -80,6 +80,30 @@ export interface Column {
80
80
  * @description 数值轴, y轴配置, 用于定义图表的y轴, 包括y轴的位置, 格式, 样式等.
81
81
  */
82
82
  yAxis?: YLinearAxis;
83
+ /**
84
+ * @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
85
+ * @example
86
+ * sortAxis: {
87
+ * orderBy: 'profit',
88
+ * order: 'asc',
89
+ * }
90
+ * sortAxis: {
91
+ * customOrder:['2019', '2020', '2021']
92
+ * }
93
+ */
94
+ sortAxis?: SortAxis;
95
+ /**
96
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
97
+ * @example
98
+ * sortLegend: {
99
+ * orderBy: 'profit',
100
+ * order: 'asc',
101
+ * }
102
+ * sortLegend: {
103
+ * customOrder:['2019', '2020', '2021']
104
+ * }
105
+ */
106
+ sortLegend?: SortLegend;
83
107
  /**
84
108
  * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
85
109
  * @default light 默认为亮色主题
@@ -1,5 +1,5 @@
1
1
  import type { Locale } from '../../i18n';
2
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree } from '../../properties';
2
+ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree, SortLegend, SortAxis } from '../../properties';
3
3
  import { z } from 'zod';
4
4
  /**
5
5
  * 并列柱状图类型定义
@@ -91,6 +91,30 @@ export interface ColumnParallel {
91
91
  * @default 8
92
92
  */
93
93
  stackCornerRadius?: StackCornerRadius;
94
+ /**
95
+ * @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
96
+ * @example
97
+ * sortAxis: {
98
+ * orderBy: 'profit',
99
+ * order: 'asc',
100
+ * }
101
+ * sortAxis: {
102
+ * customOrder:['2019', '2020', '2021']
103
+ * }
104
+ */
105
+ sortAxis?: SortAxis;
106
+ /**
107
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
108
+ * @example
109
+ * sortLegend: {
110
+ * orderBy: 'profit',
111
+ * order: 'asc',
112
+ * }
113
+ * sortLegend: {
114
+ * customOrder:['2019', '2020', '2021']
115
+ * }
116
+ */
117
+ sortLegend?: SortLegend;
94
118
  /**
95
119
  * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
96
120
  * @default light 默认为亮色主题
@@ -1,5 +1,5 @@
1
1
  import type { Locale } from '../../i18n';
2
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree } from '../../properties';
2
+ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, BarStyle, Color, CrosshairRect, Dataset, Dimensions, Label, Legend, StackCornerRadius, Theme, Tooltip, XBandAxis, YLinearAxis, MeasureTree, SortAxis, SortLegend } from '../../properties';
3
3
  import { z } from 'zod';
4
4
  /**
5
5
  * 百分比柱状图类型定义
@@ -91,6 +91,30 @@ export interface ColumnPercent {
91
91
  * @default 8
92
92
  */
93
93
  stackCornerRadius?: StackCornerRadius;
94
+ /**
95
+ * @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
96
+ * @example
97
+ * sortAxis: {
98
+ * orderBy: 'profit',
99
+ * order: 'asc',
100
+ * }
101
+ * sortAxis: {
102
+ * customOrder:['2019', '2020', '2021']
103
+ * }
104
+ */
105
+ sortAxis?: SortAxis;
106
+ /**
107
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
108
+ * @example
109
+ * sortLegend: {
110
+ * orderBy: 'profit',
111
+ * order: 'asc',
112
+ * }
113
+ * sortLegend: {
114
+ * customOrder:['2019', '2020', '2021']
115
+ * }
116
+ */
117
+ sortLegend?: SortLegend;
94
118
  /**
95
119
  * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
96
120
  * @default light 默认为亮色主题
@@ -1,5 +1,5 @@
1
1
  import type { Locale } from '../../i18n';
2
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, CrosshairLine, XBandAxis, YLinearAxis, MeasureTree } from '../../properties';
2
+ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, CrosshairLine, XBandAxis, YLinearAxis, MeasureTree, SortAxis, SortLegend } from '../../properties';
3
3
  import { z } from 'zod';
4
4
  /**
5
5
  * 折线图类型定义
@@ -85,6 +85,30 @@ export interface Line {
85
85
  * @description 鼠标移动到图表上时, 显示的垂直提示线
86
86
  */
87
87
  crosshairLine?: CrosshairLine;
88
+ /**
89
+ * @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
90
+ * @example
91
+ * sortAxis: {
92
+ * orderBy: 'profit',
93
+ * order: 'asc',
94
+ * }
95
+ * sortAxis: {
96
+ * customOrder:['2019', '2020', '2021']
97
+ * }
98
+ */
99
+ sortAxis?: SortAxis;
100
+ /**
101
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
102
+ * @example
103
+ * sortLegend: {
104
+ * orderBy: 'profit',
105
+ * order: 'asc',
106
+ * }
107
+ * sortLegend: {
108
+ * customOrder:['2019', '2020', '2021']
109
+ * }
110
+ */
111
+ sortLegend?: SortLegend;
88
112
  /**
89
113
  * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
90
114
  * @default light 默认为亮色主题
@@ -337,6 +361,22 @@ export declare const zLine: z.ZodObject<{
337
361
  labelVisible: z.ZodOptional<z.ZodBoolean>;
338
362
  labelBackgroundColor: z.ZodOptional<z.ZodString>;
339
363
  }, z.core.$strip>>;
364
+ sortAxis: z.ZodOptional<z.ZodObject<{
365
+ order: z.ZodDefault<z.ZodEnum<{
366
+ asc: "asc";
367
+ desc: "desc";
368
+ }>>;
369
+ orderBy: z.ZodOptional<z.ZodString>;
370
+ customOrder: z.ZodOptional<z.ZodArray<z.ZodAny>>;
371
+ }, z.core.$strip>>;
372
+ sortLegend: z.ZodOptional<z.ZodObject<{
373
+ order: z.ZodDefault<z.ZodEnum<{
374
+ asc: "asc";
375
+ desc: "desc";
376
+ }>>;
377
+ orderBy: z.ZodOptional<z.ZodString>;
378
+ customOrder: z.ZodOptional<z.ZodArray<z.ZodAny>>;
379
+ }, z.core.$strip>>;
340
380
  theme: z.ZodOptional<z.ZodString>;
341
381
  pointStyle: z.ZodOptional<z.ZodObject<{
342
382
  selector: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
@@ -0,0 +1,4 @@
1
+ import z from 'zod';
2
+ export declare const zAnalysis: z.ZodObject<{
3
+ orderMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
4
+ }, z.core.$strip>;
@@ -0,0 +1,3 @@
1
+ export * from './sortAxis';
2
+ export * from './sortLegend';
3
+ export * from './analysis';
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ export declare const zSortAxis: z.ZodObject<{
3
+ order: z.ZodDefault<z.ZodEnum<{
4
+ asc: "asc";
5
+ desc: "desc";
6
+ }>>;
7
+ orderBy: z.ZodOptional<z.ZodString>;
8
+ customOrder: z.ZodOptional<z.ZodArray<z.ZodAny>>;
9
+ }, z.core.$strip>;
10
+ /**
11
+ * @description 类目轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
12
+ * @default {}
13
+ * @example
14
+ * - order:'asc'
15
+ * - orderBy:'date'
16
+ * 或
17
+ * - customOrder:['2019', '2020', '2021']
18
+ */
19
+ export type SortAxis = {
20
+ /**
21
+ * @description 排序顺序, 可选值为 'asc' 或 'desc'
22
+ * @default 'asc'
23
+ * @enum ['asc', 'desc']
24
+ * @example order:'asc'
25
+ */
26
+ order?: 'asc' | 'desc';
27
+ /**
28
+ * @description 排序依赖的字段, 可以是维度id或指标id
29
+ * @default ''
30
+ * @example
31
+ * - orderBy:'date'
32
+ * - orderBy:'profit'
33
+ */
34
+ orderBy?: string;
35
+ /**
36
+ * @description 自定义排序顺序, 该顺序将直接应用至类目轴
37
+ */
38
+ customOrder?: string[];
39
+ };
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ export declare const zSortLegend: z.ZodObject<{
3
+ order: z.ZodDefault<z.ZodEnum<{
4
+ asc: "asc";
5
+ desc: "desc";
6
+ }>>;
7
+ orderBy: z.ZodOptional<z.ZodString>;
8
+ customOrder: z.ZodOptional<z.ZodArray<z.ZodAny>>;
9
+ }, z.core.$strip>;
10
+ /**
11
+ * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序; 排序数组遵循从左到右或从上到下的顺序
12
+ * @default {}
13
+ * @example
14
+ * - order:'asc'
15
+ * - orderBy:'date'
16
+ * 或
17
+ * - customOrder:['2019', '2020', '2021']
18
+ */
19
+ export type SortLegend = {
20
+ /**
21
+ * @description 排序顺序, 可选值为 'asc' 或 'desc'
22
+ * @default 'asc'
23
+ * @enum ['asc', 'desc']
24
+ * @example order:'asc'
25
+ */
26
+ order?: 'asc' | 'desc';
27
+ /**
28
+ * @description 排序依赖的字段, 可以是维度id或指标id
29
+ * @default ''
30
+ * @example
31
+ * - orderBy:'date'
32
+ * - orderBy:'profit'
33
+ */
34
+ orderBy?: string;
35
+ /**
36
+ * @description 自定义排序顺序, 该顺序将直接应用至图例, 升序从左到右或从上到下, 降序从右到左或从下到上
37
+ */
38
+ customOrder?: string[];
39
+ };
@@ -8,3 +8,4 @@ export * from './config';
8
8
  export * from './theme';
9
9
  export * from './markStyle';
10
10
  export * from './annotation';
11
+ export * from './analysis';
@@ -320,6 +320,22 @@ export declare const zVSeed: z.ZodDiscriminatedUnion<[z.ZodObject<{
320
320
  labelVisible: z.ZodOptional<z.ZodBoolean>;
321
321
  labelBackgroundColor: z.ZodOptional<z.ZodString>;
322
322
  }, z.core.$strip>>;
323
+ sortAxis: z.ZodOptional<z.ZodObject<{
324
+ order: z.ZodDefault<z.ZodEnum<{
325
+ asc: "asc";
326
+ desc: "desc";
327
+ }>>;
328
+ orderBy: z.ZodOptional<z.ZodString>;
329
+ customOrder: z.ZodOptional<z.ZodArray<z.ZodAny>>;
330
+ }, z.core.$strip>>;
331
+ sortLegend: z.ZodOptional<z.ZodObject<{
332
+ order: z.ZodDefault<z.ZodEnum<{
333
+ asc: "asc";
334
+ desc: "desc";
335
+ }>>;
336
+ orderBy: z.ZodOptional<z.ZodString>;
337
+ customOrder: z.ZodOptional<z.ZodArray<z.ZodAny>>;
338
+ }, z.core.$strip>>;
323
339
  theme: z.ZodOptional<z.ZodString>;
324
340
  pointStyle: z.ZodOptional<z.ZodObject<{
325
341
  selector: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{