@visactor/vchart 1.9.6-alpha.2 → 1.9.6-alpha.4
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/build/es5/index.js +1 -1
- package/build/index.js +15 -11
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/stack.js +1 -2
- package/cjs/compile/grammar-item.js +2 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/esm/chart/stack.js +1 -2
- package/esm/compile/grammar-item.js +2 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/package.json +12 -12
package/build/index.js
CHANGED
|
@@ -37514,14 +37514,14 @@
|
|
|
37514
37514
|
}));
|
|
37515
37515
|
}
|
|
37516
37516
|
eventPosToStagePos(e) {
|
|
37517
|
-
var _a, _b;
|
|
37517
|
+
var _a, _b, _c, _d, _e, _f;
|
|
37518
37518
|
const {
|
|
37519
37519
|
x: x,
|
|
37520
37520
|
y: y
|
|
37521
|
-
} = vglobal.mapToCanvasPoint(e, this.stage.window.getContext().canvas.nativeCanvas);
|
|
37521
|
+
} = vglobal.mapToCanvasPoint(e, null === (_d = null === (_c = null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.window) || void 0 === _b ? void 0 : _b.getContext()) || void 0 === _c ? void 0 : _c.canvas) || void 0 === _d ? void 0 : _d.nativeCanvas);
|
|
37522
37522
|
return {
|
|
37523
|
-
x: x - ((null === (
|
|
37524
|
-
y: y - ((null === (
|
|
37523
|
+
x: x - ((null === (_e = this.stage) || void 0 === _e ? void 0 : _e.x) || 0),
|
|
37524
|
+
y: y - ((null === (_f = this.stage) || void 0 === _f ? void 0 : _f.y) || 0)
|
|
37525
37525
|
};
|
|
37526
37526
|
}
|
|
37527
37527
|
_onHandlerPointerEnter(e) {
|
|
@@ -37919,15 +37919,21 @@
|
|
|
37919
37919
|
basePointEnd: basePointEnd
|
|
37920
37920
|
};
|
|
37921
37921
|
}
|
|
37922
|
-
|
|
37922
|
+
simplifyPoints(points) {
|
|
37923
37923
|
var _a;
|
|
37924
|
+
if (points.length > 1e4) {
|
|
37925
|
+
const tolerance = null !== (_a = this.attribute.tolerance) && void 0 !== _a ? _a : this._previewData.length / 1e4;
|
|
37926
|
+
return flatten_simplify(points, tolerance, !1);
|
|
37927
|
+
}
|
|
37928
|
+
return points;
|
|
37929
|
+
}
|
|
37930
|
+
getPreviewLinePoints() {
|
|
37924
37931
|
let previewPoints = this._previewData.map(d => ({
|
|
37925
37932
|
x: this._previewPointsX && this._previewPointsX(d),
|
|
37926
37933
|
y: this._previewPointsY && this._previewPointsY(d)
|
|
37927
37934
|
}));
|
|
37928
37935
|
if (0 === previewPoints.length) return previewPoints;
|
|
37929
|
-
|
|
37930
|
-
previewPoints = flatten_simplify(previewPoints, tolerance, !1);
|
|
37936
|
+
previewPoints = this.simplifyPoints(previewPoints);
|
|
37931
37937
|
const {
|
|
37932
37938
|
basePointStart: basePointStart,
|
|
37933
37939
|
basePointEnd: basePointEnd
|
|
@@ -37935,7 +37941,6 @@
|
|
|
37935
37941
|
return basePointStart.concat(previewPoints).concat(basePointEnd);
|
|
37936
37942
|
}
|
|
37937
37943
|
getPreviewAreaPoints() {
|
|
37938
|
-
var _a;
|
|
37939
37944
|
let previewPoints = this._previewData.map(d => ({
|
|
37940
37945
|
x: this._previewPointsX && this._previewPointsX(d),
|
|
37941
37946
|
y: this._previewPointsY && this._previewPointsY(d),
|
|
@@ -37943,8 +37948,7 @@
|
|
|
37943
37948
|
y1: this._previewPointsY1 && this._previewPointsY1(d)
|
|
37944
37949
|
}));
|
|
37945
37950
|
if (0 === previewPoints.length) return previewPoints;
|
|
37946
|
-
|
|
37947
|
-
previewPoints = flatten_simplify(previewPoints, tolerance, !1);
|
|
37951
|
+
previewPoints = this.simplifyPoints(previewPoints);
|
|
37948
37952
|
const {
|
|
37949
37953
|
basePointStart: basePointStart,
|
|
37950
37954
|
basePointEnd: basePointEnd
|
|
@@ -59952,7 +59956,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59952
59956
|
registerChartPlugin(MediaQuery);
|
|
59953
59957
|
};
|
|
59954
59958
|
|
|
59955
|
-
const version = "1.9.6-alpha.
|
|
59959
|
+
const version = "1.9.6-alpha.4";
|
|
59956
59960
|
|
|
59957
59961
|
const addVChartProperty = (data, op) => {
|
|
59958
59962
|
const context = op.beforeCall();
|