@visactor/vchart 1.6.4 → 1.6.5
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 +28 -15
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/compile/grammar-item.js +1 -2
- package/cjs/constant/polar.js +2 -1
- package/cjs/constant/scroll-bar.js +1 -2
- package/cjs/core/factory.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/cjs/event/event.js +1 -2
- package/cjs/event/events/dimension/base.d.ts +1 -0
- package/cjs/event/events/dimension/base.js +10 -6
- package/cjs/event/events/dimension/base.js.map +1 -1
- package/cjs/interaction/interaction.js +2 -1
- package/esm/compile/grammar-item.js +1 -2
- package/esm/constant/polar.js +2 -1
- package/esm/constant/scroll-bar.js +1 -2
- package/esm/core/factory.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/esm/event/event.js +1 -2
- package/esm/event/events/dimension/base.d.ts +1 -0
- package/esm/event/events/dimension/base.js +10 -6
- package/esm/event/events/dimension/base.js.map +1 -1
- package/esm/interaction/interaction.js +2 -1
- package/package.json +14 -14
package/build/index.js
CHANGED
|
@@ -647,17 +647,17 @@
|
|
|
647
647
|
function objectKeys(obj) {
|
|
648
648
|
return Object.keys(obj);
|
|
649
649
|
}
|
|
650
|
-
function isEqual$1(a, b) {
|
|
650
|
+
function isEqual$1(a, b, options) {
|
|
651
651
|
if (a === b) return !0;
|
|
652
652
|
if (typeof a != typeof b) return !1;
|
|
653
653
|
if (null == a || null == b) return !1;
|
|
654
654
|
if (Number.isNaN(a) && Number.isNaN(b)) return !0;
|
|
655
655
|
if (objToString(a) !== objToString(b)) return !1;
|
|
656
|
-
if (isFunction$1(a)) return
|
|
656
|
+
if (isFunction$1(a)) return !!(null == options ? void 0 : options.skipFunction);
|
|
657
657
|
if ("object" != typeof a) return !1;
|
|
658
658
|
if (isArray$1(a)) {
|
|
659
659
|
if (a.length !== b.length) return !1;
|
|
660
|
-
for (let i = a.length - 1; i >= 0; i--) if (!isEqual$1(a[i], b[i])) return !1;
|
|
660
|
+
for (let i = a.length - 1; i >= 0; i--) if (!isEqual$1(a[i], b[i], options)) return !1;
|
|
661
661
|
return !0;
|
|
662
662
|
}
|
|
663
663
|
if (!isPlainObject$1(a)) return !1;
|
|
@@ -668,7 +668,7 @@
|
|
|
668
668
|
for (let i = ka.length - 1; i >= 0; i--) if (ka[i] != kb[i]) return !1;
|
|
669
669
|
for (let i = ka.length - 1; i >= 0; i--) {
|
|
670
670
|
const key = ka[i];
|
|
671
|
-
if (!isEqual$1(a[key], b[key])) return !1;
|
|
671
|
+
if (!isEqual$1(a[key], b[key], options)) return !1;
|
|
672
672
|
}
|
|
673
673
|
return !0;
|
|
674
674
|
}
|
|
@@ -26460,6 +26460,13 @@
|
|
|
26460
26460
|
getGraphicItem() {
|
|
26461
26461
|
return this.graphicItem;
|
|
26462
26462
|
}
|
|
26463
|
+
removeGraphicItem() {
|
|
26464
|
+
var _a, _b;
|
|
26465
|
+
this.graphicItem && (null === (_b = null === (_a = this.graphicItem.animates) || void 0 === _a ? void 0 : _a.forEach) || void 0 === _b || _b.call(_a, animate => animate.stop())), this.graphicItem && (removeGraphicItem(this.graphicItem), this.graphicItem[BridgeElementKey] = null, this.graphicItem = null);
|
|
26466
|
+
}
|
|
26467
|
+
resetGraphicItem() {
|
|
26468
|
+
this.graphicItem && (this.graphicItem = null);
|
|
26469
|
+
}
|
|
26463
26470
|
getBounds() {
|
|
26464
26471
|
var _a;
|
|
26465
26472
|
return null === (_a = this.graphicItem) || void 0 === _a ? void 0 : _a.AABBBounds;
|
|
@@ -26669,8 +26676,7 @@
|
|
|
26669
26676
|
this.graphicItem && (removeGraphicItem(this.graphicItem), this.graphicItem = null);
|
|
26670
26677
|
}
|
|
26671
26678
|
release() {
|
|
26672
|
-
|
|
26673
|
-
this.graphicItem && (null === (_b = null === (_a = this.graphicItem.animates) || void 0 === _a ? void 0 : _a.forEach) || void 0 === _b || _b.call(_a, animate => animate.stop())), this.mark = null, this.data = null, this.graphicItem && (removeGraphicItem(this.graphicItem), this.graphicItem[BridgeElementKey] = null, this.graphicItem = null), this.items = null;
|
|
26679
|
+
this.removeGraphicItem(), this.mark = null, this.data = null, this.items = null;
|
|
26674
26680
|
}
|
|
26675
26681
|
getItemAttribute(channel) {
|
|
26676
26682
|
var _a, _b;
|
|
@@ -45723,7 +45729,9 @@
|
|
|
45723
45729
|
}
|
|
45724
45730
|
removeAllGraphicItems() {
|
|
45725
45731
|
return this.traverseMarkTree(mark => {
|
|
45726
|
-
mark.graphicItem && removeGraphicItem(mark.graphicItem), mark.
|
|
45732
|
+
mark.graphicItem && (removeGraphicItem(mark.graphicItem), mark.elementMap.forEach(element => {
|
|
45733
|
+
element.resetGraphicItem();
|
|
45734
|
+
}), mark.graphicItem = null);
|
|
45727
45735
|
}), this;
|
|
45728
45736
|
}
|
|
45729
45737
|
parseSpec(spec) {
|
|
@@ -51594,23 +51602,28 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
51594
51602
|
|
|
51595
51603
|
class DimensionEvent {
|
|
51596
51604
|
constructor(eventDispatcher, mode) {
|
|
51597
|
-
var _a, _b;
|
|
51598
51605
|
this._eventDispatcher = eventDispatcher;
|
|
51599
51606
|
this._mode = mode;
|
|
51600
|
-
|
|
51607
|
+
}
|
|
51608
|
+
get chart() {
|
|
51609
|
+
var _a, _b;
|
|
51610
|
+
if (!this._chart) {
|
|
51611
|
+
this._chart = (_b = (_a = this._eventDispatcher.globalInstance).getChart) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
51612
|
+
}
|
|
51613
|
+
return this._chart;
|
|
51601
51614
|
}
|
|
51602
51615
|
register(eType, handler) {
|
|
51603
51616
|
var _a, _b;
|
|
51604
|
-
((_b = (_a = this.
|
|
51617
|
+
((_b = (_a = this.chart) === null || _a === void 0 ? void 0 : _a.getOption().onError) !== null && _b !== void 0 ? _b : error$1)('Method not implemented.');
|
|
51605
51618
|
}
|
|
51606
51619
|
unregister() {
|
|
51607
51620
|
var _a, _b;
|
|
51608
|
-
((_b = (_a = this.
|
|
51621
|
+
((_b = (_a = this.chart) === null || _a === void 0 ? void 0 : _a.getOption().onError) !== null && _b !== void 0 ? _b : error$1)('Method not implemented.');
|
|
51609
51622
|
}
|
|
51610
51623
|
getTargetDimensionInfo(x, y) {
|
|
51611
51624
|
var _a, _b;
|
|
51612
|
-
const cartesianInfo = (_a = getCartesianDimensionInfo(this.
|
|
51613
|
-
const polarInfo = (_b = getPolarDimensionInfo(this.
|
|
51625
|
+
const cartesianInfo = (_a = getCartesianDimensionInfo(this.chart, { x, y })) !== null && _a !== void 0 ? _a : [];
|
|
51626
|
+
const polarInfo = (_b = getPolarDimensionInfo(this.chart, { x, y })) !== null && _b !== void 0 ? _b : [];
|
|
51614
51627
|
const result = [].concat(cartesianInfo, polarInfo);
|
|
51615
51628
|
if (result.length === 0) {
|
|
51616
51629
|
return null;
|
|
@@ -51619,7 +51632,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
51619
51632
|
}
|
|
51620
51633
|
dispatch(v, opt) {
|
|
51621
51634
|
var _a;
|
|
51622
|
-
const axis = (_a = this.
|
|
51635
|
+
const axis = (_a = this.chart) === null || _a === void 0 ? void 0 : _a.getAllComponents().filter(c => {
|
|
51623
51636
|
if (c.specKey !== 'axes') {
|
|
51624
51637
|
return false;
|
|
51625
51638
|
}
|
|
@@ -58076,7 +58089,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58076
58089
|
};
|
|
58077
58090
|
registerVChartCore();
|
|
58078
58091
|
|
|
58079
|
-
const version = "1.6.
|
|
58092
|
+
const version = "1.6.5";
|
|
58080
58093
|
|
|
58081
58094
|
class ChartData {
|
|
58082
58095
|
get dataList() {
|