@easyv/config 1.1.6 → 1.1.9
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 -2
- package/lib/axes.js +2 -2
- package/lib/baseLine.js +235 -0
- package/lib/index.js +16 -0
- 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 +2 -2
- package/lib/series.js +3 -2
- package/lib/textOverflow.js +48 -0
- package/lib/unit.js +2 -2
- package/package.json +30 -30
- package/src/animation.js +256 -256
- package/src/axes.js +162 -162
- package/src/axisLine.js +39 -39
- package/src/baseLine.js +216 -0
- 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 -96
- 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 +8 -8
- package/src/series.js +824 -822
- package/src/shadow.js +17 -17
- package/src/show.js +11 -11
- package/src/textOverflow.js +34 -0
- 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/mapping.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
const defaultMapping = { fieldName: '', displayName: '' };
|
|
2
|
-
export default ({ fieldName = '', displayName = '' } = defaultMapping) => ({
|
|
3
|
-
name: 'mapping',
|
|
4
|
-
displayName: '映射',
|
|
5
|
-
value: [
|
|
6
|
-
{
|
|
7
|
-
name: 'fieldName',
|
|
8
|
-
displayName: '字段名',
|
|
9
|
-
value: fieldName,
|
|
10
|
-
type: 'input',
|
|
11
|
-
config: {
|
|
12
|
-
span: 12,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'displayName',
|
|
17
|
-
displayName: '显示名',
|
|
18
|
-
value: displayName,
|
|
19
|
-
type: 'input',
|
|
20
|
-
config: {
|
|
21
|
-
span: 12,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
type: 'group',
|
|
26
|
-
});
|
|
1
|
+
const defaultMapping = { fieldName: '', displayName: '' };
|
|
2
|
+
export default ({ fieldName = '', displayName = '' } = defaultMapping) => ({
|
|
3
|
+
name: 'mapping',
|
|
4
|
+
displayName: '映射',
|
|
5
|
+
value: [
|
|
6
|
+
{
|
|
7
|
+
name: 'fieldName',
|
|
8
|
+
displayName: '字段名',
|
|
9
|
+
value: fieldName,
|
|
10
|
+
type: 'input',
|
|
11
|
+
config: {
|
|
12
|
+
span: 12,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'displayName',
|
|
17
|
+
displayName: '显示名',
|
|
18
|
+
value: displayName,
|
|
19
|
+
type: 'input',
|
|
20
|
+
config: {
|
|
21
|
+
span: 12,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
type: 'group',
|
|
26
|
+
});
|
package/src/margin.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
const defaultMargin = {
|
|
2
|
-
marginTop: 0,
|
|
3
|
-
marginRight: 0,
|
|
4
|
-
marginBottom: 0,
|
|
5
|
-
marginLeft: 0,
|
|
6
|
-
};
|
|
7
|
-
export default ({
|
|
8
|
-
marginTop = defaultMargin.marginTop,
|
|
9
|
-
marginRight = defaultMargin.marginRight,
|
|
10
|
-
marginBottom = defaultMargin.marginBottom,
|
|
11
|
-
marginLeft = defaultMargin.marginLeft,
|
|
12
|
-
} = defaultMargin) => ({
|
|
13
|
-
type: 'group',
|
|
14
|
-
name: 'margin',
|
|
15
|
-
displayName: '边距',
|
|
16
|
-
value: [
|
|
17
|
-
{
|
|
18
|
-
type: 'number',
|
|
19
|
-
name: 'marginTop',
|
|
20
|
-
displayName: '上',
|
|
21
|
-
value: marginTop,
|
|
22
|
-
config: {
|
|
23
|
-
span: 6,
|
|
24
|
-
showStep: false,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
type: 'number',
|
|
29
|
-
name: 'marginBottom',
|
|
30
|
-
displayName: '下',
|
|
31
|
-
value: marginBottom,
|
|
32
|
-
config: {
|
|
33
|
-
span: 6,
|
|
34
|
-
showStep: false,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: 'number',
|
|
39
|
-
name: 'marginLeft',
|
|
40
|
-
displayName: '左',
|
|
41
|
-
value: marginLeft,
|
|
42
|
-
config: {
|
|
43
|
-
span: 6,
|
|
44
|
-
showStep: false,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
type: 'number',
|
|
49
|
-
name: 'marginRight',
|
|
50
|
-
displayName: '右',
|
|
51
|
-
value: marginRight,
|
|
52
|
-
config: {
|
|
53
|
-
span: 6,
|
|
54
|
-
showStep: false,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
});
|
|
1
|
+
const defaultMargin = {
|
|
2
|
+
marginTop: 0,
|
|
3
|
+
marginRight: 0,
|
|
4
|
+
marginBottom: 0,
|
|
5
|
+
marginLeft: 0,
|
|
6
|
+
};
|
|
7
|
+
export default ({
|
|
8
|
+
marginTop = defaultMargin.marginTop,
|
|
9
|
+
marginRight = defaultMargin.marginRight,
|
|
10
|
+
marginBottom = defaultMargin.marginBottom,
|
|
11
|
+
marginLeft = defaultMargin.marginLeft,
|
|
12
|
+
} = defaultMargin) => ({
|
|
13
|
+
type: 'group',
|
|
14
|
+
name: 'margin',
|
|
15
|
+
displayName: '边距',
|
|
16
|
+
value: [
|
|
17
|
+
{
|
|
18
|
+
type: 'number',
|
|
19
|
+
name: 'marginTop',
|
|
20
|
+
displayName: '上',
|
|
21
|
+
value: marginTop,
|
|
22
|
+
config: {
|
|
23
|
+
span: 6,
|
|
24
|
+
showStep: false,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'number',
|
|
29
|
+
name: 'marginBottom',
|
|
30
|
+
displayName: '下',
|
|
31
|
+
value: marginBottom,
|
|
32
|
+
config: {
|
|
33
|
+
span: 6,
|
|
34
|
+
showStep: false,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'number',
|
|
39
|
+
name: 'marginLeft',
|
|
40
|
+
displayName: '左',
|
|
41
|
+
value: marginLeft,
|
|
42
|
+
config: {
|
|
43
|
+
span: 6,
|
|
44
|
+
showStep: false,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: 'number',
|
|
49
|
+
name: 'marginRight',
|
|
50
|
+
displayName: '右',
|
|
51
|
+
value: marginRight,
|
|
52
|
+
config: {
|
|
53
|
+
span: 6,
|
|
54
|
+
showStep: false,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
});
|
package/src/multiColor.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
const defaultMultiColor = {
|
|
2
|
-
type: 'linear',
|
|
3
|
-
pure: '#fff',
|
|
4
|
-
linear: {
|
|
5
|
-
stops: [
|
|
6
|
-
{ offset: 0, color: '#fff' },
|
|
7
|
-
{ offset: 50, color: '#ff0' },
|
|
8
|
-
{ offset: 100, color: '#f0f' }
|
|
9
|
-
],
|
|
10
|
-
angle: 30,
|
|
11
|
-
opacity: 1
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
export default ({
|
|
15
|
-
type = defaultMultiColor.type,
|
|
16
|
-
pure = defaultMultiColor.pure,
|
|
17
|
-
linear:{
|
|
18
|
-
stops = defaultMultiColor.linear.stops,
|
|
19
|
-
angle = defaultMultiColor.linear.angle,
|
|
20
|
-
opacity = defaultMultiColor.linear.opacity,
|
|
21
|
-
} = defaultMultiColor.linear
|
|
22
|
-
} = defaultMultiColor) => ({
|
|
23
|
-
type,
|
|
24
|
-
pure,
|
|
25
|
-
linear:{
|
|
26
|
-
stops,
|
|
27
|
-
angle,
|
|
28
|
-
opacity
|
|
29
|
-
}
|
|
30
|
-
});
|
|
1
|
+
const defaultMultiColor = {
|
|
2
|
+
type: 'linear',
|
|
3
|
+
pure: '#fff',
|
|
4
|
+
linear: {
|
|
5
|
+
stops: [
|
|
6
|
+
{ offset: 0, color: '#fff' },
|
|
7
|
+
{ offset: 50, color: '#ff0' },
|
|
8
|
+
{ offset: 100, color: '#f0f' }
|
|
9
|
+
],
|
|
10
|
+
angle: 30,
|
|
11
|
+
opacity: 1
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export default ({
|
|
15
|
+
type = defaultMultiColor.type,
|
|
16
|
+
pure = defaultMultiColor.pure,
|
|
17
|
+
linear:{
|
|
18
|
+
stops = defaultMultiColor.linear.stops,
|
|
19
|
+
angle = defaultMultiColor.linear.angle,
|
|
20
|
+
opacity = defaultMultiColor.linear.opacity,
|
|
21
|
+
} = defaultMultiColor.linear
|
|
22
|
+
} = defaultMultiColor) => ({
|
|
23
|
+
type,
|
|
24
|
+
pure,
|
|
25
|
+
linear:{
|
|
26
|
+
stops,
|
|
27
|
+
angle,
|
|
28
|
+
opacity
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
31
|
|