@easyv/charts 1.3.38 → 1.4.0
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.
|
@@ -171,13 +171,22 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
171
171
|
key: index
|
|
172
172
|
}));
|
|
173
173
|
}), showTooltip && /*#__PURE__*/_react["default"].createElement(_.Indicator, (0, _extends2["default"])({}, indicator, indicatorAttr)), /*#__PURE__*/_react["default"].createElement("foreignObject", {
|
|
174
|
-
style: {
|
|
174
|
+
style: isVertical ? {
|
|
175
|
+
width: xLineRange + marginRight,
|
|
176
|
+
height: yLineRange,
|
|
177
|
+
paddingRight: marginRight
|
|
178
|
+
} : {
|
|
175
179
|
width: xLineRange,
|
|
176
|
-
height: yLineRange
|
|
180
|
+
height: yLineRange + marginTop,
|
|
181
|
+
transform: "translateY(".concat(-marginTop, "px)"),
|
|
182
|
+
paddingTop: marginTop
|
|
177
183
|
}
|
|
178
184
|
}, /*#__PURE__*/_react["default"].createElement("svg", {
|
|
179
185
|
width: "100%",
|
|
180
|
-
height: "100%"
|
|
186
|
+
height: "100%",
|
|
187
|
+
style: {
|
|
188
|
+
overflow: "visible"
|
|
189
|
+
}
|
|
181
190
|
}, series.map(function (_ref2, index) {
|
|
182
191
|
var Component = _ref2.Component,
|
|
183
192
|
yOrZ = _ref2.yOrZ,
|
package/lib/hooks/useAxes.js
CHANGED
|
@@ -116,7 +116,8 @@ var _default = function _default(_ref) {
|
|
|
116
116
|
|
|
117
117
|
var scaler = scales[type]().domain(newDomain).range(range);
|
|
118
118
|
scaler.type = type;
|
|
119
|
-
if (type !== 'ordinal') scaler.clamp(true);
|
|
119
|
+
if (type !== 'ordinal') scaler.clamp(true); //scaler.nice().clamp(true)
|
|
120
|
+
|
|
120
121
|
var allTicks = ticks ? ticks : scaler.ticks ? scaler.ticks(tickCount) : scaler.domain();
|
|
121
122
|
var _ticks = allTicks;
|
|
122
123
|
|
|
@@ -138,7 +139,6 @@ var _default = function _default(_ref) {
|
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
141
|
|
|
141
|
-
console.log(newDomain, _ticks, allTicks);
|
|
142
142
|
var lengthWithoutPaddingOuter = length - _paddingOuter;
|
|
143
143
|
|
|
144
144
|
if (type == 'linear' && config.on) {
|
package/package.json
CHANGED
|
@@ -155,13 +155,18 @@ const Chart = memo(
|
|
|
155
155
|
<Axis triggerClick={onInteraction} xLineRange={xLineRange} yLineRange={yLineRange} {...config} key={index} />
|
|
156
156
|
);
|
|
157
157
|
})}
|
|
158
|
-
|
|
159
158
|
{showTooltip && <Indicator {...indicator} {...indicatorAttr} />}
|
|
160
|
-
<foreignObject style={{
|
|
159
|
+
<foreignObject style={isVertical?{
|
|
160
|
+
width:xLineRange+marginRight,
|
|
161
|
+
height:yLineRange,
|
|
162
|
+
paddingRight:marginRight
|
|
163
|
+
}:{
|
|
161
164
|
width:xLineRange,
|
|
162
|
-
height:yLineRange
|
|
165
|
+
height:yLineRange+marginTop,
|
|
166
|
+
transform:`translateY(${-marginTop}px)`,
|
|
167
|
+
paddingTop:marginTop
|
|
163
168
|
}}>
|
|
164
|
-
<svg width="100%" height="100%">
|
|
169
|
+
<svg width="100%" height="100%" style={{overflow:"visible"}}>
|
|
165
170
|
{series.map(({ Component, yOrZ, ...config }, index) => {
|
|
166
171
|
const yAxis = axes.get(yOrZ);
|
|
167
172
|
return (
|