@easyv/config 1.2.16 → 1.2.18
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/animation.js +22 -26
- package/lib/axes.js +6 -9
- package/lib/axisLine.js +2 -3
- package/lib/baseLine.js +47 -48
- package/lib/brush.js +14 -15
- package/lib/control.js +16 -17
- package/lib/dimension.js +2 -3
- package/lib/extent.js +2 -3
- package/lib/font.js +2 -3
- package/lib/gridLine.js +2 -3
- package/lib/imageGroup.js +16 -17
- package/lib/index.js +2 -2
- package/lib/interaction.js +4 -5
- package/lib/label.js +122 -128
- package/lib/legend.js +249 -226
- package/lib/mapping.js +2 -3
- package/lib/margin.js +2 -3
- package/lib/multiColor.js +10 -11
- package/lib/pie.js +183 -191
- package/lib/pieTooltip.js +71 -72
- package/lib/sc.js +4 -5
- package/lib/series.js +132 -121
- package/lib/shadow.js +2 -3
- package/lib/show.js +3 -5
- package/lib/textOverflow.js +2 -3
- package/lib/tickLine.js +2 -3
- package/lib/tooltip.js +98 -99
- package/lib/translate.js +3 -5
- package/lib/unit.js +24 -25
- package/package.json +31 -31
- package/pnpm-lock.yaml +5974 -0
- package/src/control.js +117 -117
- package/src/extent.js +42 -42
- package/src/index.js +106 -106
- package/src/interaction.js +122 -122
- package/src/legend.js +33 -0
- package/src/pieTooltip.js +331 -331
- package/src/series.js +16 -1
package/src/control.js
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
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
|
-
start:0,
|
|
11
|
-
width:30,
|
|
12
|
-
color:"RGBA(255, 255, 255, .3)"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const control = ({
|
|
17
|
-
height = defaultControl.height,
|
|
18
|
-
color = defaultControl.color,
|
|
19
|
-
margin:{
|
|
20
|
-
left = defaultControl.margin.left,
|
|
21
|
-
right = defaultControl.margin.right
|
|
22
|
-
} = defaultControl.margin,
|
|
23
|
-
gap = defaultControl.gap,
|
|
24
|
-
drag:{
|
|
25
|
-
start = defaultControl.drag.start,
|
|
26
|
-
width = defaultControl.drag.width,
|
|
27
|
-
color:dragColor = defaultControl.drag.color
|
|
28
|
-
} = defaultControl.drag
|
|
29
|
-
} = defaultControl) => {
|
|
30
|
-
return {
|
|
31
|
-
name: "control",
|
|
32
|
-
displayName: "控制条",
|
|
33
|
-
value: [
|
|
34
|
-
{
|
|
35
|
-
name: "height",
|
|
36
|
-
displayName: "高度",
|
|
37
|
-
value: height,
|
|
38
|
-
type: "number",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: "color",
|
|
42
|
-
displayName: "背景颜色",
|
|
43
|
-
value: color,
|
|
44
|
-
type: "color",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
type: "group",
|
|
48
|
-
name: "margin",
|
|
49
|
-
displayName: "边距",
|
|
50
|
-
value: [
|
|
51
|
-
{
|
|
52
|
-
name: "left",
|
|
53
|
-
displayName: "左边距",
|
|
54
|
-
value: left,
|
|
55
|
-
type: "number",
|
|
56
|
-
config: {
|
|
57
|
-
span: 12,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: "right",
|
|
62
|
-
displayName: "右边距",
|
|
63
|
-
value: right,
|
|
64
|
-
type: "number",
|
|
65
|
-
config: {
|
|
66
|
-
span: 12,
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
name:"gap",
|
|
73
|
-
displayName:"上间距",
|
|
74
|
-
type:"number",
|
|
75
|
-
value:gap,
|
|
76
|
-
config:{
|
|
77
|
-
suffix:"px"
|
|
78
|
-
},
|
|
79
|
-
tip:"与X轴的距离"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: "drag",
|
|
83
|
-
displayName: "详情区域",
|
|
84
|
-
value: [
|
|
85
|
-
{
|
|
86
|
-
name: "start",
|
|
87
|
-
displayName: "起始位置",
|
|
88
|
-
value: start,
|
|
89
|
-
type: "range",
|
|
90
|
-
config: {
|
|
91
|
-
suffix: "%",
|
|
92
|
-
min: 0,
|
|
93
|
-
max:100
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: "width",
|
|
98
|
-
displayName: "宽度",
|
|
99
|
-
value: width,
|
|
100
|
-
type: "range",
|
|
101
|
-
config: {
|
|
102
|
-
suffix: "%",
|
|
103
|
-
min: 1,
|
|
104
|
-
max:100
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: "color",
|
|
109
|
-
displayName: "颜色",
|
|
110
|
-
value: dragColor,
|
|
111
|
-
type: "color",
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
};
|
|
117
|
-
};
|
|
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
|
+
start:0,
|
|
11
|
+
width:30,
|
|
12
|
+
color:"RGBA(255, 255, 255, .3)"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const control = ({
|
|
17
|
+
height = defaultControl.height,
|
|
18
|
+
color = defaultControl.color,
|
|
19
|
+
margin:{
|
|
20
|
+
left = defaultControl.margin.left,
|
|
21
|
+
right = defaultControl.margin.right
|
|
22
|
+
} = defaultControl.margin,
|
|
23
|
+
gap = defaultControl.gap,
|
|
24
|
+
drag:{
|
|
25
|
+
start = defaultControl.drag.start,
|
|
26
|
+
width = defaultControl.drag.width,
|
|
27
|
+
color:dragColor = defaultControl.drag.color
|
|
28
|
+
} = defaultControl.drag
|
|
29
|
+
} = defaultControl) => {
|
|
30
|
+
return {
|
|
31
|
+
name: "control",
|
|
32
|
+
displayName: "控制条",
|
|
33
|
+
value: [
|
|
34
|
+
{
|
|
35
|
+
name: "height",
|
|
36
|
+
displayName: "高度",
|
|
37
|
+
value: height,
|
|
38
|
+
type: "number",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "color",
|
|
42
|
+
displayName: "背景颜色",
|
|
43
|
+
value: color,
|
|
44
|
+
type: "color",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: "group",
|
|
48
|
+
name: "margin",
|
|
49
|
+
displayName: "边距",
|
|
50
|
+
value: [
|
|
51
|
+
{
|
|
52
|
+
name: "left",
|
|
53
|
+
displayName: "左边距",
|
|
54
|
+
value: left,
|
|
55
|
+
type: "number",
|
|
56
|
+
config: {
|
|
57
|
+
span: 12,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "right",
|
|
62
|
+
displayName: "右边距",
|
|
63
|
+
value: right,
|
|
64
|
+
type: "number",
|
|
65
|
+
config: {
|
|
66
|
+
span: 12,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name:"gap",
|
|
73
|
+
displayName:"上间距",
|
|
74
|
+
type:"number",
|
|
75
|
+
value:gap,
|
|
76
|
+
config:{
|
|
77
|
+
suffix:"px"
|
|
78
|
+
},
|
|
79
|
+
tip:"与X轴的距离"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "drag",
|
|
83
|
+
displayName: "详情区域",
|
|
84
|
+
value: [
|
|
85
|
+
{
|
|
86
|
+
name: "start",
|
|
87
|
+
displayName: "起始位置",
|
|
88
|
+
value: start,
|
|
89
|
+
type: "range",
|
|
90
|
+
config: {
|
|
91
|
+
suffix: "%",
|
|
92
|
+
min: 0,
|
|
93
|
+
max:100
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "width",
|
|
98
|
+
displayName: "宽度",
|
|
99
|
+
value: width,
|
|
100
|
+
type: "range",
|
|
101
|
+
config: {
|
|
102
|
+
suffix: "%",
|
|
103
|
+
min: 1,
|
|
104
|
+
max:100
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "color",
|
|
109
|
+
displayName: "颜色",
|
|
110
|
+
value: dragColor,
|
|
111
|
+
type: "color",
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
};
|
|
117
|
+
};
|
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
|
+
};
|