@visactor/vchart 2.0.17 → 2.0.19
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.es.js +129 -36
- package/build/index.js +129 -36
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/callback-disappear.js +2 -1
- package/cjs/animation/index.js +1 -2
- package/cjs/component/base/base-component.js +1 -1
- package/cjs/component/base/base-component.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.d.ts +9 -0
- package/cjs/component/data-zoom/data-filter-base-component.js +41 -5
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/player/player.d.ts +2 -0
- package/cjs/component/player/player.js +10 -5
- package/cjs/component/player/player.js.map +1 -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/core/vchart.js.map +1 -1
- package/cjs/mark/base/base-mark.js +2 -1
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/series/heatmap/heatmap.js +2 -1
- package/cjs/series/heatmap/heatmap.js.map +1 -1
- package/cjs/theme/builtin/common/series/heatmap.js +5 -0
- package/cjs/theme/builtin/common/series/heatmap.js.map +1 -1
- package/esm/animation/callback-disappear.js +2 -1
- package/esm/animation/index.js +1 -2
- package/esm/component/base/base-component.js +1 -1
- package/esm/component/base/base-component.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.d.ts +9 -0
- package/esm/component/data-zoom/data-filter-base-component.js +41 -6
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/player/player.d.ts +2 -0
- package/esm/component/player/player.js +9 -5
- package/esm/component/player/player.js.map +1 -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/core/vchart.js.map +1 -1
- package/esm/mark/base/base-mark.js +2 -1
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/series/heatmap/heatmap.js +2 -1
- package/esm/series/heatmap/heatmap.js.map +1 -1
- package/esm/theme/builtin/common/series/heatmap.js +5 -0
- package/esm/theme/builtin/common/series/heatmap.js.map +1 -1
- package/package.json +7 -7
package/build/index.js
CHANGED
|
@@ -9671,28 +9671,59 @@
|
|
|
9671
9671
|
}
|
|
9672
9672
|
addEventListener(type, listener, options) {
|
|
9673
9673
|
if (!listener) return;
|
|
9674
|
+
const capture = this._resolveCapture(options),
|
|
9675
|
+
once = this._resolveOnce(options),
|
|
9676
|
+
listenerTypeMap = this._getOrCreateListenerTypeMap(type),
|
|
9677
|
+
wrappedMap = this._getOrCreateWrappedMap(listenerTypeMap, listener);
|
|
9678
|
+
if (wrappedMap.has(capture)) return;
|
|
9674
9679
|
const wrappedListener = event => {
|
|
9675
9680
|
const transformedEvent = this._eventListenerTransformer(event);
|
|
9676
|
-
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
9681
|
+
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent), once && this._deleteListenerRecord(type, listener, capture);
|
|
9677
9682
|
};
|
|
9678
|
-
|
|
9683
|
+
wrappedMap.set(capture, {
|
|
9684
|
+
wrappedListener: wrappedListener,
|
|
9685
|
+
options: options
|
|
9686
|
+
}), this._nativeAddEventListener(type, wrappedListener, options);
|
|
9679
9687
|
}
|
|
9680
9688
|
removeEventListener(type, listener, options) {
|
|
9681
|
-
var _a;
|
|
9689
|
+
var _a, _b;
|
|
9682
9690
|
if (!listener) return;
|
|
9683
|
-
const
|
|
9684
|
-
|
|
9691
|
+
const capture = this._resolveCapture(options),
|
|
9692
|
+
wrappedRecord = null === (_b = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener)) || void 0 === _b ? void 0 : _b.get(capture);
|
|
9693
|
+
wrappedRecord && (this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture), this._deleteListenerRecord(type, listener, capture));
|
|
9685
9694
|
}
|
|
9686
9695
|
dispatchEvent(event) {
|
|
9687
9696
|
return this._nativeDispatchEvent(event);
|
|
9688
9697
|
}
|
|
9689
9698
|
clearAllEventListeners() {
|
|
9690
|
-
this._listenerMap.forEach((
|
|
9691
|
-
|
|
9692
|
-
|
|
9699
|
+
this._listenerMap.forEach((listenerMap, type) => {
|
|
9700
|
+
listenerMap.forEach(wrappedMap => {
|
|
9701
|
+
wrappedMap.forEach((wrappedRecord, capture) => {
|
|
9702
|
+
this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture);
|
|
9703
|
+
});
|
|
9693
9704
|
});
|
|
9694
9705
|
}), this._listenerMap.clear();
|
|
9695
9706
|
}
|
|
9707
|
+
_resolveCapture(options) {
|
|
9708
|
+
return "boolean" == typeof options ? options : !!(null == options ? void 0 : options.capture);
|
|
9709
|
+
}
|
|
9710
|
+
_resolveOnce(options) {
|
|
9711
|
+
return "object" == typeof options && !!(null == options ? void 0 : options.once);
|
|
9712
|
+
}
|
|
9713
|
+
_getOrCreateListenerTypeMap(type) {
|
|
9714
|
+
let listenerTypeMap = this._listenerMap.get(type);
|
|
9715
|
+
return listenerTypeMap || (listenerTypeMap = new Map(), this._listenerMap.set(type, listenerTypeMap)), listenerTypeMap;
|
|
9716
|
+
}
|
|
9717
|
+
_getOrCreateWrappedMap(listenerTypeMap, listener) {
|
|
9718
|
+
let wrappedMap = listenerTypeMap.get(listener);
|
|
9719
|
+
return wrappedMap || (wrappedMap = new Map(), listenerTypeMap.set(listener, wrappedMap)), wrappedMap;
|
|
9720
|
+
}
|
|
9721
|
+
_deleteListenerRecord(type, listener, capture) {
|
|
9722
|
+
const listenerTypeMap = this._listenerMap.get(type);
|
|
9723
|
+
if (!listenerTypeMap) return;
|
|
9724
|
+
const wrappedMap = listenerTypeMap.get(listener);
|
|
9725
|
+
wrappedMap && (wrappedMap.delete(capture), 0 === wrappedMap.size && listenerTypeMap.delete(listener), 0 === listenerTypeMap.size && this._listenerMap.delete(type));
|
|
9726
|
+
}
|
|
9696
9727
|
_nativeAddEventListener(type, listener, options) {
|
|
9697
9728
|
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
9698
9729
|
}
|
|
@@ -14037,7 +14068,9 @@
|
|
|
14037
14068
|
var _a;
|
|
14038
14069
|
if (event.manager !== this) throw new Error("It is illegal to free an event not managed by this EventManager!");
|
|
14039
14070
|
const constructor = event.constructor;
|
|
14040
|
-
this.eventPool.has(constructor) || this.eventPool.
|
|
14071
|
+
this.eventPool.has(constructor) || (this.eventPool.get(constructor).forEach(e => {
|
|
14072
|
+
e.eventPhase = event.NONE, e.currentTarget = null, e.path = [], e.detailPath = [], e.target = null;
|
|
14073
|
+
}), this.eventPool.set(constructor, [])), null === (_a = this.eventPool.get(constructor)) || void 0 === _a || _a.push(event);
|
|
14041
14074
|
}
|
|
14042
14075
|
notifyListeners(e, type) {
|
|
14043
14076
|
const listeners = e.currentTarget._events[type];
|
|
@@ -16679,7 +16712,7 @@
|
|
|
16679
16712
|
});
|
|
16680
16713
|
}
|
|
16681
16714
|
release() {
|
|
16682
|
-
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this);
|
|
16715
|
+
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this), super.release();
|
|
16683
16716
|
}
|
|
16684
16717
|
_emitCustomEvent(type, context) {
|
|
16685
16718
|
var _a, _b;
|
|
@@ -24342,12 +24375,12 @@
|
|
|
24342
24375
|
throw new Error("暂不支持");
|
|
24343
24376
|
}
|
|
24344
24377
|
release() {
|
|
24345
|
-
var _a, _b;
|
|
24378
|
+
var _a, _b, _d;
|
|
24346
24379
|
super.release(), this.hooks.beforeRender.unTap("constructor", this.beforeRender), this.hooks.afterRender.unTap("constructor", this.afterRender), this.eventSystem && this.eventSystem.release(), this.layerService.releaseStage(this), this.pluginService.release(), this.forEach(layer => {
|
|
24347
24380
|
layer.release();
|
|
24348
24381
|
}), this.interactiveLayer && (this.interactiveLayer.forEachChildren(item => {
|
|
24349
24382
|
item.setStage && item.setStage(null, null), this.interactiveLayer.removeChild(item);
|
|
24350
|
-
}), this.interactiveLayer.release()), this.window.release(), null === (_a = this._ticker) || void 0 === _a || _a.remTimeline(null == this ? void 0 : this.timeline), null === (_b = this._ticker) || void 0 === _b || _b.removeListener("tick", this.afterTickCb), this.renderService.renderTreeRoots = [];
|
|
24383
|
+
}), this.interactiveLayer.release()), this.window.release(), null === (_a = this._ticker) || void 0 === _a || _a.remTimeline(null == this ? void 0 : this.timeline), null === (_b = this._ticker) || void 0 === _b || _b.removeListener("tick", this.afterTickCb), this.params.ticker || null === (_d = this._ticker) || void 0 === _d || _d.release(), this.renderService.renderTreeRoots = [];
|
|
24351
24384
|
}
|
|
24352
24385
|
setStage(stage) {}
|
|
24353
24386
|
dirty(b, matrix) {
|
|
@@ -31672,7 +31705,7 @@
|
|
|
31672
31705
|
this._sliderRenderBounds = null, this._sliderLimitRange = null;
|
|
31673
31706
|
}
|
|
31674
31707
|
release(all) {
|
|
31675
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
31708
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
31676
31709
|
passive: !1
|
|
31677
31710
|
}), this._clearDragEvents();
|
|
31678
31711
|
}
|
|
@@ -33877,17 +33910,21 @@
|
|
|
33877
33910
|
} = this.attribute.label;
|
|
33878
33911
|
textStyle = isFunction$1(textStyle) ? merge$1({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer)) : textStyle;
|
|
33879
33912
|
const labelAlign = this.getLabelAlign(vector, inside, textStyle.angle);
|
|
33880
|
-
|
|
33913
|
+
textStyle = merge$1(labelAlign, textStyle), isFunction$1(textStyle.text) && (textStyle.text = textStyle.text({
|
|
33881
33914
|
label: tickDatum.label,
|
|
33882
33915
|
value: tickDatum.rawValue,
|
|
33883
33916
|
index: tickDatum.index,
|
|
33884
33917
|
layer: layer
|
|
33885
|
-
}))
|
|
33918
|
+
}));
|
|
33919
|
+
let reactStyle = textStyle.react;
|
|
33920
|
+
return isFunction$1(reactStyle) && (reactStyle = reactStyle(tickDatum, index, tickData, layer)), Object.assign(Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
|
|
33886
33921
|
text: null != text ? text : textContent,
|
|
33887
33922
|
_originText: tickDatum.label,
|
|
33888
33923
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize,
|
|
33889
33924
|
type: type
|
|
33890
|
-
}), textStyle)
|
|
33925
|
+
}), textStyle), {
|
|
33926
|
+
react: reactStyle
|
|
33927
|
+
});
|
|
33891
33928
|
}
|
|
33892
33929
|
getLabelPosition(point, vector, text, style) {
|
|
33893
33930
|
return point;
|
|
@@ -34916,6 +34953,8 @@
|
|
|
34916
34953
|
this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
|
|
34917
34954
|
timeline.tick(delta);
|
|
34918
34955
|
}), this.emit("tick", delta));
|
|
34956
|
+
}, this._handleGraphTick = () => {
|
|
34957
|
+
this.initHandler(!1);
|
|
34919
34958
|
}, this.init(), this.lastFrameTime = -1, this.tickCounts = 0, this.stage = stage, this.autoStop = !0, this.interval = 16, this.computeTimeOffsetAndJitter();
|
|
34920
34959
|
}
|
|
34921
34960
|
bindStage(stage) {
|
|
@@ -34925,9 +34964,7 @@
|
|
|
34925
34964
|
this.timeOffset = Math.floor(Math.random() * this.interval), this._jitter = Math.min(Math.max(.2 * this.interval, 6), .7 * this.interval);
|
|
34926
34965
|
}
|
|
34927
34966
|
init() {
|
|
34928
|
-
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker",
|
|
34929
|
-
this.initHandler(!1);
|
|
34930
|
-
}), application.global.env && this.initHandler(!1);
|
|
34967
|
+
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", this._handleGraphTick), application.global.env && this.initHandler(!1);
|
|
34931
34968
|
}
|
|
34932
34969
|
addTimeline(timeline) {
|
|
34933
34970
|
this.timelines.push(timeline);
|
|
@@ -35000,7 +35037,7 @@
|
|
|
35000
35037
|
}
|
|
35001
35038
|
release() {
|
|
35002
35039
|
var _a;
|
|
35003
|
-
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
|
|
35040
|
+
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
|
|
35004
35041
|
}
|
|
35005
35042
|
checkSkip(delta) {
|
|
35006
35043
|
var _a, _b, _c;
|
|
@@ -46121,7 +46158,7 @@
|
|
|
46121
46158
|
});
|
|
46122
46159
|
}
|
|
46123
46160
|
clearVGlobalEvents() {
|
|
46124
|
-
("browser" === vglobal.env ? vglobal : this.stage).
|
|
46161
|
+
("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
46125
46162
|
passive: !1
|
|
46126
46163
|
});
|
|
46127
46164
|
}
|
|
@@ -49825,7 +49862,7 @@
|
|
|
49825
49862
|
};
|
|
49826
49863
|
}
|
|
49827
49864
|
release(all) {
|
|
49828
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
49865
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
49829
49866
|
passive: !1
|
|
49830
49867
|
}), this._clearAllDragEvents();
|
|
49831
49868
|
}
|
|
@@ -50872,6 +50909,9 @@
|
|
|
50872
50909
|
value: this._data[dataIndex]
|
|
50873
50910
|
});
|
|
50874
50911
|
}
|
|
50912
|
+
release(all) {
|
|
50913
|
+
this._sliderVisible || this._slider.release(all), super.release(all);
|
|
50914
|
+
}
|
|
50875
50915
|
}
|
|
50876
50916
|
BasePlayer.defaultAttributes = {
|
|
50877
50917
|
visible: !0,
|
|
@@ -59003,7 +59043,7 @@
|
|
|
59003
59043
|
_runApplyGraphic(graphics) {
|
|
59004
59044
|
const hasAnimation = this.hasAnimation();
|
|
59005
59045
|
graphics.forEach((g, index) => {
|
|
59006
|
-
var _a, _b;
|
|
59046
|
+
var _a, _b, _c;
|
|
59007
59047
|
const finalAttrs = g.context.finalAttrs;
|
|
59008
59048
|
const hasStateAnimation = this.hasAnimationByState(g.context.animationState);
|
|
59009
59049
|
if (!g.setAttributes) {
|
|
@@ -59042,6 +59082,9 @@
|
|
|
59042
59082
|
else if (!hasStateAnimation) {
|
|
59043
59083
|
hasAnimation ? g.setAttributesAndPreventAnimate(diffAttrs) : g.setAttributes(diffAttrs);
|
|
59044
59084
|
}
|
|
59085
|
+
if (!((_c = this.renderContext) === null || _c === void 0 ? void 0 : _c.progressive) && this._product && g.parent !== this._product) {
|
|
59086
|
+
this._product.appendChild(g);
|
|
59087
|
+
}
|
|
59045
59088
|
if (hasAnimation) {
|
|
59046
59089
|
g.setFinalAttributes(finalAttrs);
|
|
59047
59090
|
}
|
|
@@ -60574,7 +60617,7 @@
|
|
|
60574
60617
|
this._compiler.updateLayoutTag();
|
|
60575
60618
|
this._setFontFamilyTheme(this.getTheme('fontFamily'));
|
|
60576
60619
|
this._initDataSet(this._option.dataSet);
|
|
60577
|
-
this._autoSize = isTrueBrowseEnv ? (
|
|
60620
|
+
this._autoSize = isTrueBrowseEnv ? (_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true : false;
|
|
60578
60621
|
this._bindResizeEvent();
|
|
60579
60622
|
this._bindViewEvent();
|
|
60580
60623
|
this._initChartPlugin();
|
|
@@ -61227,7 +61270,7 @@
|
|
|
61227
61270
|
resize = true;
|
|
61228
61271
|
}
|
|
61229
61272
|
const lasAutoSize = this._autoSize;
|
|
61230
|
-
this._autoSize = isTrueBrowser(this._option.mode) ? (
|
|
61273
|
+
this._autoSize = isTrueBrowser(this._option.mode) ? (_b = (_a = this._spec.autoFit) !== null && _a !== void 0 ? _a : this._option.autoFit) !== null && _b !== void 0 ? _b : true : false;
|
|
61231
61274
|
if (this._autoSize !== lasAutoSize) {
|
|
61232
61275
|
resize = true;
|
|
61233
61276
|
}
|
|
@@ -61812,7 +61855,7 @@
|
|
|
61812
61855
|
});
|
|
61813
61856
|
};
|
|
61814
61857
|
|
|
61815
|
-
const version = "2.0.
|
|
61858
|
+
const version = "2.0.19";
|
|
61816
61859
|
|
|
61817
61860
|
const addVChartProperty = (data, op) => {
|
|
61818
61861
|
const context = op.beforeCall();
|
|
@@ -65927,6 +65970,7 @@
|
|
|
65927
65970
|
components.forEach(c => {
|
|
65928
65971
|
var _a;
|
|
65929
65972
|
if (c) {
|
|
65973
|
+
c.release(true);
|
|
65930
65974
|
(_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(c);
|
|
65931
65975
|
c = null;
|
|
65932
65976
|
}
|
|
@@ -91262,6 +91306,11 @@
|
|
|
91262
91306
|
},
|
|
91263
91307
|
cellBackground: {
|
|
91264
91308
|
visible: false
|
|
91309
|
+
},
|
|
91310
|
+
label: {
|
|
91311
|
+
style: {
|
|
91312
|
+
lineWidth: 2
|
|
91313
|
+
}
|
|
91265
91314
|
}
|
|
91266
91315
|
};
|
|
91267
91316
|
|
|
@@ -91296,11 +91345,12 @@
|
|
|
91296
91345
|
this.initCellBackgroundMarkStyle();
|
|
91297
91346
|
}
|
|
91298
91347
|
initLabelMarkStyle(textMark) {
|
|
91348
|
+
var _a, _b, _c;
|
|
91299
91349
|
if (!textMark) {
|
|
91300
91350
|
return;
|
|
91301
91351
|
}
|
|
91302
91352
|
this.setMarkStyle(textMark, {
|
|
91303
|
-
fill: this.getColorAttribute(),
|
|
91353
|
+
fill: (_c = (_b = (_a = this._spec.cell) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : this.getColorAttribute(),
|
|
91304
91354
|
text: (datum) => {
|
|
91305
91355
|
return datum[this.getMeasureField()[0]];
|
|
91306
91356
|
}
|
|
@@ -98370,6 +98420,7 @@
|
|
|
98370
98420
|
this._hasInitStateScale = false;
|
|
98371
98421
|
this._shouldChange = true;
|
|
98372
98422
|
this._stateField = 'x';
|
|
98423
|
+
this._currentDataCollection = [];
|
|
98373
98424
|
this._handleStateChange = (startValue, endValue, tag) => {
|
|
98374
98425
|
var _a, _b;
|
|
98375
98426
|
this._startValue = startValue;
|
|
@@ -98426,6 +98477,7 @@
|
|
|
98426
98477
|
}, () => this._regions, (() => this._option).bind(this), () => this.event);
|
|
98427
98478
|
}
|
|
98428
98479
|
created() {
|
|
98480
|
+
this._handleDataCollectionChangeBound = this._handleDataCollectionChange.bind(this);
|
|
98429
98481
|
super.created();
|
|
98430
98482
|
this._setAxisFromSpec();
|
|
98431
98483
|
this._setRegionsFromSpec();
|
|
@@ -98580,7 +98632,7 @@
|
|
|
98580
98632
|
}
|
|
98581
98633
|
return;
|
|
98582
98634
|
}
|
|
98583
|
-
|
|
98635
|
+
_collectDataInfo() {
|
|
98584
98636
|
const dataCollection = [];
|
|
98585
98637
|
const seriesCollection = [];
|
|
98586
98638
|
const stateFields = [];
|
|
@@ -98656,6 +98708,10 @@
|
|
|
98656
98708
|
specIndex: this._seriesIndex
|
|
98657
98709
|
});
|
|
98658
98710
|
}
|
|
98711
|
+
return { dataCollection, seriesCollection, stateFields, valueFields, isCategoryState };
|
|
98712
|
+
}
|
|
98713
|
+
_initData() {
|
|
98714
|
+
const { dataCollection, seriesCollection, stateFields, valueFields, isCategoryState } = this._collectDataInfo();
|
|
98659
98715
|
const { dataSet } = this._option;
|
|
98660
98716
|
registerDataSetInstanceParser(dataSet, 'dataview', dataViewParser);
|
|
98661
98717
|
registerDataSetInstanceTransform(dataSet, 'dataFilterComputeDomain', dataFilterComputeDomain);
|
|
@@ -98678,7 +98734,8 @@
|
|
|
98678
98734
|
}, false);
|
|
98679
98735
|
this._data = new CompilableData(this._option, data);
|
|
98680
98736
|
data.reRunAllTransform();
|
|
98681
|
-
|
|
98737
|
+
this._currentDataCollection = dataCollection;
|
|
98738
|
+
dataSet.multipleDataViewAddListener(dataCollection, 'change', this._handleDataCollectionChangeBound);
|
|
98682
98739
|
}
|
|
98683
98740
|
_addTransformToSeries() {
|
|
98684
98741
|
if (!this._relatedAxisComponent || this._filterMode !== 'axis') {
|
|
@@ -98720,8 +98777,39 @@
|
|
|
98720
98777
|
}
|
|
98721
98778
|
onDataUpdate() {
|
|
98722
98779
|
var _a;
|
|
98780
|
+
const { dataCollection, seriesCollection, stateFields, valueFields, isCategoryState } = this._collectDataInfo();
|
|
98781
|
+
if (this._currentDataCollection.length !== dataCollection.length ||
|
|
98782
|
+
this._currentDataCollection.some((dv, i) => dv !== dataCollection[i])) {
|
|
98783
|
+
this._currentDataCollection.forEach(dv => {
|
|
98784
|
+
var _a;
|
|
98785
|
+
(_a = dv === null || dv === void 0 ? void 0 : dv.target) === null || _a === void 0 ? void 0 : _a.removeListener('change', this._handleDataCollectionChangeBound);
|
|
98786
|
+
});
|
|
98787
|
+
this._currentDataCollection = dataCollection;
|
|
98788
|
+
const { dataSet } = this._option;
|
|
98789
|
+
dataSet.multipleDataViewAddListener(this._currentDataCollection, 'change', this._handleDataCollectionChangeBound);
|
|
98790
|
+
}
|
|
98791
|
+
this._data.getDataView().transform({
|
|
98792
|
+
type: 'dataFilterComputeDomain',
|
|
98793
|
+
options: {
|
|
98794
|
+
input: {
|
|
98795
|
+
dataCollection: dataCollection,
|
|
98796
|
+
seriesCollection,
|
|
98797
|
+
stateFields,
|
|
98798
|
+
valueFields,
|
|
98799
|
+
isCategoryState
|
|
98800
|
+
},
|
|
98801
|
+
output: {
|
|
98802
|
+
stateField: this._stateField,
|
|
98803
|
+
valueField: this._valueField
|
|
98804
|
+
}
|
|
98805
|
+
}
|
|
98806
|
+
}, false);
|
|
98807
|
+
this._data.getDataView().reRunAllTransform();
|
|
98723
98808
|
const domain = this._computeDomainOfStateScale(isContinuous(this._stateScale.type));
|
|
98724
98809
|
this._stateScale.domain(domain, false);
|
|
98810
|
+
if (isValid$1(this._spec.start) || isValid$1(this._spec.end)) {
|
|
98811
|
+
this._setStateFromSpec();
|
|
98812
|
+
}
|
|
98725
98813
|
this._handleChange(this._start, this._end, true);
|
|
98726
98814
|
if (this._spec.auto && !isEqual(this._domainCache, domain)) {
|
|
98727
98815
|
this._domainCache = domain;
|
|
@@ -102082,17 +102170,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
102082
102170
|
}
|
|
102083
102171
|
return 0;
|
|
102084
102172
|
};
|
|
102173
|
+
this.autoPlayCallback = () => {
|
|
102174
|
+
var _a;
|
|
102175
|
+
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
|
|
102176
|
+
this._playerComponent.pause();
|
|
102177
|
+
this._playerComponent.play();
|
|
102178
|
+
}
|
|
102179
|
+
};
|
|
102085
102180
|
this._initEvent = () => {
|
|
102086
102181
|
if (this._option.disableTriggerEvent) {
|
|
102087
102182
|
return;
|
|
102088
102183
|
}
|
|
102089
|
-
this._option.globalInstance.
|
|
102090
|
-
|
|
102091
|
-
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
|
|
102092
|
-
this._playerComponent.pause();
|
|
102093
|
-
this._playerComponent.play();
|
|
102094
|
-
}
|
|
102095
|
-
});
|
|
102184
|
+
this._option.globalInstance.off(exports.ChartEvent.rendered, this.autoPlayCallback);
|
|
102185
|
+
this._option.globalInstance.on(exports.ChartEvent.rendered, this.autoPlayCallback);
|
|
102096
102186
|
this._playerComponent.addEventListener(PlayerEventEnum.end, () => {
|
|
102097
102187
|
var _a;
|
|
102098
102188
|
this.event.emit(exports.ChartEvent.playerEnd, { model: this });
|
|
@@ -102277,6 +102367,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
102277
102367
|
}
|
|
102278
102368
|
});
|
|
102279
102369
|
}
|
|
102370
|
+
release() {
|
|
102371
|
+
this._option.globalInstance.off(exports.ChartEvent.rendered, this.autoPlayCallback);
|
|
102372
|
+
}
|
|
102280
102373
|
}
|
|
102281
102374
|
Player.builtInTheme = {
|
|
102282
102375
|
player
|