@easyv/charts 1.4.11 → 1.4.13
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
|
@@ -97,6 +97,7 @@ var _default = /*#__PURE__*/(0, _react.memo)(function (_ref3) {
|
|
|
97
97
|
url = _ref3$config.url,
|
|
98
98
|
size = _ref3$config.size,
|
|
99
99
|
fill = _ref3$config.fill,
|
|
100
|
+
border = _ref3$config.border,
|
|
100
101
|
opacity = _ref3$config.opacity,
|
|
101
102
|
_ref3$config$highligh = _ref3$config.highlight,
|
|
102
103
|
showHighlight = _ref3$config$highligh.show,
|
|
@@ -126,6 +127,7 @@ var _default = /*#__PURE__*/(0, _react.memo)(function (_ref3) {
|
|
|
126
127
|
var _data = showHighlight ? getHighlightData(data, extent) : data;
|
|
127
128
|
|
|
128
129
|
var isVertical = direction === 'vertical';
|
|
130
|
+
var borderStr = "".concat(border.borderColor, " solid ").concat(border.borderWidth, "px");
|
|
129
131
|
return /*#__PURE__*/_react["default"].createElement("g", {
|
|
130
132
|
className: "__easyv-band"
|
|
131
133
|
}, _data.map(function (_ref4, i) {
|
|
@@ -180,7 +182,7 @@ var _default = /*#__PURE__*/(0, _react.memo)(function (_ref3) {
|
|
|
180
182
|
transform: "translate(calc(-50% + ".concat(headTranslate.x, "px), calc(-50% + ").concat(headTranslate.y, "px))")
|
|
181
183
|
}
|
|
182
184
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
183
|
-
style: {
|
|
185
|
+
style: _objectSpread({
|
|
184
186
|
width: '100%',
|
|
185
187
|
height: '100%',
|
|
186
188
|
|
|
@@ -193,7 +195,15 @@ var _default = /*#__PURE__*/(0, _react.memo)(function (_ref3) {
|
|
|
193
195
|
positive: y > 0,
|
|
194
196
|
seriesWidth: seriesWidth
|
|
195
197
|
})
|
|
196
|
-
}
|
|
198
|
+
}, isVertical ? {
|
|
199
|
+
borderTop: borderStr,
|
|
200
|
+
borderRight: borderStr,
|
|
201
|
+
borderBottom: borderStr
|
|
202
|
+
} : {
|
|
203
|
+
borderTop: borderStr,
|
|
204
|
+
borderRight: borderStr,
|
|
205
|
+
borderLeft: borderStr
|
|
206
|
+
})
|
|
197
207
|
}));
|
|
198
208
|
}));
|
|
199
209
|
});
|
|
@@ -175,7 +175,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
175
175
|
style: isVertical ? {
|
|
176
176
|
width: xLineRange + marginRight + marginLeft,
|
|
177
177
|
height: yLineRange,
|
|
178
|
-
transform: "translateX(".concat(-
|
|
178
|
+
transform: "translateX(".concat(-marginRight, "px)")
|
|
179
179
|
} : {
|
|
180
180
|
width: xLineRange,
|
|
181
181
|
height: yLineRange + marginTop + marginBottom,
|
package/package.json
CHANGED
package/src/components/Band.tsx
CHANGED
|
@@ -76,6 +76,7 @@ export default memo(
|
|
|
76
76
|
url,
|
|
77
77
|
size,
|
|
78
78
|
fill,
|
|
79
|
+
border,
|
|
79
80
|
opacity,
|
|
80
81
|
highlight: { show: showHighlight, extent, fill: highlightFill },
|
|
81
82
|
headDecorate
|
|
@@ -97,6 +98,7 @@ export default memo(
|
|
|
97
98
|
const _data = showHighlight ? getHighlightData(data, extent) : data;
|
|
98
99
|
|
|
99
100
|
const isVertical = direction === 'vertical';
|
|
101
|
+
const borderStr = `${border.borderColor} solid ${border.borderWidth}px`;
|
|
100
102
|
return (
|
|
101
103
|
<g className='__easyv-band'>
|
|
102
104
|
{_data.map(
|
|
@@ -181,6 +183,15 @@ export default memo(
|
|
|
181
183
|
positive: y > 0,
|
|
182
184
|
seriesWidth,
|
|
183
185
|
}),
|
|
186
|
+
...(isVertical?{
|
|
187
|
+
borderTop:borderStr,
|
|
188
|
+
borderRight:borderStr,
|
|
189
|
+
borderBottom:borderStr
|
|
190
|
+
}:{
|
|
191
|
+
borderTop:borderStr,
|
|
192
|
+
borderRight:borderStr,
|
|
193
|
+
borderLeft:borderStr
|
|
194
|
+
})
|
|
184
195
|
}}
|
|
185
196
|
/>
|
|
186
197
|
</foreignObject>
|
|
@@ -160,7 +160,7 @@ const Chart = memo(
|
|
|
160
160
|
<foreignObject style={isVertical?{
|
|
161
161
|
width:xLineRange+marginRight+marginLeft,
|
|
162
162
|
height:yLineRange,
|
|
163
|
-
transform:`translateX(${-
|
|
163
|
+
transform:`translateX(${-marginRight}px)`,
|
|
164
164
|
}:{
|
|
165
165
|
width:xLineRange,
|
|
166
166
|
height:yLineRange+marginTop+marginBottom,
|