@easyv/config 1.1.6 → 1.1.7
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 +1 -0
- package/lib/axes.js +2 -2
- package/lib/baseLine.js +198 -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 +257 -256
- package/src/axes.js +162 -162
- package/src/axisLine.js +39 -39
- package/src/baseLine.js +177 -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/axes.js
CHANGED
|
@@ -1,162 +1,162 @@
|
|
|
1
|
-
import { gridLine, tickLine, axisLine, unit, font } from '.';
|
|
2
|
-
import { axisLabel, valueAsixLabel } from './label';
|
|
3
|
-
const defaultFont = font();
|
|
4
|
-
const defaultFontAxisY = font({
|
|
5
|
-
color: 'rgba(230, 247, 255, 1)',
|
|
6
|
-
});
|
|
7
|
-
const defaultCategoryAxis = {
|
|
8
|
-
on: true,
|
|
9
|
-
label: {
|
|
10
|
-
show: true,
|
|
11
|
-
format: { type: 'date', showType: 'MM月' },
|
|
12
|
-
appearance: { count: 3, angle: 0, wordBreak: 'keep-all' },
|
|
13
|
-
translate: { x: 0, y: 0 },
|
|
14
|
-
font: defaultFontAxisY,
|
|
15
|
-
},
|
|
16
|
-
axisLine: { show: true, color: '#BAE7FF', lineWidth: 1 },
|
|
17
|
-
tickLine: {
|
|
18
|
-
show: false,
|
|
19
|
-
color: 'rgba(186,231,255,1)',
|
|
20
|
-
lineWidth: 1,
|
|
21
|
-
tickSize: 6,
|
|
22
|
-
},
|
|
23
|
-
gridLine: {
|
|
24
|
-
show: true,
|
|
25
|
-
strokeDasharray: '3,3',
|
|
26
|
-
color: 'rgba(230, 247, 255, 0.2)',
|
|
27
|
-
lineWidth: 1,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const categoryAxis = ({
|
|
32
|
-
on = defaultCategoryAxis.on,
|
|
33
|
-
label = defaultCategoryAxis.label,
|
|
34
|
-
axisLine: axisLine_ = defaultCategoryAxis.axisLine,
|
|
35
|
-
tickLine: tickLine_ = defaultCategoryAxis.tickLine,
|
|
36
|
-
gridLine: gridLine_ = defaultCategoryAxis.gridLine,
|
|
37
|
-
} = defaultCategoryAxis) => [
|
|
38
|
-
{
|
|
39
|
-
name: 'on',
|
|
40
|
-
displayName: '启用',
|
|
41
|
-
value: on,
|
|
42
|
-
type: 'boolean',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
rule: [['on', '$eq', true]],
|
|
46
|
-
...axisLabel(label),
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
rule: [['on', '$eq', true]],
|
|
50
|
-
...axisLine(axisLine_),
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
rule: [['on', '$eq', true]],
|
|
54
|
-
...tickLine(tickLine_),
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
rule: [['on', '$eq', true]],
|
|
58
|
-
...gridLine(gridLine_),
|
|
59
|
-
},
|
|
60
|
-
];
|
|
61
|
-
|
|
62
|
-
const defaultValueAxis = {
|
|
63
|
-
on: true,
|
|
64
|
-
label: {
|
|
65
|
-
show: true,
|
|
66
|
-
extent: { min: '0', max: '' },
|
|
67
|
-
auto: false,
|
|
68
|
-
mode: 'count',
|
|
69
|
-
count: 3,
|
|
70
|
-
step: 100,
|
|
71
|
-
decimal: 0,
|
|
72
|
-
suffix: '',
|
|
73
|
-
translate: { x: 6, y: 0 },
|
|
74
|
-
font: defaultFont,
|
|
75
|
-
},
|
|
76
|
-
unit: {
|
|
77
|
-
show: false,
|
|
78
|
-
text: '单位',
|
|
79
|
-
font: defaultFont,
|
|
80
|
-
translate: { x: 0, y: 0 },
|
|
81
|
-
},
|
|
82
|
-
axisLine: { show: true, color: '#BAE7FF', lineWidth: 1 },
|
|
83
|
-
tickLine: {
|
|
84
|
-
show: true,
|
|
85
|
-
color: 'rgba(186,231,255,1)',
|
|
86
|
-
lineWidth: 1,
|
|
87
|
-
tickSize: 6,
|
|
88
|
-
},
|
|
89
|
-
gridLine: {
|
|
90
|
-
show: true,
|
|
91
|
-
strokeDasharray: '3,3',
|
|
92
|
-
color: 'rgba(230, 247, 255, 0.2)',
|
|
93
|
-
lineWidth: 1,
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const valueAxis = ({
|
|
98
|
-
on = defaultValueAxis.on,
|
|
99
|
-
label = defaultValueAxis.label,
|
|
100
|
-
unit: unit_ = defaultValueAxis.unit,
|
|
101
|
-
axisLine: axisLine_ = defaultValueAxis.axisLine,
|
|
102
|
-
tickLine: tickLine_ = defaultValueAxis.tickLine,
|
|
103
|
-
gridLine: gridLine_ = defaultValueAxis.gridLine,
|
|
104
|
-
} = defaultValueAxis) => [
|
|
105
|
-
{
|
|
106
|
-
name: 'on',
|
|
107
|
-
displayName: '启用',
|
|
108
|
-
value: on,
|
|
109
|
-
type: 'boolean',
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
rule: [['on', '$eq', true]],
|
|
113
|
-
...valueAsixLabel(label),
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
rule: [['on', '$eq', true]],
|
|
117
|
-
...unit(unit_),
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
rule: [['on', '$eq', true]],
|
|
121
|
-
...axisLine(axisLine_),
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
rule: [['on', '$eq', true]],
|
|
125
|
-
...tickLine(tickLine_),
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
rule: [['on', '$eq', true]],
|
|
129
|
-
...gridLine(gridLine_),
|
|
130
|
-
},
|
|
131
|
-
];
|
|
132
|
-
|
|
133
|
-
export default (
|
|
134
|
-
{ xAxis = defaultCategoryAxis, yAxis = defaultValueAxis, zAxis } = {
|
|
135
|
-
xAxis: defaultCategoryAxis,
|
|
136
|
-
yAxis: defaultValueAxis,
|
|
137
|
-
}
|
|
138
|
-
) => ({
|
|
139
|
-
name: 'axes',
|
|
140
|
-
displayName: '坐标轴',
|
|
141
|
-
value: [
|
|
142
|
-
{
|
|
143
|
-
name: 'xAxis',
|
|
144
|
-
displayName: 'X轴',
|
|
145
|
-
value: categoryAxis(xAxis),
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
name: 'yAxis',
|
|
149
|
-
displayName: 'Y轴',
|
|
150
|
-
value: valueAxis(yAxis),
|
|
151
|
-
},
|
|
152
|
-
zAxis && {
|
|
153
|
-
name: 'zAxis',
|
|
154
|
-
displayName: 'Z轴',
|
|
155
|
-
value: valueAxis(zAxis),
|
|
156
|
-
},
|
|
157
|
-
].filter((item) => !!item),
|
|
158
|
-
config: {
|
|
159
|
-
layout: 'horizontal',
|
|
160
|
-
},
|
|
161
|
-
type: 'menu',
|
|
162
|
-
});
|
|
1
|
+
import { gridLine, tickLine, axisLine, unit, font } from '.';
|
|
2
|
+
import { axisLabel, valueAsixLabel } from './label';
|
|
3
|
+
const defaultFont = font();
|
|
4
|
+
const defaultFontAxisY = font({
|
|
5
|
+
color: 'rgba(230, 247, 255, 1)',
|
|
6
|
+
});
|
|
7
|
+
const defaultCategoryAxis = {
|
|
8
|
+
on: true,
|
|
9
|
+
label: {
|
|
10
|
+
show: true,
|
|
11
|
+
format: { type: 'date', showType: 'MM月' },
|
|
12
|
+
appearance: { count: 3, angle: 0, wordBreak: 'keep-all' },
|
|
13
|
+
translate: { x: 0, y: 0 },
|
|
14
|
+
font: defaultFontAxisY,
|
|
15
|
+
},
|
|
16
|
+
axisLine: { show: true, color: '#BAE7FF', lineWidth: 1 },
|
|
17
|
+
tickLine: {
|
|
18
|
+
show: false,
|
|
19
|
+
color: 'rgba(186,231,255,1)',
|
|
20
|
+
lineWidth: 1,
|
|
21
|
+
tickSize: 6,
|
|
22
|
+
},
|
|
23
|
+
gridLine: {
|
|
24
|
+
show: true,
|
|
25
|
+
strokeDasharray: '3,3',
|
|
26
|
+
color: 'rgba(230, 247, 255, 0.2)',
|
|
27
|
+
lineWidth: 1,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const categoryAxis = ({
|
|
32
|
+
on = defaultCategoryAxis.on,
|
|
33
|
+
label = defaultCategoryAxis.label,
|
|
34
|
+
axisLine: axisLine_ = defaultCategoryAxis.axisLine,
|
|
35
|
+
tickLine: tickLine_ = defaultCategoryAxis.tickLine,
|
|
36
|
+
gridLine: gridLine_ = defaultCategoryAxis.gridLine,
|
|
37
|
+
} = defaultCategoryAxis) => [
|
|
38
|
+
{
|
|
39
|
+
name: 'on',
|
|
40
|
+
displayName: '启用',
|
|
41
|
+
value: on,
|
|
42
|
+
type: 'boolean',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
rule: [['on', '$eq', true]],
|
|
46
|
+
...axisLabel(label),
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
rule: [['on', '$eq', true]],
|
|
50
|
+
...axisLine(axisLine_),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
rule: [['on', '$eq', true]],
|
|
54
|
+
...tickLine(tickLine_),
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
rule: [['on', '$eq', true]],
|
|
58
|
+
...gridLine(gridLine_),
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
const defaultValueAxis = {
|
|
63
|
+
on: true,
|
|
64
|
+
label: {
|
|
65
|
+
show: true,
|
|
66
|
+
extent: { min: '0', max: '' },
|
|
67
|
+
auto: false,
|
|
68
|
+
mode: 'count',
|
|
69
|
+
count: 3,
|
|
70
|
+
step: 100,
|
|
71
|
+
decimal: 0,
|
|
72
|
+
suffix: '',
|
|
73
|
+
translate: { x: 6, y: 0 },
|
|
74
|
+
font: defaultFont,
|
|
75
|
+
},
|
|
76
|
+
unit: {
|
|
77
|
+
show: false,
|
|
78
|
+
text: '单位',
|
|
79
|
+
font: defaultFont,
|
|
80
|
+
translate: { x: 0, y: 0 },
|
|
81
|
+
},
|
|
82
|
+
axisLine: { show: true, color: '#BAE7FF', lineWidth: 1 },
|
|
83
|
+
tickLine: {
|
|
84
|
+
show: true,
|
|
85
|
+
color: 'rgba(186,231,255,1)',
|
|
86
|
+
lineWidth: 1,
|
|
87
|
+
tickSize: 6,
|
|
88
|
+
},
|
|
89
|
+
gridLine: {
|
|
90
|
+
show: true,
|
|
91
|
+
strokeDasharray: '3,3',
|
|
92
|
+
color: 'rgba(230, 247, 255, 0.2)',
|
|
93
|
+
lineWidth: 1,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const valueAxis = ({
|
|
98
|
+
on = defaultValueAxis.on,
|
|
99
|
+
label = defaultValueAxis.label,
|
|
100
|
+
unit: unit_ = defaultValueAxis.unit,
|
|
101
|
+
axisLine: axisLine_ = defaultValueAxis.axisLine,
|
|
102
|
+
tickLine: tickLine_ = defaultValueAxis.tickLine,
|
|
103
|
+
gridLine: gridLine_ = defaultValueAxis.gridLine,
|
|
104
|
+
} = defaultValueAxis) => [
|
|
105
|
+
{
|
|
106
|
+
name: 'on',
|
|
107
|
+
displayName: '启用',
|
|
108
|
+
value: on,
|
|
109
|
+
type: 'boolean',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
rule: [['on', '$eq', true]],
|
|
113
|
+
...valueAsixLabel(label),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
rule: [['on', '$eq', true]],
|
|
117
|
+
...unit(unit_),
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
rule: [['on', '$eq', true]],
|
|
121
|
+
...axisLine(axisLine_),
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
rule: [['on', '$eq', true]],
|
|
125
|
+
...tickLine(tickLine_),
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
rule: [['on', '$eq', true]],
|
|
129
|
+
...gridLine(gridLine_),
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
export default (
|
|
134
|
+
{ xAxis = defaultCategoryAxis, yAxis = defaultValueAxis, zAxis } = {
|
|
135
|
+
xAxis: defaultCategoryAxis,
|
|
136
|
+
yAxis: defaultValueAxis,
|
|
137
|
+
}
|
|
138
|
+
) => ({
|
|
139
|
+
name: 'axes',
|
|
140
|
+
displayName: '坐标轴',
|
|
141
|
+
value: [
|
|
142
|
+
{
|
|
143
|
+
name: 'xAxis',
|
|
144
|
+
displayName: 'X轴',
|
|
145
|
+
value: categoryAxis(xAxis),
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'yAxis',
|
|
149
|
+
displayName: 'Y轴',
|
|
150
|
+
value: valueAxis(yAxis),
|
|
151
|
+
},
|
|
152
|
+
zAxis && {
|
|
153
|
+
name: 'zAxis',
|
|
154
|
+
displayName: 'Z轴',
|
|
155
|
+
value: valueAxis(zAxis),
|
|
156
|
+
},
|
|
157
|
+
].filter((item) => !!item),
|
|
158
|
+
config: {
|
|
159
|
+
layout: 'horizontal',
|
|
160
|
+
},
|
|
161
|
+
type: 'menu',
|
|
162
|
+
});
|
package/src/axisLine.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
const axisLine = {
|
|
2
|
-
show: true,
|
|
3
|
-
color: '#BAE7FF',
|
|
4
|
-
lineWidth: 1,
|
|
5
|
-
};
|
|
6
|
-
export default ({
|
|
7
|
-
show = axisLine.show,
|
|
8
|
-
color = axisLine.color,
|
|
9
|
-
lineWidth = axisLine.lineWidth,
|
|
10
|
-
} = axisLine) => ({
|
|
11
|
-
name: 'axisLine',
|
|
12
|
-
displayName: '轴线',
|
|
13
|
-
value: [
|
|
14
|
-
{
|
|
15
|
-
name: 'show',
|
|
16
|
-
displayName: '显示',
|
|
17
|
-
value: show,
|
|
18
|
-
type: 'boolean',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
rule: [['show', '$eq', true]],
|
|
22
|
-
name: 'color',
|
|
23
|
-
displayName: '颜色',
|
|
24
|
-
value: color,
|
|
25
|
-
type: 'color',
|
|
26
|
-
markColorType: 'assistColor',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
rule: [['show', '$eq', true]],
|
|
30
|
-
name: 'lineWidth',
|
|
31
|
-
displayName: '粗细',
|
|
32
|
-
value: lineWidth,
|
|
33
|
-
type: 'number',
|
|
34
|
-
config: {
|
|
35
|
-
suffix: 'px',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
});
|
|
1
|
+
const axisLine = {
|
|
2
|
+
show: true,
|
|
3
|
+
color: '#BAE7FF',
|
|
4
|
+
lineWidth: 1,
|
|
5
|
+
};
|
|
6
|
+
export default ({
|
|
7
|
+
show = axisLine.show,
|
|
8
|
+
color = axisLine.color,
|
|
9
|
+
lineWidth = axisLine.lineWidth,
|
|
10
|
+
} = axisLine) => ({
|
|
11
|
+
name: 'axisLine',
|
|
12
|
+
displayName: '轴线',
|
|
13
|
+
value: [
|
|
14
|
+
{
|
|
15
|
+
name: 'show',
|
|
16
|
+
displayName: '显示',
|
|
17
|
+
value: show,
|
|
18
|
+
type: 'boolean',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
rule: [['show', '$eq', true]],
|
|
22
|
+
name: 'color',
|
|
23
|
+
displayName: '颜色',
|
|
24
|
+
value: color,
|
|
25
|
+
type: 'color',
|
|
26
|
+
markColorType: 'assistColor',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
rule: [['show', '$eq', true]],
|
|
30
|
+
name: 'lineWidth',
|
|
31
|
+
displayName: '粗细',
|
|
32
|
+
value: lineWidth,
|
|
33
|
+
type: 'number',
|
|
34
|
+
config: {
|
|
35
|
+
suffix: 'px',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
});
|
package/src/baseLine.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
//@ts-check
|
|
2
|
+
import { font, translate } from '.';
|
|
3
|
+
|
|
4
|
+
const defaultBaseLine = {
|
|
5
|
+
line: {
|
|
6
|
+
yOrZ: 'y',
|
|
7
|
+
margin: {
|
|
8
|
+
marginLeft: 25,
|
|
9
|
+
marginRight: 25
|
|
10
|
+
},
|
|
11
|
+
lineType: 'solid',
|
|
12
|
+
color: '#BAE7FF',
|
|
13
|
+
lineWidth: 1,
|
|
14
|
+
strokeDasharray: '3,3'
|
|
15
|
+
},
|
|
16
|
+
dataStyle: {
|
|
17
|
+
font: font(),
|
|
18
|
+
translate: { x: 0, y: 0 },
|
|
19
|
+
suffix: {
|
|
20
|
+
show: false,
|
|
21
|
+
font: font(),
|
|
22
|
+
translate: { x: 0, y: 0 },
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
export default ({
|
|
27
|
+
line: {
|
|
28
|
+
yOrZ = defaultBaseLine.line.yOrZ,
|
|
29
|
+
margin: {
|
|
30
|
+
marginLeft = defaultBaseLine.line.margin.marginLeft,
|
|
31
|
+
marginRight = defaultBaseLine.line.margin.marginRight,
|
|
32
|
+
} = defaultBaseLine.line.margin,
|
|
33
|
+
lineType = defaultBaseLine.line.lineType,
|
|
34
|
+
color = defaultBaseLine.line.color,
|
|
35
|
+
lineWidth = defaultBaseLine.line.lineWidth,
|
|
36
|
+
strokeDasharray = defaultBaseLine.line.strokeDasharray
|
|
37
|
+
} = defaultBaseLine.line,
|
|
38
|
+
dataStyle: {
|
|
39
|
+
textStyle = defaultBaseLine.dataStyle.font,
|
|
40
|
+
translate: { x, y } = defaultBaseLine.dataStyle.translate,
|
|
41
|
+
suffix: {
|
|
42
|
+
show = defaultBaseLine.dataStyle.suffix.show,
|
|
43
|
+
suffixStyle = defaultBaseLine.dataStyle.suffix.suffixStyle,
|
|
44
|
+
suffixTranslate: {
|
|
45
|
+
x: suffixTranslateX = defaultBaseLine.dataStyle.suffix.translate.x,
|
|
46
|
+
y: suffixTranslateY = defaultBaseLine.dataStyle.suffix.translate.y
|
|
47
|
+
} = defaultBaseLine.dataStyle.suffix.translate
|
|
48
|
+
} = defaultBaseLine.dataStyle.suffix,
|
|
49
|
+
} = defaultBaseLine.dataStyle
|
|
50
|
+
|
|
51
|
+
} = defaultBaseLine) => [
|
|
52
|
+
{
|
|
53
|
+
name: 'line',
|
|
54
|
+
displayName: '线样式',
|
|
55
|
+
config: {
|
|
56
|
+
layout: 'horizontal'
|
|
57
|
+
},
|
|
58
|
+
value: [
|
|
59
|
+
{
|
|
60
|
+
name: 'yOrZ',
|
|
61
|
+
displayName: '纵轴选择',
|
|
62
|
+
value: yOrZ,
|
|
63
|
+
type: 'select',
|
|
64
|
+
config: {
|
|
65
|
+
options: [
|
|
66
|
+
{ name: 'Y轴', value: 'y' },
|
|
67
|
+
{ name: 'Z轴', value: 'z' },
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'margin',
|
|
73
|
+
displayName: '边距',
|
|
74
|
+
type: 'group',
|
|
75
|
+
value: [
|
|
76
|
+
{
|
|
77
|
+
type: 'number',
|
|
78
|
+
name: 'marginLeft',
|
|
79
|
+
displayName: '左',
|
|
80
|
+
value: marginLeft,
|
|
81
|
+
config: {
|
|
82
|
+
span: 12,
|
|
83
|
+
showStep: false,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: 'number',
|
|
88
|
+
name: 'marginRight',
|
|
89
|
+
displayName: '右',
|
|
90
|
+
value: marginRight,
|
|
91
|
+
config: {
|
|
92
|
+
span: 12,
|
|
93
|
+
showStep: false,
|
|
94
|
+
},
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'lineType',
|
|
100
|
+
displayName: '线样式',
|
|
101
|
+
value: lineType,
|
|
102
|
+
type: 'select',
|
|
103
|
+
config: {
|
|
104
|
+
options: [{
|
|
105
|
+
name: '实线',
|
|
106
|
+
value: 'solid'
|
|
107
|
+
}, {
|
|
108
|
+
name: '虚线',
|
|
109
|
+
value: 'dash'
|
|
110
|
+
}]
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'color',
|
|
115
|
+
displayName: '颜色',
|
|
116
|
+
value: color,
|
|
117
|
+
type: 'color',
|
|
118
|
+
markColorType: 'assistColor',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'lineWidth',
|
|
122
|
+
displayName: '粗细',
|
|
123
|
+
value: lineWidth,
|
|
124
|
+
type: 'number',
|
|
125
|
+
config: {
|
|
126
|
+
suffix: 'px',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
rule: [['lineType', '$eq', 'dash']],
|
|
131
|
+
name: 'strokeDasharray',
|
|
132
|
+
displayName: '虚线样式',
|
|
133
|
+
value: strokeDasharray,
|
|
134
|
+
type: 'input',
|
|
135
|
+
tip: '格式使用半角字符,如3,3',
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'dataStyle',
|
|
141
|
+
displayName: '数据样式',
|
|
142
|
+
value: [
|
|
143
|
+
{
|
|
144
|
+
name: 'textStyle',
|
|
145
|
+
displayName: '文本样式',
|
|
146
|
+
value: font(textStyle),
|
|
147
|
+
type: 'textStyle',
|
|
148
|
+
markColorType: 'textColor',
|
|
149
|
+
},
|
|
150
|
+
translate(x, y),
|
|
151
|
+
{
|
|
152
|
+
name: 'suffix',
|
|
153
|
+
displayName: '后缀',
|
|
154
|
+
value: [
|
|
155
|
+
{
|
|
156
|
+
name: 'show',
|
|
157
|
+
displayName: '显示',
|
|
158
|
+
value: show,
|
|
159
|
+
type: 'boolean',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
rule: [['show', '$eq', true]],
|
|
163
|
+
name: 'suffixStyle',
|
|
164
|
+
displayName: '文本样式',
|
|
165
|
+
value: font(suffixStyle),
|
|
166
|
+
type: 'textStyle',
|
|
167
|
+
markColorType: 'textColor',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
rule: [['show', '$eq', true]],
|
|
171
|
+
...translate(suffixTranslateX, suffixTranslateY)
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
];
|