@easyv/charts 1.4.5 → 1.4.6

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.
@@ -174,7 +174,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref) {
174
174
  style: isVertical ? {
175
175
  width: xLineRange + marginRight,
176
176
  height: yLineRange,
177
- paddingRight: marginRight
177
+ transform: "translateX(".concat(-marginRight, "px)")
178
178
  } : {
179
179
  width: xLineRange,
180
180
  height: yLineRange + marginTop,
@@ -186,7 +186,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref) {
186
186
  height: "100%",
187
187
  style: {
188
188
  overflow: "visible",
189
- transform: "translateY(".concat(marginTop, "px)")
189
+ transform: isVertical ? "translateX(".concat(marginRight, "px)") : "translateY(".concat(marginTop, "px)")
190
190
  }
191
191
  }, series.map(function (_ref2, index) {
192
192
  var Component = _ref2.Component,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/charts",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -159,14 +159,14 @@ const Chart = memo(
159
159
  <foreignObject style={isVertical?{
160
160
  width:xLineRange+marginRight,
161
161
  height:yLineRange,
162
- paddingRight:marginRight
162
+ transform:`translateX(${-marginRight}px)`,
163
163
  }:{
164
164
  width:xLineRange,
165
165
  height:yLineRange+marginTop,
166
166
  transform:`translateY(${-marginTop}px)`,
167
167
  // paddingTop:marginTop
168
168
  }}>
169
- <svg width="100%" height="100%" style={{overflow:"visible",transform:`translateY(${marginTop}px)`}}>
169
+ <svg width="100%" height="100%" style={{overflow:"visible",transform:isVertical?`translateX(${marginRight}px)`:`translateY(${marginTop}px)`}}>
170
170
  {series.map(({ Component, yOrZ, ...config }, index) => {
171
171
  const yAxis = axes.get(yOrZ);
172
172
  return (