@easyv/config 1.2.8 → 1.2.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/lib/interaction.js +2 -2
- package/lib/label.js +1 -1
- package/package.json +30 -30
- package/pnpm-lock.yaml +5974 -0
- package/src/control.js +104 -104
- package/src/extent.js +42 -42
- package/src/index.js +106 -106
- package/src/interaction.js +121 -121
- package/src/label.js +1 -1
- package/src/pieTooltip.js +331 -331
package/src/control.js
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
const defaultControl={
|
|
2
|
-
height:20,
|
|
3
|
-
color:"rgba(20, 95, 255, 0.1)",
|
|
4
|
-
margin:{
|
|
5
|
-
left:40,
|
|
6
|
-
right:40
|
|
7
|
-
},
|
|
8
|
-
gap:20,
|
|
9
|
-
drag:{
|
|
10
|
-
width:30,
|
|
11
|
-
color:"RGBA(255, 255, 255, .3)"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const control = ({
|
|
16
|
-
height = defaultControl.height,
|
|
17
|
-
color = defaultControl.color,
|
|
18
|
-
margin:{
|
|
19
|
-
left = defaultControl.margin.left,
|
|
20
|
-
right = defaultControl.margin.right
|
|
21
|
-
} = defaultControl.margin,
|
|
22
|
-
gap = defaultControl.gap,
|
|
23
|
-
drag:{
|
|
24
|
-
width = defaultControl.drag.width,
|
|
25
|
-
color:dragColor = defaultControl.drag.color
|
|
26
|
-
} = defaultControl.drag
|
|
27
|
-
} = defaultControl) => {
|
|
28
|
-
return {
|
|
29
|
-
name: "control",
|
|
30
|
-
displayName: "控制条",
|
|
31
|
-
value: [
|
|
32
|
-
{
|
|
33
|
-
name: "height",
|
|
34
|
-
displayName: "高度",
|
|
35
|
-
value: height,
|
|
36
|
-
type: "number",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: "color",
|
|
40
|
-
displayName: "背景颜色",
|
|
41
|
-
value: color,
|
|
42
|
-
type: "color",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
type: "group",
|
|
46
|
-
name: "margin",
|
|
47
|
-
displayName: "边距",
|
|
48
|
-
value: [
|
|
49
|
-
{
|
|
50
|
-
name: "left",
|
|
51
|
-
displayName: "左边距",
|
|
52
|
-
value: left,
|
|
53
|
-
type: "number",
|
|
54
|
-
config: {
|
|
55
|
-
span: 12,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: "right",
|
|
60
|
-
displayName: "右边距",
|
|
61
|
-
value: right,
|
|
62
|
-
type: "number",
|
|
63
|
-
config: {
|
|
64
|
-
span: 12,
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name:"gap",
|
|
71
|
-
displayName:"上间距",
|
|
72
|
-
type:"number",
|
|
73
|
-
value:gap,
|
|
74
|
-
config:{
|
|
75
|
-
suffix:"px"
|
|
76
|
-
},
|
|
77
|
-
tip:"与X轴的距离"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "drag",
|
|
81
|
-
displayName: "详情区域",
|
|
82
|
-
value: [
|
|
83
|
-
{
|
|
84
|
-
name: "width",
|
|
85
|
-
displayName: "宽度",
|
|
86
|
-
value: width,
|
|
87
|
-
type: "range",
|
|
88
|
-
config: {
|
|
89
|
-
suffix: "%",
|
|
90
|
-
min: 1,
|
|
91
|
-
max:100
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: "color",
|
|
96
|
-
displayName: "颜色",
|
|
97
|
-
value: dragColor,
|
|
98
|
-
type: "color",
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
};
|
|
104
|
-
};
|
|
1
|
+
const defaultControl={
|
|
2
|
+
height:20,
|
|
3
|
+
color:"rgba(20, 95, 255, 0.1)",
|
|
4
|
+
margin:{
|
|
5
|
+
left:40,
|
|
6
|
+
right:40
|
|
7
|
+
},
|
|
8
|
+
gap:20,
|
|
9
|
+
drag:{
|
|
10
|
+
width:30,
|
|
11
|
+
color:"RGBA(255, 255, 255, .3)"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const control = ({
|
|
16
|
+
height = defaultControl.height,
|
|
17
|
+
color = defaultControl.color,
|
|
18
|
+
margin:{
|
|
19
|
+
left = defaultControl.margin.left,
|
|
20
|
+
right = defaultControl.margin.right
|
|
21
|
+
} = defaultControl.margin,
|
|
22
|
+
gap = defaultControl.gap,
|
|
23
|
+
drag:{
|
|
24
|
+
width = defaultControl.drag.width,
|
|
25
|
+
color:dragColor = defaultControl.drag.color
|
|
26
|
+
} = defaultControl.drag
|
|
27
|
+
} = defaultControl) => {
|
|
28
|
+
return {
|
|
29
|
+
name: "control",
|
|
30
|
+
displayName: "控制条",
|
|
31
|
+
value: [
|
|
32
|
+
{
|
|
33
|
+
name: "height",
|
|
34
|
+
displayName: "高度",
|
|
35
|
+
value: height,
|
|
36
|
+
type: "number",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "color",
|
|
40
|
+
displayName: "背景颜色",
|
|
41
|
+
value: color,
|
|
42
|
+
type: "color",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: "group",
|
|
46
|
+
name: "margin",
|
|
47
|
+
displayName: "边距",
|
|
48
|
+
value: [
|
|
49
|
+
{
|
|
50
|
+
name: "left",
|
|
51
|
+
displayName: "左边距",
|
|
52
|
+
value: left,
|
|
53
|
+
type: "number",
|
|
54
|
+
config: {
|
|
55
|
+
span: 12,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "right",
|
|
60
|
+
displayName: "右边距",
|
|
61
|
+
value: right,
|
|
62
|
+
type: "number",
|
|
63
|
+
config: {
|
|
64
|
+
span: 12,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name:"gap",
|
|
71
|
+
displayName:"上间距",
|
|
72
|
+
type:"number",
|
|
73
|
+
value:gap,
|
|
74
|
+
config:{
|
|
75
|
+
suffix:"px"
|
|
76
|
+
},
|
|
77
|
+
tip:"与X轴的距离"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "drag",
|
|
81
|
+
displayName: "详情区域",
|
|
82
|
+
value: [
|
|
83
|
+
{
|
|
84
|
+
name: "width",
|
|
85
|
+
displayName: "宽度",
|
|
86
|
+
value: width,
|
|
87
|
+
type: "range",
|
|
88
|
+
config: {
|
|
89
|
+
suffix: "%",
|
|
90
|
+
min: 1,
|
|
91
|
+
max:100
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "color",
|
|
96
|
+
displayName: "颜色",
|
|
97
|
+
value: dragColor,
|
|
98
|
+
type: "color",
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
};
|
|
104
|
+
};
|
package/src/extent.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
const extent = {
|
|
2
|
-
min: "0",
|
|
3
|
-
max: "",
|
|
4
|
-
customDisplayName: "数值范围",
|
|
5
|
-
customName: "extent",
|
|
6
|
-
customSuffix: "",
|
|
7
|
-
};
|
|
8
|
-
export default ({
|
|
9
|
-
min = extent.min,
|
|
10
|
-
max = extent.max,
|
|
11
|
-
customDisplayName = extent.customDisplayName,
|
|
12
|
-
customName = extent.customName,
|
|
13
|
-
customSuffix = extent.customSuffix,
|
|
14
|
-
} = extent) => {
|
|
15
|
-
return {
|
|
16
|
-
name: customName,
|
|
17
|
-
displayName: customDisplayName,
|
|
18
|
-
value: [
|
|
19
|
-
{
|
|
20
|
-
name: "min",
|
|
21
|
-
displayName: "最小值",
|
|
22
|
-
value: min,
|
|
23
|
-
type: "input",
|
|
24
|
-
config: {
|
|
25
|
-
span: 12,
|
|
26
|
-
suffix: customSuffix,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: "max",
|
|
31
|
-
displayName: "最大值",
|
|
32
|
-
value: max,
|
|
33
|
-
type: "input",
|
|
34
|
-
config: {
|
|
35
|
-
span: 12,
|
|
36
|
-
suffix: customSuffix,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
type: "group",
|
|
41
|
-
};
|
|
42
|
-
};
|
|
1
|
+
const extent = {
|
|
2
|
+
min: "0",
|
|
3
|
+
max: "",
|
|
4
|
+
customDisplayName: "数值范围",
|
|
5
|
+
customName: "extent",
|
|
6
|
+
customSuffix: "",
|
|
7
|
+
};
|
|
8
|
+
export default ({
|
|
9
|
+
min = extent.min,
|
|
10
|
+
max = extent.max,
|
|
11
|
+
customDisplayName = extent.customDisplayName,
|
|
12
|
+
customName = extent.customName,
|
|
13
|
+
customSuffix = extent.customSuffix,
|
|
14
|
+
} = extent) => {
|
|
15
|
+
return {
|
|
16
|
+
name: customName,
|
|
17
|
+
displayName: customDisplayName,
|
|
18
|
+
value: [
|
|
19
|
+
{
|
|
20
|
+
name: "min",
|
|
21
|
+
displayName: "最小值",
|
|
22
|
+
value: min,
|
|
23
|
+
type: "input",
|
|
24
|
+
config: {
|
|
25
|
+
span: 12,
|
|
26
|
+
suffix: customSuffix,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "max",
|
|
31
|
+
displayName: "最大值",
|
|
32
|
+
value: max,
|
|
33
|
+
type: "input",
|
|
34
|
+
config: {
|
|
35
|
+
span: 12,
|
|
36
|
+
suffix: customSuffix,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
type: "group",
|
|
41
|
+
};
|
|
42
|
+
};
|
package/src/index.js
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import show, { showRule } from './show';
|
|
2
|
-
import font from './font';
|
|
3
|
-
import translate, { translate3d } from './translate';
|
|
4
|
-
import gridLine from './gridLine';
|
|
5
|
-
import tickLine from './tickLine';
|
|
6
|
-
import axisLine from './axisLine';
|
|
7
|
-
import extent from './extent';
|
|
8
|
-
import unit from './unit';
|
|
9
|
-
import margin from './margin';
|
|
10
|
-
import multiColor from './multiColor';
|
|
11
|
-
import animation, {
|
|
12
|
-
dataAnimation,
|
|
13
|
-
animationOfPie,
|
|
14
|
-
animationOfCarousel,
|
|
15
|
-
} from './animation';
|
|
16
|
-
import dimension from './dimension';
|
|
17
|
-
import label, {
|
|
18
|
-
labelOfPie,
|
|
19
|
-
labelOfRose,
|
|
20
|
-
axisLabel,
|
|
21
|
-
valueAsixLabel,
|
|
22
|
-
} from './label';
|
|
23
|
-
import legend, { legendOfPie, legendOfRose, legendOfDoublePie } from './legend';
|
|
24
|
-
import tooltip from './tooltip';
|
|
25
|
-
import axes, { valueAxis, categoryAxis } from './axes';
|
|
26
|
-
import mapping from './mapping';
|
|
27
|
-
import { imageGroup } from './imageGroup';
|
|
28
|
-
import {
|
|
29
|
-
bandSeries,
|
|
30
|
-
lineSeries,
|
|
31
|
-
areaSeries,
|
|
32
|
-
pieSeries,
|
|
33
|
-
purePieSeries,
|
|
34
|
-
} from './series';
|
|
35
|
-
import pie, {
|
|
36
|
-
rosePie,
|
|
37
|
-
rosePieDecorate,
|
|
38
|
-
donut,
|
|
39
|
-
carouselDonut,
|
|
40
|
-
nestRosePie,
|
|
41
|
-
carouselDonut2,
|
|
42
|
-
current as pieCurrent,
|
|
43
|
-
} from './pie';
|
|
44
|
-
import brush from './brush';
|
|
45
|
-
import interaction from './interaction';
|
|
46
|
-
import sc from './sc';
|
|
47
|
-
import shadow from './shadow';
|
|
48
|
-
import textOverflow from './textOverflow';
|
|
49
|
-
import baseLine from './baseLine';
|
|
50
|
-
import { control } from './control';
|
|
51
|
-
import pieTooltip from './pieTooltip';
|
|
52
|
-
export {
|
|
53
|
-
pieTooltip,
|
|
54
|
-
control,
|
|
55
|
-
show,
|
|
56
|
-
showRule,
|
|
57
|
-
font,
|
|
58
|
-
tooltip,
|
|
59
|
-
translate,
|
|
60
|
-
translate3d,
|
|
61
|
-
textOverflow,
|
|
62
|
-
extent,
|
|
63
|
-
unit,
|
|
64
|
-
margin,
|
|
65
|
-
multiColor,
|
|
66
|
-
animation,
|
|
67
|
-
dataAnimation,
|
|
68
|
-
animationOfPie,
|
|
69
|
-
animationOfCarousel,
|
|
70
|
-
dimension,
|
|
71
|
-
gridLine,
|
|
72
|
-
tickLine,
|
|
73
|
-
axisLine,
|
|
74
|
-
valueAxis,
|
|
75
|
-
categoryAxis,
|
|
76
|
-
axes,
|
|
77
|
-
imageGroup,
|
|
78
|
-
mapping,
|
|
79
|
-
bandSeries,
|
|
80
|
-
lineSeries,
|
|
81
|
-
areaSeries,
|
|
82
|
-
pieSeries,
|
|
83
|
-
purePieSeries,
|
|
84
|
-
brush,
|
|
85
|
-
interaction,
|
|
86
|
-
legend,
|
|
87
|
-
legendOfPie,
|
|
88
|
-
legendOfRose,
|
|
89
|
-
legendOfDoublePie,
|
|
90
|
-
label,
|
|
91
|
-
labelOfPie,
|
|
92
|
-
labelOfRose,
|
|
93
|
-
axisLabel,
|
|
94
|
-
valueAsixLabel,
|
|
95
|
-
pie,
|
|
96
|
-
rosePie,
|
|
97
|
-
nestRosePie,
|
|
98
|
-
rosePieDecorate,
|
|
99
|
-
donut,
|
|
100
|
-
carouselDonut,
|
|
101
|
-
carouselDonut2,
|
|
102
|
-
pieCurrent,
|
|
103
|
-
sc,
|
|
104
|
-
shadow,
|
|
105
|
-
baseLine
|
|
106
|
-
};
|
|
1
|
+
import show, { showRule } from './show';
|
|
2
|
+
import font from './font';
|
|
3
|
+
import translate, { translate3d } from './translate';
|
|
4
|
+
import gridLine from './gridLine';
|
|
5
|
+
import tickLine from './tickLine';
|
|
6
|
+
import axisLine from './axisLine';
|
|
7
|
+
import extent from './extent';
|
|
8
|
+
import unit from './unit';
|
|
9
|
+
import margin from './margin';
|
|
10
|
+
import multiColor from './multiColor';
|
|
11
|
+
import animation, {
|
|
12
|
+
dataAnimation,
|
|
13
|
+
animationOfPie,
|
|
14
|
+
animationOfCarousel,
|
|
15
|
+
} from './animation';
|
|
16
|
+
import dimension from './dimension';
|
|
17
|
+
import label, {
|
|
18
|
+
labelOfPie,
|
|
19
|
+
labelOfRose,
|
|
20
|
+
axisLabel,
|
|
21
|
+
valueAsixLabel,
|
|
22
|
+
} from './label';
|
|
23
|
+
import legend, { legendOfPie, legendOfRose, legendOfDoublePie } from './legend';
|
|
24
|
+
import tooltip from './tooltip';
|
|
25
|
+
import axes, { valueAxis, categoryAxis } from './axes';
|
|
26
|
+
import mapping from './mapping';
|
|
27
|
+
import { imageGroup } from './imageGroup';
|
|
28
|
+
import {
|
|
29
|
+
bandSeries,
|
|
30
|
+
lineSeries,
|
|
31
|
+
areaSeries,
|
|
32
|
+
pieSeries,
|
|
33
|
+
purePieSeries,
|
|
34
|
+
} from './series';
|
|
35
|
+
import pie, {
|
|
36
|
+
rosePie,
|
|
37
|
+
rosePieDecorate,
|
|
38
|
+
donut,
|
|
39
|
+
carouselDonut,
|
|
40
|
+
nestRosePie,
|
|
41
|
+
carouselDonut2,
|
|
42
|
+
current as pieCurrent,
|
|
43
|
+
} from './pie';
|
|
44
|
+
import brush from './brush';
|
|
45
|
+
import interaction from './interaction';
|
|
46
|
+
import sc from './sc';
|
|
47
|
+
import shadow from './shadow';
|
|
48
|
+
import textOverflow from './textOverflow';
|
|
49
|
+
import baseLine from './baseLine';
|
|
50
|
+
import { control } from './control';
|
|
51
|
+
import pieTooltip from './pieTooltip';
|
|
52
|
+
export {
|
|
53
|
+
pieTooltip,
|
|
54
|
+
control,
|
|
55
|
+
show,
|
|
56
|
+
showRule,
|
|
57
|
+
font,
|
|
58
|
+
tooltip,
|
|
59
|
+
translate,
|
|
60
|
+
translate3d,
|
|
61
|
+
textOverflow,
|
|
62
|
+
extent,
|
|
63
|
+
unit,
|
|
64
|
+
margin,
|
|
65
|
+
multiColor,
|
|
66
|
+
animation,
|
|
67
|
+
dataAnimation,
|
|
68
|
+
animationOfPie,
|
|
69
|
+
animationOfCarousel,
|
|
70
|
+
dimension,
|
|
71
|
+
gridLine,
|
|
72
|
+
tickLine,
|
|
73
|
+
axisLine,
|
|
74
|
+
valueAxis,
|
|
75
|
+
categoryAxis,
|
|
76
|
+
axes,
|
|
77
|
+
imageGroup,
|
|
78
|
+
mapping,
|
|
79
|
+
bandSeries,
|
|
80
|
+
lineSeries,
|
|
81
|
+
areaSeries,
|
|
82
|
+
pieSeries,
|
|
83
|
+
purePieSeries,
|
|
84
|
+
brush,
|
|
85
|
+
interaction,
|
|
86
|
+
legend,
|
|
87
|
+
legendOfPie,
|
|
88
|
+
legendOfRose,
|
|
89
|
+
legendOfDoublePie,
|
|
90
|
+
label,
|
|
91
|
+
labelOfPie,
|
|
92
|
+
labelOfRose,
|
|
93
|
+
axisLabel,
|
|
94
|
+
valueAsixLabel,
|
|
95
|
+
pie,
|
|
96
|
+
rosePie,
|
|
97
|
+
nestRosePie,
|
|
98
|
+
rosePieDecorate,
|
|
99
|
+
donut,
|
|
100
|
+
carouselDonut,
|
|
101
|
+
carouselDonut2,
|
|
102
|
+
pieCurrent,
|
|
103
|
+
sc,
|
|
104
|
+
shadow,
|
|
105
|
+
baseLine
|
|
106
|
+
};
|