@easyv/charts 1.9.15 → 1.9.17
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
|
@@ -57,10 +57,10 @@ var getAttr = function getAttr(_ref) {
|
|
|
57
57
|
var len = length ? length : 0.1; //柱子长度
|
|
58
58
|
if (isVertical) {
|
|
59
59
|
return {
|
|
60
|
-
width:
|
|
61
|
-
height: Math.max(0, seriesWidth),
|
|
60
|
+
width: Math.max(0, len),
|
|
61
|
+
height: maxWidth ? Math.min(Math.max(0, seriesWidth), maxWidth) : Math.max(0, seriesWidth),
|
|
62
62
|
x: y,
|
|
63
|
-
y: x,
|
|
63
|
+
y: maxWidth ? seriesWidth > maxWidth ? x + (seriesWidth - maxWidth) / 2 : x : x,
|
|
64
64
|
bgAttr: {
|
|
65
65
|
x: 0,
|
|
66
66
|
y: x,
|
|
@@ -51,10 +51,10 @@ var getAttr = function getAttr(_ref) {
|
|
|
51
51
|
y = _ref.y,
|
|
52
52
|
maxWidth = _ref.maxWidth;
|
|
53
53
|
if (isVertical) return {
|
|
54
|
-
width:
|
|
55
|
-
height: seriesWidth,
|
|
54
|
+
width: length,
|
|
55
|
+
height: maxWidth ? Math.min(Math.max(0, seriesWidth), maxWidth) : Math.max(0, seriesWidth),
|
|
56
56
|
x: y,
|
|
57
|
-
y: x
|
|
57
|
+
y: maxWidth ? seriesWidth > maxWidth ? x + (seriesWidth - maxWidth) / 2 : x : x
|
|
58
58
|
};
|
|
59
59
|
return {
|
|
60
60
|
x: maxWidth ? seriesWidth > maxWidth ? x + (seriesWidth - maxWidth) / 2 : x : x,
|
package/package.json
CHANGED
package/src/components/Band.tsx
CHANGED
|
@@ -42,10 +42,16 @@ const getAttr = ({
|
|
|
42
42
|
const len = length ? length : 0.1; //柱子长度
|
|
43
43
|
if (isVertical) {
|
|
44
44
|
return {
|
|
45
|
-
width:
|
|
46
|
-
height:
|
|
45
|
+
width: Math.max(0, len),
|
|
46
|
+
height: maxWidth
|
|
47
|
+
? Math.min(Math.max(0, seriesWidth), maxWidth)
|
|
48
|
+
: Math.max(0, seriesWidth),
|
|
47
49
|
x: y,
|
|
48
|
-
y:
|
|
50
|
+
y: maxWidth
|
|
51
|
+
? seriesWidth > maxWidth
|
|
52
|
+
? x + (seriesWidth - maxWidth) / 2
|
|
53
|
+
: x
|
|
54
|
+
: x,
|
|
49
55
|
bgAttr: {
|
|
50
56
|
x: 0,
|
|
51
57
|
y: x,
|
|
@@ -41,12 +41,16 @@ const getAttr = ({
|
|
|
41
41
|
}) => {
|
|
42
42
|
if (isVertical)
|
|
43
43
|
return {
|
|
44
|
-
width:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
width: length,
|
|
45
|
+
height: maxWidth
|
|
46
|
+
? Math.min(Math.max(0, seriesWidth), maxWidth)
|
|
47
|
+
: Math.max(0, seriesWidth),
|
|
48
48
|
x: y,
|
|
49
|
-
y:
|
|
49
|
+
y: maxWidth
|
|
50
|
+
? seriesWidth > maxWidth
|
|
51
|
+
? x + (seriesWidth - maxWidth) / 2
|
|
52
|
+
: x
|
|
53
|
+
: x,
|
|
50
54
|
};
|
|
51
55
|
return {
|
|
52
56
|
x: maxWidth
|