@easyv/charts 1.5.23 → 1.5.24
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.
|
@@ -275,6 +275,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
275
275
|
controlEl.current.style.transform = "translate(".concat(cBarX, "px,0)"); //计算出当前位移的百分比
|
|
276
276
|
|
|
277
277
|
var percent = cBarX / (cWidth - cBarWidth);
|
|
278
|
+
percent = isNaN(percent) ? 1 : percent;
|
|
278
279
|
var translateX = -(controlEnd + start / cPercent - chartWidth) * percent;
|
|
279
280
|
curControlPercent.current = percent;
|
|
280
281
|
seriesEl.current.style.transform = "translate(".concat(translateX, "px,").concat(marginTop, "px)");
|
package/package.json
CHANGED
|
@@ -236,7 +236,8 @@ const Chart = memo(
|
|
|
236
236
|
if(controlEl.current){
|
|
237
237
|
controlEl.current.style.transform = `translate(${cBarX}px,0)`;
|
|
238
238
|
//计算出当前位移的百分比
|
|
239
|
-
|
|
239
|
+
let percent = cBarX / (cWidth - cBarWidth);
|
|
240
|
+
percent = isNaN(percent)?1:percent;
|
|
240
241
|
const translateX = -(controlEnd + start/cPercent - chartWidth) * percent;
|
|
241
242
|
curControlPercent.current = percent;
|
|
242
243
|
seriesEl.current.style.transform = `translate(${translateX}px,${marginTop}px)`;
|
|
@@ -539,7 +540,6 @@ const Chart = memo(
|
|
|
539
540
|
height={height}
|
|
540
541
|
/>
|
|
541
542
|
)}
|
|
542
|
-
|
|
543
543
|
{showCtl && !!control && (
|
|
544
544
|
<Tooltip
|
|
545
545
|
isVertical={isVertical}
|