@easyv/charts 1.9.7 → 1.9.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/components/Band.js
CHANGED
|
@@ -55,15 +55,15 @@ var getAttr = function getAttr(_ref) {
|
|
|
55
55
|
var len = length ? length : 0.1; //柱子长度
|
|
56
56
|
if (isVertical) {
|
|
57
57
|
return {
|
|
58
|
-
width: len,
|
|
59
|
-
height: seriesWidth,
|
|
58
|
+
width: Math.max(0, len),
|
|
59
|
+
height: Math.max(0, seriesWidth),
|
|
60
60
|
x: y,
|
|
61
61
|
y: x,
|
|
62
62
|
bgAttr: {
|
|
63
63
|
x: 0,
|
|
64
64
|
y: x,
|
|
65
|
-
width: len + x,
|
|
66
|
-
height: seriesWidth
|
|
65
|
+
width: Math.max(0, len + x),
|
|
66
|
+
height: Math.max(0, seriesWidth)
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
} else {
|
|
@@ -75,8 +75,8 @@ var getAttr = function getAttr(_ref) {
|
|
|
75
75
|
bgAttr: {
|
|
76
76
|
x: x,
|
|
77
77
|
y: 0,
|
|
78
|
-
width: seriesWidth,
|
|
79
|
-
height: y + len
|
|
78
|
+
width: Math.max(0, seriesWidth),
|
|
79
|
+
height: Math.max(0, y + len)
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
}
|
package/lib/components/Legend.js
CHANGED
|
@@ -242,7 +242,6 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
242
242
|
}, _series.map(function (series, i) {
|
|
243
243
|
if (Math.floor(i / gridTemplateColumns) == indexs) {
|
|
244
244
|
var _series$config2;
|
|
245
|
-
console.log("series", series);
|
|
246
245
|
var type = series.type,
|
|
247
246
|
name = series.name,
|
|
248
247
|
displayName = series.displayName,
|
package/lib/formatter/legend.js
CHANGED
|
@@ -88,6 +88,7 @@ var pieLegendFormatter = exports.pieLegendFormatter = function pieLegendFormatte
|
|
|
88
88
|
})
|
|
89
89
|
}), showValue && /*#__PURE__*/React.createElement("span", {
|
|
90
90
|
style: _objectSpread(_objectSpread({
|
|
91
|
+
display: "flex",
|
|
91
92
|
whiteSpace: "nowrap"
|
|
92
93
|
}, (0, _utils.getFontStyle)(valueFont)), {}, {
|
|
93
94
|
marginLeft: valueGap,
|
package/package.json
CHANGED
package/src/components/Band.tsx
CHANGED
|
@@ -40,15 +40,15 @@ const getAttr = ({
|
|
|
40
40
|
const len = length ? length : 0.1; //柱子长度
|
|
41
41
|
if (isVertical) {
|
|
42
42
|
return {
|
|
43
|
-
width: len,
|
|
44
|
-
height: seriesWidth,
|
|
43
|
+
width: Math.max(0,len),
|
|
44
|
+
height: Math.max(0,seriesWidth),
|
|
45
45
|
x: y,
|
|
46
46
|
y: x,
|
|
47
47
|
bgAttr: {
|
|
48
48
|
x: 0,
|
|
49
49
|
y: x,
|
|
50
|
-
width: len + x,
|
|
51
|
-
height: seriesWidth,
|
|
50
|
+
width: Math.max(0,len + x),
|
|
51
|
+
height: Math.max(0,seriesWidth),
|
|
52
52
|
},
|
|
53
53
|
};
|
|
54
54
|
} else {
|
|
@@ -60,8 +60,8 @@ const getAttr = ({
|
|
|
60
60
|
bgAttr: {
|
|
61
61
|
x,
|
|
62
62
|
y: 0,
|
|
63
|
-
width: seriesWidth,
|
|
64
|
-
height: y + len,
|
|
63
|
+
width: Math.max(0,seriesWidth),
|
|
64
|
+
height: Math.max(0,y + len),
|
|
65
65
|
},
|
|
66
66
|
};
|
|
67
67
|
}
|
package/src/components/Legend.js
CHANGED
|
@@ -281,8 +281,6 @@ export default memo(
|
|
|
281
281
|
>
|
|
282
282
|
{_series.map((series, i) => {
|
|
283
283
|
if (Math.floor(i / gridTemplateColumns) == indexs) {
|
|
284
|
-
console.log("series",series);
|
|
285
|
-
|
|
286
284
|
const { type, name, displayName,fieldName, icon, selected, index } =
|
|
287
285
|
series;
|
|
288
286
|
const _icon = getIcon(type, icon, series?.config?.line?.type);
|