@easyv/charts 1.6.14 → 1.6.16
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/components/Band.js +21 -4
- package/lib/components/Legend.js +68 -18
- package/lib/formatter/legend.js +3 -2
- package/package.json +1 -1
- package/src/components/Band.tsx +24 -8
- package/src/components/Legend.js +62 -39
- package/src/formatter/legend.js +4 -2
- package/.husky/commit-msg +0 -4
package/lib/components/Band.js
CHANGED
|
@@ -149,9 +149,9 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
149
149
|
y2 = yScaler(isVertical ? start : end);
|
|
150
150
|
}
|
|
151
151
|
var positionX = xScaler(x) - step / 2 + seriesStart + index * seriesStep;
|
|
152
|
-
var showHead, headUrl, headWidth, headHeight, headTranslate;
|
|
152
|
+
var showHead, headType, headUrl, headVideo, headWidth, headHeight, headTranslate;
|
|
153
153
|
if (headDecorate) {
|
|
154
|
-
showHead = headDecorate.show, headUrl = headDecorate.url, headWidth = headDecorate.size.width, headHeight = headDecorate.size.height, headTranslate = headDecorate.translate;
|
|
154
|
+
showHead = headDecorate.show, headType = headDecorate.headType, headUrl = headDecorate.url, headVideo = headDecorate.video, headWidth = headDecorate.size.width, headHeight = headDecorate.size.height, headTranslate = headDecorate.translate;
|
|
155
155
|
}
|
|
156
156
|
//断轴图相关,将柱形在断轴处切开
|
|
157
157
|
var setClipPath = function setClipPath() {
|
|
@@ -224,7 +224,7 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
"data-data": JSON.stringify(data)
|
|
227
|
-
}), headUrl && showHead && /*#__PURE__*/_react["default"].createElement("div", {
|
|
227
|
+
}), (headUrl || headVideo) && showHead && (headType == "image" ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
228
228
|
style: {
|
|
229
229
|
position: "absolute",
|
|
230
230
|
background: "url(".concat(
|
|
@@ -237,7 +237,24 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
237
237
|
zIndex: 1,
|
|
238
238
|
transform: "translate(calc(-50% + ".concat(headTranslate.x, "px), calc(-50% + ").concat(headTranslate.y, "px))")
|
|
239
239
|
}
|
|
240
|
-
})
|
|
240
|
+
}) : /*#__PURE__*/_react["default"].createElement("video", {
|
|
241
|
+
width: headWidth,
|
|
242
|
+
height: headHeight
|
|
243
|
+
//@ts-ignore
|
|
244
|
+
,
|
|
245
|
+
src: window.appConfig.ASSETS_URL + headVideo
|
|
246
|
+
// controls={true}
|
|
247
|
+
,
|
|
248
|
+
muted: true,
|
|
249
|
+
autoPlay: true,
|
|
250
|
+
style: {
|
|
251
|
+
position: "absolute",
|
|
252
|
+
left: isVertical ? "100%" : "50%",
|
|
253
|
+
top: isVertical ? "50%" : "0",
|
|
254
|
+
zIndex: 1,
|
|
255
|
+
transform: "translate(calc(-50% + ".concat(headTranslate.x, "px), calc(-50% + ").concat(headTranslate.y, "px))")
|
|
256
|
+
}
|
|
257
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
241
258
|
style: _objectSpread({
|
|
242
259
|
width: "100%",
|
|
243
260
|
height: "100%",
|
package/lib/components/Legend.js
CHANGED
|
@@ -45,6 +45,8 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
45
45
|
_ref$config$layout$tr = _ref$config$layout.translate,
|
|
46
46
|
x = _ref$config$layout$tr.x,
|
|
47
47
|
y = _ref$config$layout$tr.y,
|
|
48
|
+
_ref$config$loop = _ref$config.loop,
|
|
49
|
+
loop = _ref$config$loop === void 0 ? {} : _ref$config$loop,
|
|
48
50
|
_ref$config$font = _ref$config.font,
|
|
49
51
|
_ref$config$font2 = _ref$config$font === void 0 ? defaultFont : _ref$config$font,
|
|
50
52
|
italic = _ref$config$font2.italic,
|
|
@@ -58,6 +60,51 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
58
60
|
formatter = _ref.formatter,
|
|
59
61
|
judge = _ref.judge;
|
|
60
62
|
if (!show) return null;
|
|
63
|
+
var ref_container = (0, _react.useRef)(null); // 滚动容器
|
|
64
|
+
var ref_scrollTop = (0, _react.useRef)(0); // 当前滚动距离
|
|
65
|
+
|
|
66
|
+
var _useState = (0, _react.useState)(0),
|
|
67
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
68
|
+
scrollStep = _useState2[0],
|
|
69
|
+
setScrollStep = _useState2[1]; // 行高度
|
|
70
|
+
|
|
71
|
+
// 初始化行高
|
|
72
|
+
(0, _react.useEffect)(function () {
|
|
73
|
+
if (ref_container.current) {
|
|
74
|
+
var rowHeight = ref_container.current.querySelector('li').clientHeight + gridRowGap;
|
|
75
|
+
setScrollStep(rowHeight);
|
|
76
|
+
}
|
|
77
|
+
}, [gridRowGap]);
|
|
78
|
+
|
|
79
|
+
// 启动自动滚动定时器
|
|
80
|
+
(0, _react.useEffect)(function () {
|
|
81
|
+
if (!loop.show) return;
|
|
82
|
+
ref_scrollTop.current = 0;
|
|
83
|
+
var timer = setInterval(function () {
|
|
84
|
+
handleAutoScroll();
|
|
85
|
+
}, loop.interval * 1000); // 每隔3秒滚动一次
|
|
86
|
+
|
|
87
|
+
// 清除定时器
|
|
88
|
+
return function () {
|
|
89
|
+
return clearInterval(timer);
|
|
90
|
+
};
|
|
91
|
+
}, [scrollStep, loop.show, loop.interval]);
|
|
92
|
+
var handleAutoScroll = function handleAutoScroll() {
|
|
93
|
+
var table = ref_container.current;
|
|
94
|
+
if (!table) return;
|
|
95
|
+
|
|
96
|
+
// 如果已经滚动到了底部,则返回顶部
|
|
97
|
+
if (ref_scrollTop.current + table.clientHeight >= table.scrollHeight) {
|
|
98
|
+
ref_scrollTop.current = 0;
|
|
99
|
+
} else {
|
|
100
|
+
// 否则,滚动一行的高度
|
|
101
|
+
ref_scrollTop.current += scrollStep;
|
|
102
|
+
}
|
|
103
|
+
table.scrollTo({
|
|
104
|
+
top: ref_scrollTop.current,
|
|
105
|
+
behavior: 'smooth'
|
|
106
|
+
});
|
|
107
|
+
};
|
|
61
108
|
var _series = (0, _utils.sortPie)(series, order);
|
|
62
109
|
var _alignment$split = alignment.split(' '),
|
|
63
110
|
_alignment$split2 = (0, _slicedToArray2["default"])(_alignment$split, 2),
|
|
@@ -76,12 +123,14 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
76
123
|
}
|
|
77
124
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
125
|
className: "__easyv-legend-wrapper",
|
|
79
|
-
style: _objectSpread({
|
|
126
|
+
style: _objectSpread(_objectSpread({
|
|
80
127
|
position: 'absolute',
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
128
|
+
display: 'flex'
|
|
129
|
+
}, getPosition(position, _alignment, x, y)), {}, {
|
|
130
|
+
height: loop.show ? loop.height : 'auto',
|
|
131
|
+
overflowY: loop.show ? 'scroll' : 'auto'
|
|
132
|
+
}),
|
|
133
|
+
ref: ref_container
|
|
85
134
|
}, /*#__PURE__*/_react["default"].createElement("ul", {
|
|
86
135
|
style: {
|
|
87
136
|
display: 'grid',
|
|
@@ -122,34 +171,35 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
122
171
|
})));
|
|
123
172
|
});
|
|
124
173
|
var getPosition = function getPosition(position, alignment) {
|
|
174
|
+
var x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
175
|
+
var y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
125
176
|
switch (position) {
|
|
126
177
|
case 'top':
|
|
127
178
|
return {
|
|
128
|
-
left:
|
|
129
|
-
right:
|
|
179
|
+
left: alignment == 'left' ? 5 : alignment == 'center' ? '50%' : '',
|
|
180
|
+
right: alignment == 'right' ? 10 : '',
|
|
130
181
|
top: 5,
|
|
131
|
-
|
|
182
|
+
transform: "translate3d(calc(".concat(alignment == 'center' ? '-50%' : '0px', " + ").concat(x, "px), ").concat(y, "px, 0px)")
|
|
132
183
|
};
|
|
133
184
|
case 'right':
|
|
134
185
|
return {
|
|
135
|
-
top:
|
|
136
|
-
bottom: 0,
|
|
186
|
+
top: '50%',
|
|
137
187
|
right: 10,
|
|
138
|
-
|
|
188
|
+
transform: "translate3d(".concat(x, "px, calc(-50% + ").concat(y, "px), 0px)")
|
|
139
189
|
};
|
|
140
190
|
case 'left':
|
|
141
191
|
return {
|
|
142
|
-
top:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
alignItems: alignment === 'center' ? 'center' : alignment === 'left' ? 'flex-start' : 'flex-end'
|
|
192
|
+
top: '50%',
|
|
193
|
+
left: 5,
|
|
194
|
+
transform: "translate3d(".concat(x, "px, calc(-50% + ").concat(y, "px), 0px)")
|
|
146
195
|
};
|
|
147
196
|
default:
|
|
197
|
+
// bottom
|
|
148
198
|
return {
|
|
149
|
-
left:
|
|
150
|
-
right:
|
|
199
|
+
left: alignment == 'left' ? 5 : alignment == 'center' ? '50%' : '',
|
|
200
|
+
right: alignment == 'right' ? 10 : '',
|
|
151
201
|
bottom: 5,
|
|
152
|
-
|
|
202
|
+
transform: "translate3d(calc(".concat(alignment == 'center' ? '-50%' : '0px', " + ").concat(x, "px), ").concat(y, "px, 0px)")
|
|
153
203
|
};
|
|
154
204
|
}
|
|
155
205
|
};
|
package/lib/formatter/legend.js
CHANGED
|
@@ -57,6 +57,7 @@ var pieLegendFormatter = exports.pieLegendFormatter = function pieLegendFormatte
|
|
|
57
57
|
pure = seriesColor.pure,
|
|
58
58
|
stops = seriesColor.linear.stops;
|
|
59
59
|
var _color = seriesColorType == 'pure' ? pure : stops[0].color;
|
|
60
|
+
var textMarginLeft = 5;
|
|
60
61
|
return /*#__PURE__*/React.createElement(React.Fragment, null, icon && /*#__PURE__*/React.createElement("span", {
|
|
61
62
|
style: _objectSpread(_objectSpread({}, icon), {}, {
|
|
62
63
|
marginRight: icon.marginRight,
|
|
@@ -65,7 +66,7 @@ var pieLegendFormatter = exports.pieLegendFormatter = function pieLegendFormatte
|
|
|
65
66
|
}), /*#__PURE__*/React.createElement("div", {
|
|
66
67
|
className: showName && showValue && showPercent ? _indexModule["default"].showAllStyle : _indexModule["default"].notShowAllStyle,
|
|
67
68
|
style: {
|
|
68
|
-
width: "calc( 100% + ".concat(valueGap + percentGap, "px )")
|
|
69
|
+
width: "calc( 100% + ".concat(textMarginLeft + valueGap + percentGap, "px )")
|
|
69
70
|
}
|
|
70
71
|
}, showName && /*#__PURE__*/React.createElement(_components.TextOverflow, {
|
|
71
72
|
value: displayName,
|
|
@@ -73,7 +74,7 @@ var pieLegendFormatter = exports.pieLegendFormatter = function pieLegendFormatte
|
|
|
73
74
|
speed: speed,
|
|
74
75
|
style: _objectSpread(_objectSpread({
|
|
75
76
|
width: maxWidth,
|
|
76
|
-
marginLeft:
|
|
77
|
+
marginLeft: textMarginLeft
|
|
77
78
|
}, (0, _utils.getFontStyle)(nameFont)), {}, {
|
|
78
79
|
transform: "translate(".concat(nameX, "px, ").concat(nameY, "px)")
|
|
79
80
|
})
|
package/package.json
CHANGED
package/src/components/Band.tsx
CHANGED
|
@@ -131,13 +131,15 @@ export default memo(
|
|
|
131
131
|
}
|
|
132
132
|
const positionX = xScaler(x) - step / 2 + seriesStart + index * seriesStep;
|
|
133
133
|
|
|
134
|
-
let showHead, headUrl, headWidth, headHeight, headTranslate;
|
|
134
|
+
let showHead, headType, headUrl, headVideo, headWidth, headHeight, headTranslate;
|
|
135
135
|
if (headDecorate) {
|
|
136
136
|
(showHead = headDecorate.show),
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
(headType = headDecorate.headType),
|
|
138
|
+
(headUrl = headDecorate.url),
|
|
139
|
+
(headVideo = headDecorate.video),
|
|
140
|
+
(headWidth = headDecorate.size.width),
|
|
141
|
+
(headHeight = headDecorate.size.height),
|
|
142
|
+
(headTranslate = headDecorate.translate);
|
|
141
143
|
}
|
|
142
144
|
//断轴图相关,将柱形在断轴处切开
|
|
143
145
|
const setClipPath = () => {
|
|
@@ -205,8 +207,8 @@ export default memo(
|
|
|
205
207
|
}}
|
|
206
208
|
data-data={JSON.stringify(data)}
|
|
207
209
|
>
|
|
208
|
-
{headUrl && showHead && (
|
|
209
|
-
|
|
210
|
+
{(headUrl || headVideo) && showHead && (
|
|
211
|
+
headType=="image"?<div
|
|
210
212
|
style={{
|
|
211
213
|
position: "absolute",
|
|
212
214
|
background: `url(${
|
|
@@ -220,7 +222,21 @@ export default memo(
|
|
|
220
222
|
zIndex: 1,
|
|
221
223
|
transform: `translate(calc(-50% + ${headTranslate.x}px), calc(-50% + ${headTranslate.y}px))`,
|
|
222
224
|
}}
|
|
223
|
-
></div
|
|
225
|
+
></div>:<video
|
|
226
|
+
width={headWidth} height={headHeight}
|
|
227
|
+
//@ts-ignore
|
|
228
|
+
src={window.appConfig.ASSETS_URL + headVideo}
|
|
229
|
+
// controls={true}
|
|
230
|
+
muted={true}
|
|
231
|
+
autoPlay={true}
|
|
232
|
+
style={{
|
|
233
|
+
position: "absolute",
|
|
234
|
+
left: isVertical ? "100%" : "50%",
|
|
235
|
+
top: isVertical ? "50%" : "0",
|
|
236
|
+
zIndex: 1,
|
|
237
|
+
transform: `translate(calc(-50% + ${headTranslate.x}px), calc(-50% + ${headTranslate.y}px))`,
|
|
238
|
+
}}
|
|
239
|
+
></video>
|
|
224
240
|
)}
|
|
225
241
|
<div
|
|
226
242
|
style={{
|
package/src/components/Legend.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 图例
|
|
3
3
|
*/
|
|
4
|
-
import React, { memo, useCallback } from 'react';
|
|
4
|
+
import React, { memo, useCallback, useState, useEffect, useRef } from 'react';
|
|
5
5
|
import { getIcon, sortPie } from '../utils';
|
|
6
6
|
import TextOverflow from './TextOverflow';
|
|
7
7
|
|
|
@@ -27,6 +27,7 @@ export default memo(
|
|
|
27
27
|
gridGap: { gridColumnGap, gridRowGap },
|
|
28
28
|
translate: { x, y },
|
|
29
29
|
},
|
|
30
|
+
loop = {},
|
|
30
31
|
font: { italic, bold, ...font } = defaultFont,
|
|
31
32
|
unselect: { opacity = 1 } = {},
|
|
32
33
|
},
|
|
@@ -35,6 +36,49 @@ export default memo(
|
|
|
35
36
|
judge
|
|
36
37
|
}) => {
|
|
37
38
|
if (!show) return null;
|
|
39
|
+
|
|
40
|
+
const ref_container = useRef(null); // 滚动容器
|
|
41
|
+
const ref_scrollTop = useRef(0); // 当前滚动距离
|
|
42
|
+
|
|
43
|
+
const [scrollStep, setScrollStep] = useState(0); // 行高度
|
|
44
|
+
|
|
45
|
+
// 初始化行高
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (ref_container.current) {
|
|
48
|
+
const rowHeight = ref_container.current.querySelector('li').clientHeight + gridRowGap;
|
|
49
|
+
setScrollStep(rowHeight);
|
|
50
|
+
}
|
|
51
|
+
}, [gridRowGap]);
|
|
52
|
+
|
|
53
|
+
// 启动自动滚动定时器
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (!loop.show) return;
|
|
56
|
+
|
|
57
|
+
ref_scrollTop.current = 0;
|
|
58
|
+
|
|
59
|
+
const timer = setInterval(() => {
|
|
60
|
+
handleAutoScroll();
|
|
61
|
+
}, loop.interval * 1000); // 每隔3秒滚动一次
|
|
62
|
+
|
|
63
|
+
// 清除定时器
|
|
64
|
+
return () => clearInterval(timer);
|
|
65
|
+
}, [scrollStep, loop.show, loop.interval])
|
|
66
|
+
|
|
67
|
+
const handleAutoScroll = () => {
|
|
68
|
+
const table = ref_container.current;
|
|
69
|
+
if (!table) return;
|
|
70
|
+
|
|
71
|
+
// 如果已经滚动到了底部,则返回顶部
|
|
72
|
+
if (ref_scrollTop.current + table.clientHeight >= table.scrollHeight) {
|
|
73
|
+
ref_scrollTop.current = 0;
|
|
74
|
+
} else {
|
|
75
|
+
// 否则,滚动一行的高度
|
|
76
|
+
ref_scrollTop.current += scrollStep;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
table.scrollTo({ top: ref_scrollTop.current, behavior: 'smooth' });
|
|
80
|
+
};
|
|
81
|
+
|
|
38
82
|
const _series = sortPie(series, order);
|
|
39
83
|
const [_alignment, position] = alignment.split(' ');
|
|
40
84
|
const length = _series.length;
|
|
@@ -59,11 +103,12 @@ export default memo(
|
|
|
59
103
|
className='__easyv-legend-wrapper'
|
|
60
104
|
style={{
|
|
61
105
|
position: 'absolute',
|
|
62
|
-
height: 'auto',
|
|
63
106
|
display: 'flex',
|
|
64
|
-
|
|
65
|
-
|
|
107
|
+
...getPosition(position, _alignment, x, y),
|
|
108
|
+
height: loop.show ? loop.height : 'auto',
|
|
109
|
+
overflowY: loop.show ? 'scroll' : 'auto',
|
|
66
110
|
}}
|
|
111
|
+
ref={ref_container}
|
|
67
112
|
>
|
|
68
113
|
<ul
|
|
69
114
|
style={{
|
|
@@ -112,55 +157,33 @@ export default memo(
|
|
|
112
157
|
}
|
|
113
158
|
);
|
|
114
159
|
|
|
115
|
-
const getPosition = (position, alignment) => {
|
|
160
|
+
const getPosition = (position, alignment, x = 0, y = 0) => {
|
|
116
161
|
switch (position) {
|
|
117
162
|
case 'top':
|
|
118
163
|
return {
|
|
119
|
-
left:
|
|
120
|
-
right:
|
|
164
|
+
left: alignment == 'left' ? 5 : alignment == 'center' ? '50%' : '',
|
|
165
|
+
right: alignment == 'right' ? 10 : '',
|
|
121
166
|
top: 5,
|
|
122
|
-
|
|
123
|
-
alignment === 'center'
|
|
124
|
-
? 'center'
|
|
125
|
-
: alignment === 'left'
|
|
126
|
-
? 'flex-start'
|
|
127
|
-
: 'flex-end',
|
|
167
|
+
transform: `translate3d(calc(${alignment == 'center' ? '-50%' : '0px'} + ${x}px), ${y}px, 0px)`
|
|
128
168
|
};
|
|
129
169
|
case 'right':
|
|
130
170
|
return {
|
|
131
|
-
top:
|
|
132
|
-
bottom: 0,
|
|
171
|
+
top: '50%',
|
|
133
172
|
right: 10,
|
|
134
|
-
|
|
135
|
-
alignment === 'center'
|
|
136
|
-
? 'center'
|
|
137
|
-
: alignment === 'left'
|
|
138
|
-
? 'flex-start'
|
|
139
|
-
: 'flex-end',
|
|
173
|
+
transform: `translate3d(${x}px, calc(-50% + ${y}px), 0px)`
|
|
140
174
|
};
|
|
141
175
|
case 'left':
|
|
142
176
|
return {
|
|
143
|
-
top:
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
alignItems:
|
|
147
|
-
alignment === 'center'
|
|
148
|
-
? 'center'
|
|
149
|
-
: alignment === 'left'
|
|
150
|
-
? 'flex-start'
|
|
151
|
-
: 'flex-end',
|
|
177
|
+
top: '50%',
|
|
178
|
+
left: 5,
|
|
179
|
+
transform: `translate3d(${x}px, calc(-50% + ${y}px), 0px)`
|
|
152
180
|
};
|
|
153
|
-
default:
|
|
181
|
+
default: // bottom
|
|
154
182
|
return {
|
|
155
|
-
left:
|
|
156
|
-
right:
|
|
183
|
+
left: alignment == 'left' ? 5 : alignment == 'center' ? '50%' : '',
|
|
184
|
+
right: alignment == 'right' ? 10 : '',
|
|
157
185
|
bottom: 5,
|
|
158
|
-
|
|
159
|
-
alignment === 'center'
|
|
160
|
-
? 'center'
|
|
161
|
-
: alignment === 'left'
|
|
162
|
-
? 'flex-start'
|
|
163
|
-
: 'flex-end',
|
|
186
|
+
transform: `translate3d(calc(${alignment == 'center' ? '-50%' : '0px'} + ${x}px), ${y}px, 0px)`
|
|
164
187
|
};
|
|
165
188
|
}
|
|
166
189
|
};
|
package/src/formatter/legend.js
CHANGED
|
@@ -43,6 +43,8 @@ export const pieLegendFormatter = (
|
|
|
43
43
|
} = seriesColor;
|
|
44
44
|
|
|
45
45
|
const _color = seriesColorType == 'pure' ? pure : stops[0].color;
|
|
46
|
+
const textMarginLeft = 5;
|
|
47
|
+
|
|
46
48
|
return (
|
|
47
49
|
<>
|
|
48
50
|
{icon &&<span style={{ ...icon, marginRight: icon.marginRight, transform:`translate(${nameX}px, ${nameY}px)` }} />}
|
|
@@ -53,12 +55,12 @@ export const pieLegendFormatter = (
|
|
|
53
55
|
: css.notShowAllStyle
|
|
54
56
|
}
|
|
55
57
|
style={{
|
|
56
|
-
width:`calc( 100% + ${valueGap+percentGap}px )`
|
|
58
|
+
width:`calc( 100% + ${textMarginLeft+valueGap+percentGap}px )`
|
|
57
59
|
}}
|
|
58
60
|
>
|
|
59
61
|
{showName && (
|
|
60
62
|
<TextOverflow value={displayName} type={textOverflow} speed={speed} style={{
|
|
61
|
-
width:maxWidth, marginLeft:
|
|
63
|
+
width:maxWidth, marginLeft: textMarginLeft, ...getFontStyle(nameFont), transform:`translate(${nameX}px, ${nameY}px)`
|
|
62
64
|
}}></TextOverflow>
|
|
63
65
|
)}
|
|
64
66
|
{showValue && (
|
package/.husky/commit-msg
DELETED