@visactor/vseed 0.0.31 → 0.0.32
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/index.cjs +26 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -22
- package/dist/index.js.map +1 -1
- package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +25 -27
- package/dist/types/properties/annotation/annotationVerticalLine.d.ts +26 -31
- package/dist/umd/index.js +26 -22
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,17 +1,18 @@
|
|
1
1
|
import { type Selector, type Selectors } from '../../dataSelector';
|
2
2
|
import { z } from 'zod';
|
3
|
+
/**
|
4
|
+
* @description 水平标注线, 根据用户设置的selector 或 yValue, 从左向右绘制一条末尾有箭头的线, 标签默认在标注线的终点正下方
|
5
|
+
*/
|
3
6
|
export type AnnotationHorizontalLine = {
|
4
7
|
/**
|
5
|
-
* 依赖选择的数据, 进行数据标记.
|
8
|
+
* @description 依赖选择的数据, 进行数据标记.
|
6
9
|
*/
|
7
10
|
selector?: Selector | Selectors;
|
8
11
|
/**
|
9
|
-
* 固定的y值,
|
10
|
-
* @description 类目轴在y方向, 则可输入维值, 数值轴在y方向, 则可输入具体的数值
|
12
|
+
* @description 固定的y值, 用于标注水平线, 类目轴在y方向, 则可输入维值, 数值轴在y方向, 则可输入具体的数值
|
11
13
|
*/
|
12
14
|
yValue?: (number | string) | (number | string)[];
|
13
15
|
/**
|
14
|
-
* 标注的文本
|
15
16
|
* @description 标注的文本
|
16
17
|
* @default ''
|
17
18
|
* @example '标注文本'
|
@@ -24,45 +25,50 @@ export type AnnotationHorizontalLine = {
|
|
24
25
|
*/
|
25
26
|
textPosition?: 'outsideStart' | 'outsideEnd' | 'outsideMiddle' | 'insideStart' | 'insideMiddle' | 'insideEnd';
|
26
27
|
/**
|
27
|
-
* 文本颜色
|
28
28
|
* @description 文本颜色
|
29
29
|
* @example 'red'
|
30
30
|
*/
|
31
31
|
textColor?: string;
|
32
32
|
/**
|
33
|
-
* 文本字体大小
|
34
33
|
* @description 文本字体大小
|
35
34
|
* @example 12
|
36
35
|
*/
|
37
36
|
textFontSize?: number;
|
38
37
|
/**
|
39
|
-
* 文本字体重量
|
40
38
|
* @description 文本字体重量
|
41
39
|
* @example 400
|
42
40
|
*/
|
43
41
|
textFontWeight?: number;
|
44
42
|
/**
|
45
|
-
*
|
46
|
-
*
|
47
|
-
*
|
43
|
+
* @description 文本对齐方式, 一般情况下, 无需设置
|
44
|
+
* 建议设置为'right', 这样可以确保文本在标注线的左侧
|
45
|
+
* right: 文本在参考线的左侧, 文本的右侧边缘对齐(水平)标注线的终点
|
46
|
+
* left: 文本在参考线的右侧, 文本的左侧边缘对齐(水平)标注线的终点
|
47
|
+
* center: 文本在参考线的中心, 文本的中心对齐(水平)标注线的终点
|
48
|
+
* @example 'right'
|
48
49
|
*/
|
49
50
|
textAlign?: 'left' | 'right' | 'center';
|
50
51
|
/**
|
51
|
-
*
|
52
|
-
*
|
53
|
-
*
|
52
|
+
* @description 文本垂直对齐方式, 一般情况下, 无需设置
|
53
|
+
* 建议设置为'top', 这样可以确保文本完整的显示在图表的可见区域
|
54
|
+
* top: 文本在参考线的底部, 文本的顶部边缘对齐(水平)标注线
|
55
|
+
* middle: 文本在参考线的中心, 文本的中心对齐(水平)标注线
|
56
|
+
* bottom: 文本在参考线的顶部, 文本的底部边缘对齐(水平)标注线
|
57
|
+
* @example 'top'
|
54
58
|
*/
|
55
59
|
textBaseline?: 'top' | 'middle' | 'bottom';
|
56
60
|
/**
|
57
|
-
*
|
58
|
-
*
|
59
|
-
*
|
61
|
+
* @description (水平)标注线整体在Y方向的偏移像素距离, 一般情况下, 无需设置
|
62
|
+
* 负值则整体向上偏移, 例如设置为-10, 则整个(水平)标注线组件包括文本、箭头、线段, 一起向上偏移10像素
|
63
|
+
* 正值则整体向下偏移, 例如设置为10, 则整个(水平)标注线组件包括文本、箭头、线段, 一起向下偏移10像素
|
64
|
+
* @example offsetY: 0
|
60
65
|
*/
|
61
66
|
offsetY?: number;
|
62
67
|
/**
|
63
|
-
*
|
64
|
-
*
|
65
|
-
*
|
68
|
+
* @description (水平)标注线整体在X方向的偏移像素距离, 一般情况下, 无需设置
|
69
|
+
* 负值则整体向左偏移, 例如设置为-10, 则整个(水平)标注线组件包括文本、箭头、线段, 一起向左偏移10像素
|
70
|
+
* 正值则整体向右偏移, 例如设置为10, 则整个(水平)标注线组件包括文本、箭头、线段, 一起向右偏移10像素
|
71
|
+
* @example offsetX: 0
|
66
72
|
*/
|
67
73
|
offsetX?: number;
|
68
74
|
/**
|
@@ -72,37 +78,31 @@ export type AnnotationHorizontalLine = {
|
|
72
78
|
*/
|
73
79
|
lineVisible?: boolean;
|
74
80
|
/**
|
75
|
-
* 线颜色
|
76
81
|
* @description 线颜色
|
77
82
|
* @example 'red'
|
78
83
|
*/
|
79
84
|
lineColor?: string;
|
80
85
|
/**
|
81
|
-
* 线宽度
|
82
86
|
* @description 线宽度
|
83
87
|
* @example 2
|
84
88
|
*/
|
85
89
|
lineWidth?: number;
|
86
90
|
/**
|
87
|
-
* 线样式
|
88
91
|
* @description 线样式
|
89
92
|
* @example 'solid'
|
90
93
|
*/
|
91
94
|
lineStyle?: 'solid' | 'dashed' | 'dotted';
|
92
95
|
/**
|
93
|
-
* 背景可见
|
94
96
|
* @description 背景可见
|
95
97
|
* @example true
|
96
98
|
*/
|
97
99
|
backgroundVisible?: boolean;
|
98
100
|
/**
|
99
|
-
* 背景颜色
|
100
101
|
* @description 背景颜色
|
101
102
|
* @example 'red'
|
102
103
|
*/
|
103
104
|
backgroundColor?: string;
|
104
105
|
/**
|
105
|
-
* 背景边框颜色
|
106
106
|
* @description 背景边框颜色
|
107
107
|
* @example 'red'
|
108
108
|
*/
|
@@ -114,13 +114,11 @@ export type AnnotationHorizontalLine = {
|
|
114
114
|
*/
|
115
115
|
backgroundBorderWidth?: number;
|
116
116
|
/**
|
117
|
-
* 背景边框圆角
|
118
117
|
* @description 背景边框圆角
|
119
118
|
* @example 4
|
120
119
|
*/
|
121
120
|
backgroundBorderRadius?: number;
|
122
121
|
/**
|
123
|
-
* 背景内边距
|
124
122
|
* @description 背景内边距
|
125
123
|
* @example 4
|
126
124
|
*/
|
@@ -1,126 +1,121 @@
|
|
1
1
|
import { type Selector, type Selectors } from '../../dataSelector';
|
2
2
|
import { z } from 'zod';
|
3
|
+
/**
|
4
|
+
* @description 垂直标注线, 根据用户设置的selector 或 xValue, 从下向上绘制一条末尾有箭头的线, 标签默认在标注线终点的正左侧
|
5
|
+
*/
|
3
6
|
export type AnnotationVerticalLine = {
|
4
7
|
/**
|
5
|
-
* 依赖选择的数据, 进行数据标记.
|
8
|
+
* @description 依赖选择的数据, 进行数据标记.
|
6
9
|
*/
|
7
10
|
selector?: Selector | Selectors;
|
8
11
|
/**
|
9
|
-
* 固定的x值,
|
10
|
-
* @description 类目轴在x方向, 则可输入维值, 数值轴在x方向, 则可输入具体的数值
|
12
|
+
* @description 固定的x值, 用于标注垂直线, 类目轴在x方向, 则可输入维值, 数值轴在x方向, 则可输入具体的数值
|
11
13
|
*/
|
12
14
|
xValue?: (number | string) | (number | string)[];
|
13
15
|
/**
|
14
|
-
* 标注的文本
|
15
16
|
* @description 标注的文本
|
16
17
|
* @default ''
|
17
18
|
* @example '标注文本'
|
18
19
|
*/
|
19
20
|
text?: string | string[];
|
20
21
|
/**
|
21
|
-
*
|
22
|
-
* @description 标注线的标签位置(标签相对线的相对位置)。
|
22
|
+
* @description 文本位置, 标注线的标签位置(标签相对线的相对位置)。
|
23
23
|
* @example 'outsideEnd'
|
24
24
|
*/
|
25
25
|
textPosition?: 'outsideStart' | 'outsideEnd' | 'outsideMiddle' | 'insideStart' | 'insideMiddle' | 'insideEnd';
|
26
26
|
/**
|
27
|
-
* 文本颜色
|
28
27
|
* @description 文本颜色
|
29
28
|
* @example 'red'
|
30
29
|
*/
|
31
30
|
textColor?: string;
|
32
31
|
/**
|
33
|
-
* 文本字体大小
|
34
32
|
* @description 文本字体大小
|
35
33
|
* @example 12
|
36
34
|
*/
|
37
35
|
textFontSize?: number;
|
38
36
|
/**
|
39
|
-
* 文本字体重量
|
40
37
|
* @description 文本字体重量
|
41
38
|
* @example 400
|
42
39
|
*/
|
43
40
|
textFontWeight?: number;
|
44
41
|
/**
|
45
|
-
*
|
46
|
-
*
|
47
|
-
*
|
42
|
+
* @description 文本对齐方式, 一般情况下, 无需设置
|
43
|
+
* 建议设置为'right', 这样可以确保文本在标注线的左侧
|
44
|
+
* right: 文本在参考线的左侧, 文本的右侧边缘对齐(垂直)标注线
|
45
|
+
* left: 文本在参考线的右侧, 文本的左侧边缘对齐(垂直)标注线
|
46
|
+
* center: 文本在参考线的中心, 文本的中心对齐(垂直)标注线
|
47
|
+
* @example 'right'
|
48
48
|
*/
|
49
49
|
textAlign?: 'left' | 'right' | 'center';
|
50
50
|
/**
|
51
|
-
*
|
52
|
-
*
|
53
|
-
*
|
51
|
+
* @description 文本垂直对齐方式, 一般情况下, 无需设置
|
52
|
+
* 建议设置为'top', 这样可以确保文本完整的显示在图表的可见区域
|
53
|
+
* top: 文本在参考线的底部, 文本的顶部边缘对齐(垂直)标注线的终点
|
54
|
+
* middle: 文本在参考线的中心, 文本的中心对齐(垂直)标注线的终点
|
55
|
+
* bottom: 文本在参考线的顶部, 文本的底部边缘对齐(垂直)标注线的终点
|
56
|
+
* @example 'top'
|
54
57
|
*/
|
55
58
|
textBaseline?: 'top' | 'middle' | 'bottom';
|
56
59
|
/**
|
57
|
-
*
|
58
|
-
*
|
59
|
-
*
|
60
|
+
* @description (垂直)标注线整体在Y方向的偏移像素距离, 一般情况下, 无需设置
|
61
|
+
* 负值则整体向上偏移, 例如设置为-10, 则整个标注线组件包括文本、箭头、线段, 一起向上偏移10像素
|
62
|
+
* 正值则整体向下偏移, 例如设置为10, 则整个标注线组件包括文本、箭头、线段, 一起向下偏移10像素
|
63
|
+
* @example offsetY: 0
|
60
64
|
*/
|
61
65
|
offsetY?: number;
|
62
66
|
/**
|
63
|
-
*
|
64
|
-
*
|
65
|
-
*
|
67
|
+
* @description (垂直)标注线整体在X方向的偏移像素距离, 一般情况下, 无需设置
|
68
|
+
* 负值则整体向左偏移, 例如设置为-10, 则整个标注线组件包括文本、箭头、线段, 一起向左偏移10像素
|
69
|
+
* 正值则整体向右偏移, 例如设置为10, 则整个标注线组件包括文本、箭头、线段, 一起向右偏移10像素
|
70
|
+
* @example offsetX: 0
|
66
71
|
*/
|
67
72
|
offsetX?: number;
|
68
73
|
/**
|
69
|
-
* 线可见
|
70
74
|
* @description 线可见
|
71
75
|
* @example true
|
72
76
|
*/
|
73
77
|
lineVisible?: boolean;
|
74
78
|
/**
|
75
|
-
* 线颜色
|
76
79
|
* @description 线颜色
|
77
80
|
* @example 'red'
|
78
81
|
*/
|
79
82
|
lineColor?: string;
|
80
83
|
/**
|
81
|
-
* 线宽度
|
82
84
|
* @description 线宽度
|
83
85
|
* @example 2
|
84
86
|
*/
|
85
87
|
lineWidth?: number;
|
86
88
|
/**
|
87
|
-
* 线样式
|
88
89
|
* @description 线样式
|
89
90
|
* @example 'solid'
|
90
91
|
*/
|
91
92
|
lineStyle?: 'solid' | 'dashed' | 'dotted';
|
92
93
|
/**
|
93
|
-
* 背景可见
|
94
94
|
* @description 背景可见
|
95
95
|
* @example true
|
96
96
|
*/
|
97
97
|
backgroundVisible?: boolean;
|
98
98
|
/**
|
99
|
-
* 背景颜色
|
100
99
|
* @description 背景颜色
|
101
100
|
* @example 'red'
|
102
101
|
*/
|
103
102
|
backgroundColor?: string;
|
104
103
|
/**
|
105
|
-
* 背景边框颜色
|
106
104
|
* @description 背景边框颜色
|
107
105
|
* @example 'red'
|
108
106
|
*/
|
109
107
|
backgroundBorderColor?: string;
|
110
108
|
/**
|
111
|
-
* 背景边框宽度
|
112
109
|
* @description 背景边框宽度
|
113
110
|
* @example 2
|
114
111
|
*/
|
115
112
|
backgroundBorderWidth?: number;
|
116
113
|
/**
|
117
|
-
* 背景边框圆角
|
118
114
|
* @description 背景边框圆角
|
119
115
|
* @example 4
|
120
116
|
*/
|
121
117
|
backgroundBorderRadius?: number;
|
122
118
|
/**
|
123
|
-
* 背景内边距
|
124
119
|
* @description 背景内边距
|
125
120
|
* @example 4
|
126
121
|
*/
|
package/dist/umd/index.js
CHANGED
@@ -1599,7 +1599,7 @@
|
|
1599
1599
|
};
|
1600
1600
|
const { datasetReshapeInfo, dimensions } = advancedVSeed;
|
1601
1601
|
if (!datasetReshapeInfo || !dimensions) return result;
|
1602
|
-
const xDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
|
1602
|
+
const xDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
|
1603
1603
|
const isZeroDimension = 0 === dimensions.length;
|
1604
1604
|
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
1605
1605
|
const { foldInfo, unfoldInfo } = cur;
|
@@ -2370,7 +2370,7 @@
|
|
2370
2370
|
const baseConfig = advancedVSeed.config[chartType];
|
2371
2371
|
if (!baseConfig || !baseConfig.legend) return result;
|
2372
2372
|
const { legend } = baseConfig;
|
2373
|
-
const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight, maxSize, border, shapeType = 'rectRound' } = legend || {};
|
2373
|
+
const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight, maxSize = 1, border, shapeType = 'rectRound' } = legend || {};
|
2374
2374
|
const orient = [
|
2375
2375
|
'bottom',
|
2376
2376
|
'bottomLeft',
|
@@ -2412,8 +2412,8 @@
|
|
2412
2412
|
result.legends = {
|
2413
2413
|
type: 'discrete',
|
2414
2414
|
visible: enable,
|
2415
|
-
maxCol: maxSize,
|
2416
|
-
maxRow: maxSize,
|
2415
|
+
maxCol: Math.max(1, maxSize),
|
2416
|
+
maxRow: Math.max(1, maxSize),
|
2417
2417
|
autoPage: true,
|
2418
2418
|
orient,
|
2419
2419
|
position: legendPosition,
|
@@ -2427,7 +2427,7 @@
|
|
2427
2427
|
}) : void 0,
|
2428
2428
|
item: {
|
2429
2429
|
focus: true,
|
2430
|
-
maxWidth:
|
2430
|
+
maxWidth: '30%',
|
2431
2431
|
focusIconStyle: {
|
2432
2432
|
size: labelFontSize + 2,
|
2433
2433
|
fill: labelFontColor,
|
@@ -2735,7 +2735,7 @@
|
|
2735
2735
|
annotationPoint
|
2736
2736
|
];
|
2737
2737
|
const markPoint = annotationPointList.flatMap((annotationPoint)=>{
|
2738
|
-
const { selector: selectorPoint, text = '', textColor = '#
|
2738
|
+
const { selector: selectorPoint, text = '', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'middle', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 2, backgroundVisible = true, offsetX = 0, offsetY = 0 } = annotationPoint;
|
2739
2739
|
const dataset = advancedVSeed.dataset.flat();
|
2740
2740
|
const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
|
2741
2741
|
return selectedData.map((datum)=>({
|
@@ -2811,7 +2811,7 @@
|
|
2811
2811
|
insideEnd: 'insideEndTop'
|
2812
2812
|
};
|
2813
2813
|
const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
|
2814
|
-
const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = '#
|
2814
|
+
const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 2, backgroundVisible = true, lineColor = '#212121', lineStyle = 'dashed', lineVisible = true, lineWidth = 1, offsetX = 0, offsetY = 0 } = annotationVerticalLine;
|
2815
2815
|
const dataset = advancedVSeed.dataset.flat();
|
2816
2816
|
const generateOneMarkLine = (x)=>({
|
2817
2817
|
x: x,
|
@@ -2853,6 +2853,7 @@
|
|
2853
2853
|
visible: backgroundVisible,
|
2854
2854
|
padding: backgroundPadding,
|
2855
2855
|
style: {
|
2856
|
+
dy: textFontSize,
|
2856
2857
|
cornerRadius: backgroundBorderRadius ?? 4,
|
2857
2858
|
fill: backgroundColor,
|
2858
2859
|
stroke: backgroundBorderColor,
|
@@ -2862,6 +2863,7 @@
|
|
2862
2863
|
},
|
2863
2864
|
endSymbol: {
|
2864
2865
|
visible: true,
|
2866
|
+
size: 10 + lineWidth,
|
2865
2867
|
style: {
|
2866
2868
|
dy: 4,
|
2867
2869
|
fill: lineColor
|
@@ -2908,7 +2910,7 @@
|
|
2908
2910
|
insideEnd: 'insideEndTop'
|
2909
2911
|
};
|
2910
2912
|
const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
|
2911
|
-
const { selector: selectorPoint, yValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = '
|
2913
|
+
const { selector: selectorPoint, yValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 2, backgroundVisible = true, lineColor = '#212121', lineStyle = 'dashed', lineVisible = true, lineWidth = 1, offsetX = 0, offsetY = 0 } = annotationVerticalLine;
|
2912
2914
|
const dataset = advancedVSeed.dataset.flat();
|
2913
2915
|
const generateOneMarkLine = (y)=>({
|
2914
2916
|
y,
|
@@ -2950,6 +2952,7 @@
|
|
2950
2952
|
visible: backgroundVisible,
|
2951
2953
|
padding: backgroundPadding,
|
2952
2954
|
style: {
|
2955
|
+
dy: textFontSize,
|
2953
2956
|
cornerRadius: backgroundBorderRadius ?? 4,
|
2954
2957
|
fill: backgroundColor,
|
2955
2958
|
stroke: backgroundBorderColor,
|
@@ -2959,6 +2962,7 @@
|
|
2959
2962
|
},
|
2960
2963
|
endSymbol: {
|
2961
2964
|
visible: true,
|
2965
|
+
size: 10 + lineWidth,
|
2962
2966
|
style: {
|
2963
2967
|
dx: -4,
|
2964
2968
|
fill: lineColor
|
@@ -3382,7 +3386,7 @@
|
|
3382
3386
|
}), {});
|
3383
3387
|
const { legend, color } = baseConfig;
|
3384
3388
|
const { colorScheme } = color;
|
3385
|
-
const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight = 400, maxSize, border, shapeType = 'rectRound' } = legend || {};
|
3389
|
+
const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight = 400, maxSize = 1, border, shapeType = 'rectRound' } = legend || {};
|
3386
3390
|
const orient = [
|
3387
3391
|
'bottom',
|
3388
3392
|
'bottomLeft',
|
@@ -3426,8 +3430,8 @@
|
|
3426
3430
|
type: 'discrete',
|
3427
3431
|
orient,
|
3428
3432
|
position: legendPosition,
|
3429
|
-
maxCol: maxSize,
|
3430
|
-
maxRow: maxSize,
|
3433
|
+
maxCol: Math.max(1, maxSize),
|
3434
|
+
maxRow: Math.max(1, maxSize),
|
3431
3435
|
data: colorItems.map((d, index)=>({
|
3432
3436
|
label: d,
|
3433
3437
|
shape: {
|
@@ -3441,7 +3445,7 @@
|
|
3441
3445
|
})),
|
3442
3446
|
item: {
|
3443
3447
|
focus: true,
|
3444
|
-
maxWidth:
|
3448
|
+
maxWidth: '30%',
|
3445
3449
|
focusIconStyle: {
|
3446
3450
|
size: labelFontSize + 2,
|
3447
3451
|
fill: labelFontColor,
|
@@ -4191,7 +4195,7 @@
|
|
4191
4195
|
};
|
4192
4196
|
const { datasetReshapeInfo, dimensions } = advancedVSeed;
|
4193
4197
|
if (!datasetReshapeInfo || !dimensions) return result;
|
4194
|
-
const yDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
|
4198
|
+
const yDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
|
4195
4199
|
const isZeroDimension = 0 === dimensions.length;
|
4196
4200
|
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
4197
4201
|
const { foldInfo, unfoldInfo } = cur;
|
@@ -5111,8 +5115,8 @@
|
|
5111
5115
|
const result = {
|
5112
5116
|
...advancedVSeed
|
5113
5117
|
};
|
5114
|
-
const { datasetReshapeInfo,
|
5115
|
-
if (!datasetReshapeInfo || !
|
5118
|
+
const { datasetReshapeInfo, measures } = advancedVSeed;
|
5119
|
+
if (!datasetReshapeInfo || !measures) return result;
|
5116
5120
|
const encoding = datasetReshapeInfo.reduce((prev, cur, index)=>{
|
5117
5121
|
const measure = measures[index];
|
5118
5122
|
if ('children' in measure) {
|
@@ -5847,8 +5851,8 @@
|
|
5847
5851
|
const result = {
|
5848
5852
|
...advancedVSeed
|
5849
5853
|
};
|
5850
|
-
const { datasetReshapeInfo
|
5851
|
-
if (!datasetReshapeInfo
|
5854
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
5855
|
+
if (!datasetReshapeInfo) return result;
|
5852
5856
|
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
5853
5857
|
const { foldInfo, unfoldInfo } = cur;
|
5854
5858
|
const radius = [
|
@@ -6067,7 +6071,7 @@
|
|
6067
6071
|
};
|
6068
6072
|
const { datasetReshapeInfo, dimensions, measures } = advancedVSeed;
|
6069
6073
|
if (!datasetReshapeInfo || !dimensions || !measures) return result;
|
6070
|
-
const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
|
6074
|
+
const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
|
6071
6075
|
const is1D1M = 1 === dimensions.length && 1 === measures.length;
|
6072
6076
|
const isZeroDimension = 0 === dimensions.length;
|
6073
6077
|
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
@@ -6381,7 +6385,7 @@
|
|
6381
6385
|
};
|
6382
6386
|
const { datasetReshapeInfo, dimensions, measures } = advancedVSeed;
|
6383
6387
|
if (!datasetReshapeInfo || !dimensions || !measures) return result;
|
6384
|
-
const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
|
6388
|
+
const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
|
6385
6389
|
const isZeroDimension = 0 === dimensions.length;
|
6386
6390
|
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
6387
6391
|
const { foldInfo, unfoldInfo } = cur;
|
@@ -6554,8 +6558,8 @@
|
|
6554
6558
|
const result = {
|
6555
6559
|
...advancedVSeed
|
6556
6560
|
};
|
6557
|
-
const { datasetReshapeInfo
|
6558
|
-
if (!datasetReshapeInfo
|
6561
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
6562
|
+
if (!datasetReshapeInfo) return result;
|
6559
6563
|
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
6560
6564
|
const { foldInfo, unfoldInfo } = cur;
|
6561
6565
|
const size = [
|
@@ -6767,7 +6771,7 @@
|
|
6767
6771
|
};
|
6768
6772
|
const { datasetReshapeInfo, dimensions } = advancedVSeed;
|
6769
6773
|
if (!datasetReshapeInfo || !dimensions) return result;
|
6770
|
-
const xDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
|
6774
|
+
const xDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location) || dimensions[0];
|
6771
6775
|
const isZeroDimension = 0 === dimensions.length;
|
6772
6776
|
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
6773
6777
|
const { foldInfo, unfoldInfo } = cur;
|