@visactor/vseed 0.0.21 → 0.0.23
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.
- package/dist/builder/builder/advanced/colorItems.d.ts +1 -0
- package/dist/builder/builder/advanced/index.d.ts +1 -1
- package/dist/builder/builder/builder.d.ts +947 -63
- package/dist/builder/register/chartType.d.ts +1 -0
- package/dist/builder/register/custom.d.ts +3 -0
- package/dist/builder/register/index.d.ts +1 -0
- package/dist/dataReshape/dataReshapeFor1D.d.ts +19 -0
- package/dist/dataReshape/index.d.ts +1 -0
- package/dist/index.cjs +713 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +667 -48
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/chart/pipeline/areaRange.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/analysis/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/analysis/sort.d.ts +4 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/encodingXYY.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/init/autoMeasuresBy2M1Group.d.ts +8 -0
- package/dist/pipeline/advanced/chart/pipes/init/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/reshape/index.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo1D.d.ts +8 -0
- package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo1D.d.ts +8 -0
- package/dist/pipeline/spec/chart/pipeline/areaRange.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipeline/index.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipes/dataset/datasetPivot.d.ts +0 -1
- package/dist/pipeline/spec/chart/pipes/dataset/index.d.ts +1 -1
- package/dist/pipeline/spec/chart/pipes/index.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipes/init/areaRange.d.ts +4 -0
- package/dist/pipeline/spec/chart/pipes/init/index.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipes/series/index.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipes/series/series.d.ts +2 -0
- package/dist/types/advancedVSeed.d.ts +310 -0
- package/dist/types/chartType/area/area.d.ts +25 -1
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +25 -1
- package/dist/types/chartType/areaRange/areaRange.d.ts +1337 -0
- package/dist/types/chartType/areaRange/index.d.ts +1 -0
- package/dist/types/chartType/bar/bar.d.ts +25 -1
- package/dist/types/chartType/barParallel/barParallel.d.ts +25 -1
- package/dist/types/chartType/barPercent/barPercent.d.ts +25 -1
- package/dist/types/chartType/column/column.d.ts +25 -1
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +25 -1
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +25 -1
- package/dist/types/chartType/index.d.ts +1 -0
- package/dist/types/chartType/line/line.d.ts +41 -1
- package/dist/types/properties/analysis/analysis.d.ts +4 -0
- package/dist/types/properties/analysis/index.d.ts +3 -0
- package/dist/types/properties/analysis/sortAxis.d.ts +39 -0
- package/dist/types/properties/analysis/sortLegend.d.ts +39 -0
- package/dist/types/properties/chartType/chartType.d.ts +3 -1
- package/dist/types/properties/config/config.d.ts +307 -0
- package/dist/types/properties/index.d.ts +1 -0
- package/dist/types/properties/theme/customTheme.d.ts +306 -0
- package/dist/types/vseed.d.ts +1206 -1
- package/dist/umd/index.js +8847 -350
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
@@ -0,0 +1 @@
|
|
1
|
+
export * from './areaRange';
|
@@ -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,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
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
export type ChartType = 'table' | 'pivotTable' | 'line' | 'column' | 'columnPercent' | 'columnParallel' | 'bar' | 'barPercent' | 'barParallel' | 'area' | 'areaPercent' | 'rose' | 'roseParallel' | 'pie' | 'donut' | 'dualAxis' | 'scatter' | 'funnel';
|
2
|
+
export type ChartType = 'table' | 'pivotTable' | 'line' | 'column' | 'columnPercent' | 'columnParallel' | 'bar' | 'barPercent' | 'barParallel' | 'area' | 'areaPercent' | 'areaRange' | 'rose' | 'roseParallel' | 'pie' | 'donut' | 'dualAxis' | 'scatter' | 'funnel';
|
3
3
|
export declare enum ChartTypeEnum {
|
4
4
|
Table = "table",
|
5
5
|
PivotTable = "pivotTable",
|
@@ -12,6 +12,7 @@ export declare enum ChartTypeEnum {
|
|
12
12
|
BarParallel = "barParallel",
|
13
13
|
Area = "area",
|
14
14
|
AreaPercent = "areaPercent",
|
15
|
+
AreaRange = "areaRange",
|
15
16
|
Rose = "rose",
|
16
17
|
RoseParallel = "roseParallel",
|
17
18
|
Pie = "pie",
|
@@ -32,6 +33,7 @@ export declare const zChartType: z.ZodEnum<{
|
|
32
33
|
barParallel: "barParallel";
|
33
34
|
area: "area";
|
34
35
|
areaPercent: "areaPercent";
|
36
|
+
areaRange: "areaRange";
|
35
37
|
rose: "rose";
|
36
38
|
roseParallel: "roseParallel";
|
37
39
|
pie: "pie";
|