@easyv/config 1.1.7 → 1.1.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.
- package/.babelrc +9 -9
- package/CHANGELOG.md +17 -17
- package/index.js +3 -3
- package/lib/animation.js +2 -3
- package/lib/axes.js +2 -2
- package/lib/baseLine.js +80 -43
- package/lib/interaction.js +2 -2
- package/lib/label.js +2 -2
- package/lib/legend.js +2 -2
- package/lib/mutiColor.js +51 -51
- package/lib/pie.js +2 -2
- package/lib/sc.js +8 -3
- package/lib/unit.js +2 -2
- package/package.json +30 -30
- package/src/animation.js +256 -257
- package/src/axes.js +162 -162
- package/src/axisLine.js +39 -39
- package/src/baseLine.js +216 -177
- package/src/brush.js +90 -90
- package/src/dimension.js +49 -49
- package/src/extent.js +29 -29
- package/src/font.js +23 -23
- package/src/gridLine.js +49 -49
- package/src/index.js +99 -99
- package/src/interaction.js +121 -121
- package/src/label.js +722 -722
- package/src/legend.js +982 -982
- package/src/mapping.js +26 -26
- package/src/margin.js +58 -58
- package/src/multiColor.js +30 -30
- package/src/pie.js +1035 -1035
- package/src/sc.js +11 -8
- package/src/series.js +824 -824
- package/src/shadow.js +17 -17
- package/src/show.js +11 -11
- package/src/textOverflow.js +34 -34
- package/src/tickLine.js +51 -51
- package/src/tooltip.js +425 -425
- package/src/translate.js +27 -27
- package/src/unit.js +67 -67
package/src/baseLine.js
CHANGED
|
@@ -1,177 +1,216 @@
|
|
|
1
|
-
//@ts-check
|
|
2
|
-
import { font, translate } from '.';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
value:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
{
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
1
|
+
//@ts-check
|
|
2
|
+
import { font, translate } from '.';
|
|
3
|
+
const defaultBaseLine = {
|
|
4
|
+
line: {
|
|
5
|
+
yOrZ: 'y',
|
|
6
|
+
margin: {
|
|
7
|
+
marginLeft: 0,
|
|
8
|
+
marginRight: 100
|
|
9
|
+
},
|
|
10
|
+
lineType: 'dash',
|
|
11
|
+
color: '#FF781E',
|
|
12
|
+
lineWidth: 1,
|
|
13
|
+
strokeDasharray: '3,4'
|
|
14
|
+
},
|
|
15
|
+
dataStyle: {
|
|
16
|
+
label: {
|
|
17
|
+
show: true,
|
|
18
|
+
text: '平均值',
|
|
19
|
+
font: font({
|
|
20
|
+
color: 'rgba(255, 120, 30, 0.7)',
|
|
21
|
+
fontFamily: 'Mircosoft Yahei',
|
|
22
|
+
fontSize: 12,
|
|
23
|
+
bold: false,
|
|
24
|
+
italic: false,
|
|
25
|
+
letterSpacing: 0,
|
|
26
|
+
}),
|
|
27
|
+
translate: { x: 4, y: 1 },
|
|
28
|
+
},
|
|
29
|
+
data: {
|
|
30
|
+
show: false,
|
|
31
|
+
font: font(),
|
|
32
|
+
translate: { x: 0, y: 0 },
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export default ({
|
|
37
|
+
line: {
|
|
38
|
+
yOrZ = defaultBaseLine.line.yOrZ,
|
|
39
|
+
margin: {
|
|
40
|
+
marginLeft = defaultBaseLine.line.margin.marginLeft,
|
|
41
|
+
marginRight = defaultBaseLine.line.margin.marginRight,
|
|
42
|
+
} = defaultBaseLine.line.margin,
|
|
43
|
+
lineType = defaultBaseLine.line.lineType,
|
|
44
|
+
color = defaultBaseLine.line.color,
|
|
45
|
+
lineWidth = defaultBaseLine.line.lineWidth,
|
|
46
|
+
strokeDasharray = defaultBaseLine.line.strokeDasharray
|
|
47
|
+
} = defaultBaseLine.line,
|
|
48
|
+
dataStyle: {
|
|
49
|
+
label: {
|
|
50
|
+
showLabel = defaultBaseLine.dataStyle.label.show,
|
|
51
|
+
text = defaultBaseLine.dataStyle.label.text,
|
|
52
|
+
textStyle = defaultBaseLine.dataStyle.label.font,
|
|
53
|
+
translate: { x, y } = defaultBaseLine.dataStyle.label.translate,
|
|
54
|
+
},
|
|
55
|
+
data: {
|
|
56
|
+
showData = defaultBaseLine.dataStyle.data.show,
|
|
57
|
+
dataStyle = defaultBaseLine.dataStyle.data.dataStyle,
|
|
58
|
+
dataTranslate: {
|
|
59
|
+
x: dataTranslateX = defaultBaseLine.dataStyle.data.translate.x,
|
|
60
|
+
y: dataTranslateY = defaultBaseLine.dataStyle.data.translate.y
|
|
61
|
+
} = defaultBaseLine.dataStyle.data.translate
|
|
62
|
+
} = defaultBaseLine.dataStyle.data,
|
|
63
|
+
} = defaultBaseLine.dataStyle
|
|
64
|
+
|
|
65
|
+
} = defaultBaseLine) => [
|
|
66
|
+
{
|
|
67
|
+
name: 'line',
|
|
68
|
+
displayName: '线样式',
|
|
69
|
+
config: {
|
|
70
|
+
layout: 'horizontal'
|
|
71
|
+
},
|
|
72
|
+
value: [
|
|
73
|
+
{
|
|
74
|
+
name: 'yOrZ',
|
|
75
|
+
displayName: '纵轴选择',
|
|
76
|
+
value: yOrZ,
|
|
77
|
+
type: 'select',
|
|
78
|
+
config: {
|
|
79
|
+
options: [
|
|
80
|
+
{ name: 'Y轴', value: 'y' },
|
|
81
|
+
{ name: 'Z轴', value: 'z' },
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'margin',
|
|
87
|
+
displayName: '边距',
|
|
88
|
+
type: 'group',
|
|
89
|
+
value: [
|
|
90
|
+
{
|
|
91
|
+
type: 'number',
|
|
92
|
+
name: 'marginLeft',
|
|
93
|
+
displayName: '左',
|
|
94
|
+
value: marginLeft,
|
|
95
|
+
config: {
|
|
96
|
+
span: 12,
|
|
97
|
+
showStep: false,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: 'number',
|
|
102
|
+
name: 'marginRight',
|
|
103
|
+
displayName: '右',
|
|
104
|
+
value: marginRight,
|
|
105
|
+
config: {
|
|
106
|
+
span: 12,
|
|
107
|
+
showStep: false,
|
|
108
|
+
},
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'lineType',
|
|
114
|
+
displayName: '线样式',
|
|
115
|
+
value: lineType,
|
|
116
|
+
type: 'select',
|
|
117
|
+
config: {
|
|
118
|
+
options: [{
|
|
119
|
+
name: '实线',
|
|
120
|
+
value: 'solid'
|
|
121
|
+
}, {
|
|
122
|
+
name: '虚线',
|
|
123
|
+
value: 'dash'
|
|
124
|
+
}]
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'color',
|
|
129
|
+
displayName: '颜色',
|
|
130
|
+
value: color,
|
|
131
|
+
type: 'color',
|
|
132
|
+
markColorType: 'assistColor',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'lineWidth',
|
|
136
|
+
displayName: '粗细',
|
|
137
|
+
value: lineWidth,
|
|
138
|
+
type: 'number',
|
|
139
|
+
config: {
|
|
140
|
+
data: 'px',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
rule: [['lineType', '$eq', 'dash']],
|
|
145
|
+
name: 'strokeDasharray',
|
|
146
|
+
displayName: '虚线样式',
|
|
147
|
+
value: strokeDasharray,
|
|
148
|
+
type: 'input',
|
|
149
|
+
tip: '格式使用半角字符,如3,3',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'dataStyle',
|
|
155
|
+
displayName: '数据样式',
|
|
156
|
+
value: [
|
|
157
|
+
{
|
|
158
|
+
name: 'label',
|
|
159
|
+
displayName: '标签',
|
|
160
|
+
config: {
|
|
161
|
+
defaultOpen: true
|
|
162
|
+
},
|
|
163
|
+
value: [
|
|
164
|
+
{
|
|
165
|
+
name: 'show',
|
|
166
|
+
displayName: '显示',
|
|
167
|
+
value: showLabel,
|
|
168
|
+
type: 'boolean',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
rule: [['show', '$eq', true]],
|
|
172
|
+
name: "label",
|
|
173
|
+
displayName: "标签内容",
|
|
174
|
+
type: 'input',
|
|
175
|
+
value: text,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
rule: [['show', '$eq', true]],
|
|
179
|
+
name: 'textStyle',
|
|
180
|
+
displayName: '文本样式',
|
|
181
|
+
value: font(textStyle),
|
|
182
|
+
type: 'textStyle',
|
|
183
|
+
markColorType: 'textColor',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
rule: [['show', '$eq', true]],
|
|
187
|
+
...translate(x, y)
|
|
188
|
+
}]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: 'data',
|
|
192
|
+
displayName: '数值',
|
|
193
|
+
value: [
|
|
194
|
+
{
|
|
195
|
+
name: 'show',
|
|
196
|
+
displayName: '显示',
|
|
197
|
+
value: showData,
|
|
198
|
+
type: 'boolean',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
rule: [['show', '$eq', true]],
|
|
202
|
+
name: 'dataStyle',
|
|
203
|
+
displayName: '文本样式',
|
|
204
|
+
value: font(dataStyle),
|
|
205
|
+
type: 'textStyle',
|
|
206
|
+
markColorType: 'textColor',
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
rule: [['show', '$eq', true]],
|
|
210
|
+
...translate(dataTranslateX, dataTranslateY)
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
];
|
package/src/brush.js
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
const defaultBrush = {
|
|
2
|
-
height: 20,
|
|
3
|
-
background: 'rgba(20, 95, 255, 0.1)',
|
|
4
|
-
margin: {
|
|
5
|
-
marginLeft: 40,
|
|
6
|
-
marginRight: 40,
|
|
7
|
-
},
|
|
8
|
-
detail: {
|
|
9
|
-
width: 30,
|
|
10
|
-
color: 'rgba(255, 255, 255, 0.3)',
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default ({
|
|
15
|
-
height = defaultBrush.height,
|
|
16
|
-
background = defaultBrush.background,
|
|
17
|
-
margin: {
|
|
18
|
-
marginLeft = defaultBrush.margin.marginLeft,
|
|
19
|
-
marginRight = defaultBrush.margin.marginRight,
|
|
20
|
-
} = defaultBrush.margin,
|
|
21
|
-
detail: {
|
|
22
|
-
width = defaultBrush.detail.width,
|
|
23
|
-
color = defaultBrush.detail.color,
|
|
24
|
-
} = defaultBrush.detail,
|
|
25
|
-
} = defaultBrush) => ({
|
|
26
|
-
name: 'brush',
|
|
27
|
-
displayName: '控制条',
|
|
28
|
-
value: [
|
|
29
|
-
{
|
|
30
|
-
name: 'height',
|
|
31
|
-
displayName: '高度',
|
|
32
|
-
value: height,
|
|
33
|
-
type: 'number',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: 'background',
|
|
37
|
-
displayName: '背景',
|
|
38
|
-
value: background,
|
|
39
|
-
type: 'color',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: 'margin',
|
|
43
|
-
displayName: '间距',
|
|
44
|
-
value: [
|
|
45
|
-
{
|
|
46
|
-
name: 'marginLeft',
|
|
47
|
-
displayName: '左',
|
|
48
|
-
value: marginLeft,
|
|
49
|
-
type: 'number',
|
|
50
|
-
config: {
|
|
51
|
-
span: 12,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: 'marginRight',
|
|
56
|
-
displayName: '右',
|
|
57
|
-
value: marginRight,
|
|
58
|
-
type: 'number',
|
|
59
|
-
config: {
|
|
60
|
-
span: 12,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
type: 'group',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: 'detail',
|
|
68
|
-
displayName: '详情区域',
|
|
69
|
-
value: [
|
|
70
|
-
{
|
|
71
|
-
name: 'width',
|
|
72
|
-
displayName: '宽度',
|
|
73
|
-
value: width,
|
|
74
|
-
type: 'number',
|
|
75
|
-
config: {
|
|
76
|
-
suffix: '%',
|
|
77
|
-
min: 0,
|
|
78
|
-
max: 100,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: 'color',
|
|
83
|
-
displayName: '颜色',
|
|
84
|
-
value: color,
|
|
85
|
-
type: 'color',
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
});
|
|
1
|
+
const defaultBrush = {
|
|
2
|
+
height: 20,
|
|
3
|
+
background: 'rgba(20, 95, 255, 0.1)',
|
|
4
|
+
margin: {
|
|
5
|
+
marginLeft: 40,
|
|
6
|
+
marginRight: 40,
|
|
7
|
+
},
|
|
8
|
+
detail: {
|
|
9
|
+
width: 30,
|
|
10
|
+
color: 'rgba(255, 255, 255, 0.3)',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default ({
|
|
15
|
+
height = defaultBrush.height,
|
|
16
|
+
background = defaultBrush.background,
|
|
17
|
+
margin: {
|
|
18
|
+
marginLeft = defaultBrush.margin.marginLeft,
|
|
19
|
+
marginRight = defaultBrush.margin.marginRight,
|
|
20
|
+
} = defaultBrush.margin,
|
|
21
|
+
detail: {
|
|
22
|
+
width = defaultBrush.detail.width,
|
|
23
|
+
color = defaultBrush.detail.color,
|
|
24
|
+
} = defaultBrush.detail,
|
|
25
|
+
} = defaultBrush) => ({
|
|
26
|
+
name: 'brush',
|
|
27
|
+
displayName: '控制条',
|
|
28
|
+
value: [
|
|
29
|
+
{
|
|
30
|
+
name: 'height',
|
|
31
|
+
displayName: '高度',
|
|
32
|
+
value: height,
|
|
33
|
+
type: 'number',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'background',
|
|
37
|
+
displayName: '背景',
|
|
38
|
+
value: background,
|
|
39
|
+
type: 'color',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'margin',
|
|
43
|
+
displayName: '间距',
|
|
44
|
+
value: [
|
|
45
|
+
{
|
|
46
|
+
name: 'marginLeft',
|
|
47
|
+
displayName: '左',
|
|
48
|
+
value: marginLeft,
|
|
49
|
+
type: 'number',
|
|
50
|
+
config: {
|
|
51
|
+
span: 12,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'marginRight',
|
|
56
|
+
displayName: '右',
|
|
57
|
+
value: marginRight,
|
|
58
|
+
type: 'number',
|
|
59
|
+
config: {
|
|
60
|
+
span: 12,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
type: 'group',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'detail',
|
|
68
|
+
displayName: '详情区域',
|
|
69
|
+
value: [
|
|
70
|
+
{
|
|
71
|
+
name: 'width',
|
|
72
|
+
displayName: '宽度',
|
|
73
|
+
value: width,
|
|
74
|
+
type: 'number',
|
|
75
|
+
config: {
|
|
76
|
+
suffix: '%',
|
|
77
|
+
min: 0,
|
|
78
|
+
max: 100,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'color',
|
|
83
|
+
displayName: '颜色',
|
|
84
|
+
value: color,
|
|
85
|
+
type: 'color',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
});
|
package/src/dimension.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
const defaultDimension = {
|
|
2
|
-
width: 450,
|
|
3
|
-
height: 250,
|
|
4
|
-
left: 100,
|
|
5
|
-
top: 100,
|
|
6
|
-
};
|
|
7
|
-
export default ({
|
|
8
|
-
width = defaultDimension.width,
|
|
9
|
-
height = defaultDimension.height,
|
|
10
|
-
left = defaultDimension.left,
|
|
11
|
-
top = defaultDimension.top,
|
|
12
|
-
} = defaultDimension) => ({
|
|
13
|
-
name: 'dimension',
|
|
14
|
-
displayName: '位置尺寸',
|
|
15
|
-
value: [
|
|
16
|
-
{
|
|
17
|
-
name: 'chartPosition',
|
|
18
|
-
displayName: '图表位置',
|
|
19
|
-
value: [
|
|
20
|
-
{
|
|
21
|
-
name: 'left',
|
|
22
|
-
displayName: 'X轴坐标',
|
|
23
|
-
value: left,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'top',
|
|
27
|
-
displayName: 'Y轴坐标',
|
|
28
|
-
value: top,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'chartDimension',
|
|
34
|
-
displayName: '图表尺寸',
|
|
35
|
-
value: [
|
|
36
|
-
{
|
|
37
|
-
name: 'width',
|
|
38
|
-
displayName: '宽度',
|
|
39
|
-
value: width,
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: 'height',
|
|
43
|
-
displayName: '高度',
|
|
44
|
-
value: height,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
});
|
|
1
|
+
const defaultDimension = {
|
|
2
|
+
width: 450,
|
|
3
|
+
height: 250,
|
|
4
|
+
left: 100,
|
|
5
|
+
top: 100,
|
|
6
|
+
};
|
|
7
|
+
export default ({
|
|
8
|
+
width = defaultDimension.width,
|
|
9
|
+
height = defaultDimension.height,
|
|
10
|
+
left = defaultDimension.left,
|
|
11
|
+
top = defaultDimension.top,
|
|
12
|
+
} = defaultDimension) => ({
|
|
13
|
+
name: 'dimension',
|
|
14
|
+
displayName: '位置尺寸',
|
|
15
|
+
value: [
|
|
16
|
+
{
|
|
17
|
+
name: 'chartPosition',
|
|
18
|
+
displayName: '图表位置',
|
|
19
|
+
value: [
|
|
20
|
+
{
|
|
21
|
+
name: 'left',
|
|
22
|
+
displayName: 'X轴坐标',
|
|
23
|
+
value: left,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'top',
|
|
27
|
+
displayName: 'Y轴坐标',
|
|
28
|
+
value: top,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'chartDimension',
|
|
34
|
+
displayName: '图表尺寸',
|
|
35
|
+
value: [
|
|
36
|
+
{
|
|
37
|
+
name: 'width',
|
|
38
|
+
displayName: '宽度',
|
|
39
|
+
value: width,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'height',
|
|
43
|
+
displayName: '高度',
|
|
44
|
+
value: height,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
});
|