@easyv/charts 1.8.19 → 1.8.20
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.
|
@@ -66,7 +66,7 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
66
66
|
}
|
|
67
67
|
return (0, _utils.getTranslate3d)(translate3d);
|
|
68
68
|
}, [width, height, marginLeft, marginTop, position, tipWidth, tipHeight, translateTip]);
|
|
69
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
return manual ? /*#__PURE__*/React.createElement("div", {
|
|
70
70
|
className: "__easyv-tooltip",
|
|
71
71
|
style: _objectSpread({
|
|
72
72
|
pointerEvents: 'none',
|
|
@@ -154,5 +154,5 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
154
154
|
transform: (0, _utils.getTranslate3d)(suffixTranslate)
|
|
155
155
|
})
|
|
156
156
|
}, tmp.get(s))));
|
|
157
|
-
}))));
|
|
157
|
+
})))) : "";
|
|
158
158
|
});
|
package/lib/utils/index.js
CHANGED
|
@@ -294,7 +294,8 @@ var getFontStyle = exports.getFontStyle = function getFontStyle(_ref7, type) {
|
|
|
294
294
|
italic = _ref7.italic,
|
|
295
295
|
fontSize = _ref7.fontSize,
|
|
296
296
|
fontFamily = _ref7.fontFamily,
|
|
297
|
-
letterSpacing = _ref7.letterSpacing
|
|
297
|
+
letterSpacing = _ref7.letterSpacing,
|
|
298
|
+
lineHeight = _ref7.lineHeight;
|
|
298
299
|
if (type == 'svg') {
|
|
299
300
|
return {
|
|
300
301
|
fontSize: fontSize,
|
|
@@ -302,7 +303,8 @@ var getFontStyle = exports.getFontStyle = function getFontStyle(_ref7, type) {
|
|
|
302
303
|
letterSpacing: letterSpacing,
|
|
303
304
|
fill: color,
|
|
304
305
|
fontWeight: bold ? 'bold' : 'normal',
|
|
305
|
-
fontStyle: italic ? 'italic' : 'normal'
|
|
306
|
+
fontStyle: italic ? 'italic' : 'normal',
|
|
307
|
+
lineHeight: lineHeight + "px"
|
|
306
308
|
};
|
|
307
309
|
}
|
|
308
310
|
return {
|
|
@@ -311,7 +313,8 @@ var getFontStyle = exports.getFontStyle = function getFontStyle(_ref7, type) {
|
|
|
311
313
|
letterSpacing: letterSpacing,
|
|
312
314
|
color: color,
|
|
313
315
|
fontWeight: bold ? 'bold' : 'normal',
|
|
314
|
-
fontStyle: italic ? 'italic' : 'normal'
|
|
316
|
+
fontStyle: italic ? 'italic' : 'normal',
|
|
317
|
+
lineHeight: lineHeight + "px" //不加px默认是倍数关系
|
|
315
318
|
};
|
|
316
319
|
};
|
|
317
320
|
var formatFont = exports.formatFont = function formatFont(_ref8, type) {
|
package/package.json
CHANGED
|
@@ -64,7 +64,7 @@ export default memo(
|
|
|
64
64
|
translateTip,
|
|
65
65
|
]);
|
|
66
66
|
return (
|
|
67
|
-
|
|
67
|
+
manual?<div
|
|
68
68
|
className='__easyv-tooltip'
|
|
69
69
|
style={{
|
|
70
70
|
pointerEvents: 'none',
|
|
@@ -175,7 +175,7 @@ export default memo(
|
|
|
175
175
|
|
|
176
176
|
</div>
|
|
177
177
|
)}
|
|
178
|
-
</div
|
|
178
|
+
</div>:""
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
181
|
);
|
package/src/types/index.d.ts
CHANGED
package/src/utils/index.js
CHANGED
|
@@ -265,7 +265,7 @@ const getMousePos = (evt, dom) => {
|
|
|
265
265
|
};
|
|
266
266
|
|
|
267
267
|
const getFontStyle = (
|
|
268
|
-
{ color, bold, italic, fontSize, fontFamily, letterSpacing },
|
|
268
|
+
{ color, bold, italic, fontSize, fontFamily, letterSpacing,lineHeight },
|
|
269
269
|
type
|
|
270
270
|
) => {
|
|
271
271
|
if (type == 'svg') {
|
|
@@ -276,6 +276,7 @@ const getFontStyle = (
|
|
|
276
276
|
fill: color,
|
|
277
277
|
fontWeight: bold ? 'bold' : 'normal',
|
|
278
278
|
fontStyle: italic ? 'italic' : 'normal',
|
|
279
|
+
lineHeight:lineHeight+"px"
|
|
279
280
|
};
|
|
280
281
|
}
|
|
281
282
|
return {
|
|
@@ -285,6 +286,7 @@ const getFontStyle = (
|
|
|
285
286
|
color,
|
|
286
287
|
fontWeight: bold ? 'bold' : 'normal',
|
|
287
288
|
fontStyle: italic ? 'italic' : 'normal',
|
|
289
|
+
lineHeight:lineHeight+"px"//不加px默认是倍数关系
|
|
288
290
|
};
|
|
289
291
|
};
|
|
290
292
|
const formatFont=({ color, fill, bold, italic, ...rest },
|