@visactor/react-vchart 2.0.17 → 2.0.18
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/index.js +136 -38
- package/build/index.min.js +3 -3
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/package.json +7 -7
package/build/index.js
CHANGED
|
@@ -8171,28 +8171,59 @@
|
|
|
8171
8171
|
}
|
|
8172
8172
|
addEventListener(type, listener, options) {
|
|
8173
8173
|
if (!listener) return;
|
|
8174
|
+
const capture = this._resolveCapture(options),
|
|
8175
|
+
once = this._resolveOnce(options),
|
|
8176
|
+
listenerTypeMap = this._getOrCreateListenerTypeMap(type),
|
|
8177
|
+
wrappedMap = this._getOrCreateWrappedMap(listenerTypeMap, listener);
|
|
8178
|
+
if (wrappedMap.has(capture)) return;
|
|
8174
8179
|
const wrappedListener = event => {
|
|
8175
8180
|
const transformedEvent = this._eventListenerTransformer(event);
|
|
8176
|
-
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
8181
|
+
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent), once && this._deleteListenerRecord(type, listener, capture);
|
|
8177
8182
|
};
|
|
8178
|
-
|
|
8183
|
+
wrappedMap.set(capture, {
|
|
8184
|
+
wrappedListener: wrappedListener,
|
|
8185
|
+
options: options
|
|
8186
|
+
}), this._nativeAddEventListener(type, wrappedListener, options);
|
|
8179
8187
|
}
|
|
8180
8188
|
removeEventListener(type, listener, options) {
|
|
8181
|
-
var _a;
|
|
8189
|
+
var _a, _b;
|
|
8182
8190
|
if (!listener) return;
|
|
8183
|
-
const
|
|
8184
|
-
|
|
8191
|
+
const capture = this._resolveCapture(options),
|
|
8192
|
+
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);
|
|
8193
|
+
wrappedRecord && (this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture), this._deleteListenerRecord(type, listener, capture));
|
|
8185
8194
|
}
|
|
8186
8195
|
dispatchEvent(event) {
|
|
8187
8196
|
return this._nativeDispatchEvent(event);
|
|
8188
8197
|
}
|
|
8189
8198
|
clearAllEventListeners() {
|
|
8190
|
-
this._listenerMap.forEach((
|
|
8191
|
-
|
|
8192
|
-
|
|
8199
|
+
this._listenerMap.forEach((listenerMap, type) => {
|
|
8200
|
+
listenerMap.forEach(wrappedMap => {
|
|
8201
|
+
wrappedMap.forEach((wrappedRecord, capture) => {
|
|
8202
|
+
this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture);
|
|
8203
|
+
});
|
|
8193
8204
|
});
|
|
8194
8205
|
}), this._listenerMap.clear();
|
|
8195
8206
|
}
|
|
8207
|
+
_resolveCapture(options) {
|
|
8208
|
+
return "boolean" == typeof options ? options : !!(null == options ? void 0 : options.capture);
|
|
8209
|
+
}
|
|
8210
|
+
_resolveOnce(options) {
|
|
8211
|
+
return "object" == typeof options && !!(null == options ? void 0 : options.once);
|
|
8212
|
+
}
|
|
8213
|
+
_getOrCreateListenerTypeMap(type) {
|
|
8214
|
+
let listenerTypeMap = this._listenerMap.get(type);
|
|
8215
|
+
return listenerTypeMap || (listenerTypeMap = new Map(), this._listenerMap.set(type, listenerTypeMap)), listenerTypeMap;
|
|
8216
|
+
}
|
|
8217
|
+
_getOrCreateWrappedMap(listenerTypeMap, listener) {
|
|
8218
|
+
let wrappedMap = listenerTypeMap.get(listener);
|
|
8219
|
+
return wrappedMap || (wrappedMap = new Map(), listenerTypeMap.set(listener, wrappedMap)), wrappedMap;
|
|
8220
|
+
}
|
|
8221
|
+
_deleteListenerRecord(type, listener, capture) {
|
|
8222
|
+
const listenerTypeMap = this._listenerMap.get(type);
|
|
8223
|
+
if (!listenerTypeMap) return;
|
|
8224
|
+
const wrappedMap = listenerTypeMap.get(listener);
|
|
8225
|
+
wrappedMap && (wrappedMap.delete(capture), 0 === wrappedMap.size && listenerTypeMap.delete(listener), 0 === listenerTypeMap.size && this._listenerMap.delete(type));
|
|
8226
|
+
}
|
|
8196
8227
|
_nativeAddEventListener(type, listener, options) {
|
|
8197
8228
|
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
8198
8229
|
}
|
|
@@ -12537,7 +12568,9 @@
|
|
|
12537
12568
|
var _a;
|
|
12538
12569
|
if (event.manager !== this) throw new Error("It is illegal to free an event not managed by this EventManager!");
|
|
12539
12570
|
const constructor = event.constructor;
|
|
12540
|
-
this.eventPool.has(constructor) || this.eventPool.
|
|
12571
|
+
this.eventPool.has(constructor) || (this.eventPool.get(constructor).forEach(e => {
|
|
12572
|
+
e.eventPhase = event.NONE, e.currentTarget = null, e.path = [], e.detailPath = [], e.target = null;
|
|
12573
|
+
}), this.eventPool.set(constructor, [])), null === (_a = this.eventPool.get(constructor)) || void 0 === _a || _a.push(event);
|
|
12541
12574
|
}
|
|
12542
12575
|
notifyListeners(e, type) {
|
|
12543
12576
|
const listeners = e.currentTarget._events[type];
|
|
@@ -15179,7 +15212,7 @@
|
|
|
15179
15212
|
});
|
|
15180
15213
|
}
|
|
15181
15214
|
release() {
|
|
15182
|
-
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this);
|
|
15215
|
+
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this), super.release();
|
|
15183
15216
|
}
|
|
15184
15217
|
_emitCustomEvent(type, context) {
|
|
15185
15218
|
var _a, _b;
|
|
@@ -22842,12 +22875,12 @@
|
|
|
22842
22875
|
throw new Error("暂不支持");
|
|
22843
22876
|
}
|
|
22844
22877
|
release() {
|
|
22845
|
-
var _a, _b;
|
|
22878
|
+
var _a, _b, _d;
|
|
22846
22879
|
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 => {
|
|
22847
22880
|
layer.release();
|
|
22848
22881
|
}), this.interactiveLayer && (this.interactiveLayer.forEachChildren(item => {
|
|
22849
22882
|
item.setStage && item.setStage(null, null), this.interactiveLayer.removeChild(item);
|
|
22850
|
-
}), 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 = [];
|
|
22883
|
+
}), 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 = [];
|
|
22851
22884
|
}
|
|
22852
22885
|
setStage(stage) {}
|
|
22853
22886
|
dirty(b, matrix) {
|
|
@@ -27735,7 +27768,7 @@
|
|
|
27735
27768
|
this._sliderRenderBounds = null, this._sliderLimitRange = null;
|
|
27736
27769
|
}
|
|
27737
27770
|
release(all) {
|
|
27738
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
27771
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
27739
27772
|
passive: !1
|
|
27740
27773
|
}), this._clearDragEvents();
|
|
27741
27774
|
}
|
|
@@ -29940,17 +29973,21 @@
|
|
|
29940
29973
|
} = this.attribute.label;
|
|
29941
29974
|
textStyle = isFunction$1(textStyle) ? merge$1({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer)) : textStyle;
|
|
29942
29975
|
const labelAlign = this.getLabelAlign(vector, inside, textStyle.angle);
|
|
29943
|
-
|
|
29976
|
+
textStyle = merge$1(labelAlign, textStyle), isFunction$1(textStyle.text) && (textStyle.text = textStyle.text({
|
|
29944
29977
|
label: tickDatum.label,
|
|
29945
29978
|
value: tickDatum.rawValue,
|
|
29946
29979
|
index: tickDatum.index,
|
|
29947
29980
|
layer: layer
|
|
29948
|
-
}))
|
|
29981
|
+
}));
|
|
29982
|
+
let reactStyle = textStyle.react;
|
|
29983
|
+
return isFunction$1(reactStyle) && (reactStyle = reactStyle(tickDatum, index, tickData, layer)), Object.assign(Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
|
|
29949
29984
|
text: null != text ? text : textContent,
|
|
29950
29985
|
_originText: tickDatum.label,
|
|
29951
29986
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize,
|
|
29952
29987
|
type: type
|
|
29953
|
-
}), textStyle)
|
|
29988
|
+
}), textStyle), {
|
|
29989
|
+
react: reactStyle
|
|
29990
|
+
});
|
|
29954
29991
|
}
|
|
29955
29992
|
getLabelPosition(point, vector, text, style) {
|
|
29956
29993
|
return point;
|
|
@@ -30979,6 +31016,8 @@
|
|
|
30979
31016
|
this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
|
|
30980
31017
|
timeline.tick(delta);
|
|
30981
31018
|
}), this.emit("tick", delta));
|
|
31019
|
+
}, this._handleGraphTick = () => {
|
|
31020
|
+
this.initHandler(!1);
|
|
30982
31021
|
}, this.init(), this.lastFrameTime = -1, this.tickCounts = 0, this.stage = stage, this.autoStop = !0, this.interval = 16, this.computeTimeOffsetAndJitter();
|
|
30983
31022
|
}
|
|
30984
31023
|
bindStage(stage) {
|
|
@@ -30988,9 +31027,7 @@
|
|
|
30988
31027
|
this.timeOffset = Math.floor(Math.random() * this.interval), this._jitter = Math.min(Math.max(.2 * this.interval, 6), .7 * this.interval);
|
|
30989
31028
|
}
|
|
30990
31029
|
init() {
|
|
30991
|
-
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker",
|
|
30992
|
-
this.initHandler(!1);
|
|
30993
|
-
}), application.global.env && this.initHandler(!1);
|
|
31030
|
+
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", this._handleGraphTick), application.global.env && this.initHandler(!1);
|
|
30994
31031
|
}
|
|
30995
31032
|
addTimeline(timeline) {
|
|
30996
31033
|
this.timelines.push(timeline);
|
|
@@ -31063,7 +31100,7 @@
|
|
|
31063
31100
|
}
|
|
31064
31101
|
release() {
|
|
31065
31102
|
var _a;
|
|
31066
|
-
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
|
|
31103
|
+
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);
|
|
31067
31104
|
}
|
|
31068
31105
|
checkSkip(delta) {
|
|
31069
31106
|
var _a, _b, _c;
|
|
@@ -39461,7 +39498,7 @@
|
|
|
39461
39498
|
});
|
|
39462
39499
|
}
|
|
39463
39500
|
clearVGlobalEvents() {
|
|
39464
|
-
("browser" === vglobal.env ? vglobal : this.stage).
|
|
39501
|
+
("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
39465
39502
|
passive: !1
|
|
39466
39503
|
});
|
|
39467
39504
|
}
|
|
@@ -43165,7 +43202,7 @@
|
|
|
43165
43202
|
};
|
|
43166
43203
|
}
|
|
43167
43204
|
release(all) {
|
|
43168
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
43205
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
43169
43206
|
passive: !1
|
|
43170
43207
|
}), this._clearAllDragEvents();
|
|
43171
43208
|
}
|
|
@@ -44212,6 +44249,9 @@
|
|
|
44212
44249
|
value: this._data[dataIndex]
|
|
44213
44250
|
});
|
|
44214
44251
|
}
|
|
44252
|
+
release(all) {
|
|
44253
|
+
this._sliderVisible || this._slider.release(all), super.release(all);
|
|
44254
|
+
}
|
|
44215
44255
|
}
|
|
44216
44256
|
BasePlayer.defaultAttributes = {
|
|
44217
44257
|
visible: !0,
|
|
@@ -50025,12 +50065,12 @@
|
|
|
50025
50065
|
_runApplyGraphic(graphics) {
|
|
50026
50066
|
const hasAnimation = this.hasAnimation();
|
|
50027
50067
|
graphics.forEach((g, index) => {
|
|
50028
|
-
var _a, _b;
|
|
50068
|
+
var _a, _b, _c;
|
|
50029
50069
|
const finalAttrs = g.context.finalAttrs,
|
|
50030
50070
|
hasStateAnimation = this.hasAnimationByState(g.context.animationState);
|
|
50031
50071
|
if (g.setAttributes) {
|
|
50032
50072
|
const diffAttrs = getDiffAttributesOfGraphic(g, finalAttrs);
|
|
50033
|
-
g.context.diffAttrs = diffAttrs, g.context.reusing ? (g.context.lastAttrs = g.attribute, g.initAttributes({}), g.context.reusing = !1) : hasStateAnimation || (hasAnimation ? g.setAttributesAndPreventAnimate(diffAttrs) : g.setAttributes(diffAttrs)), hasAnimation && g.setFinalAttributes(finalAttrs);
|
|
50073
|
+
g.context.diffAttrs = diffAttrs, g.context.reusing ? (g.context.lastAttrs = g.attribute, g.initAttributes({}), g.context.reusing = !1) : hasStateAnimation || (hasAnimation ? g.setAttributesAndPreventAnimate(diffAttrs) : g.setAttributes(diffAttrs)), !(null === (_c = this.renderContext) || void 0 === _c ? void 0 : _c.progressive) && this._product && g.parent !== this._product && this._product.appendChild(g), hasAnimation && g.setFinalAttributes(finalAttrs);
|
|
50034
50074
|
} else {
|
|
50035
50075
|
const mockGraphic = g;
|
|
50036
50076
|
g = this._createGraphic(finalAttrs), hasAnimation && (null === (_a = g.setFinalAttributes) || void 0 === _a || _a.call(g, finalAttrs)), g.context = mockGraphic.context, g.context.diffAttrs = finalAttrs, g.stateSort = this._stateSort;
|
|
@@ -54759,7 +54799,7 @@
|
|
|
54759
54799
|
const components = this._getNeedClearVRenderComponents();
|
|
54760
54800
|
components && components.length && components.forEach(c => {
|
|
54761
54801
|
var _a;
|
|
54762
|
-
c && (null === (_a = this.getContainer()) || void 0 === _a || _a.removeChild(c), c = null);
|
|
54802
|
+
c && (c.release(!0), null === (_a = this.getContainer()) || void 0 === _a || _a.removeChild(c), c = null);
|
|
54763
54803
|
}), this._container = null, null === (_a = this.pluginService) || void 0 === _a || _a.clearAll();
|
|
54764
54804
|
}
|
|
54765
54805
|
compile() {
|
|
@@ -74027,6 +74067,11 @@
|
|
|
74027
74067
|
},
|
|
74028
74068
|
cellBackground: {
|
|
74029
74069
|
visible: !1
|
|
74070
|
+
},
|
|
74071
|
+
label: {
|
|
74072
|
+
style: {
|
|
74073
|
+
lineWidth: 2
|
|
74074
|
+
}
|
|
74030
74075
|
}
|
|
74031
74076
|
};
|
|
74032
74077
|
|
|
@@ -74055,8 +74100,9 @@
|
|
|
74055
74100
|
this.initCellMarkStyle(), this.initCellBackgroundMarkStyle();
|
|
74056
74101
|
}
|
|
74057
74102
|
initLabelMarkStyle(textMark) {
|
|
74103
|
+
var _a, _b, _c;
|
|
74058
74104
|
textMark && this.setMarkStyle(textMark, {
|
|
74059
|
-
fill: this.getColorAttribute(),
|
|
74105
|
+
fill: null !== (_c = null === (_b = null === (_a = this._spec.cell) || void 0 === _a ? void 0 : _a.style) || void 0 === _b ? void 0 : _b.fill) && void 0 !== _c ? _c : this.getColorAttribute(),
|
|
74060
74106
|
text: datum => datum[this.getMeasureField()[0]]
|
|
74061
74107
|
});
|
|
74062
74108
|
}
|
|
@@ -79455,7 +79501,7 @@
|
|
|
79455
79501
|
return this._visible;
|
|
79456
79502
|
}
|
|
79457
79503
|
constructor(spec, options) {
|
|
79458
|
-
super(spec, options), this.layoutType = "none", this._orient = "left", this._cacheVisibility = void 0, this._dataUpdating = !1, this._hasInitStateScale = !1, this._shouldChange = !0, this._stateField = "x", this._handleStateChange = (startValue, endValue, tag) => {
|
|
79504
|
+
super(spec, options), this.layoutType = "none", this._orient = "left", this._cacheVisibility = void 0, this._dataUpdating = !1, this._hasInitStateScale = !1, this._shouldChange = !0, this._stateField = "x", this._currentDataCollection = [], this._handleStateChange = (startValue, endValue, tag) => {
|
|
79459
79505
|
var _a, _b;
|
|
79460
79506
|
return this._startValue = startValue, this._endValue = endValue, this._newDomain = parseDomainFromState(this._startValue, this._endValue, this._stateScale), null === (_b = (_a = this.effect).onZoomChange) || void 0 === _b || _b.call(_a, tag), !0;
|
|
79461
79507
|
}, this.effect = {
|
|
@@ -79487,7 +79533,7 @@
|
|
|
79487
79533
|
}), () => this._regions, (() => this._option).bind(this), () => this.event);
|
|
79488
79534
|
}
|
|
79489
79535
|
created() {
|
|
79490
|
-
super.created(), this._setAxisFromSpec(), this._setRegionsFromSpec(), this._initEvent(), this._initData(), this._initStateScale(), this._setStateFromSpec();
|
|
79536
|
+
this._handleDataCollectionChangeBound = this._handleDataCollectionChange.bind(this), super.created(), this._setAxisFromSpec(), this._setRegionsFromSpec(), this._initEvent(), this._initData(), this._initStateScale(), this._setStateFromSpec();
|
|
79491
79537
|
}
|
|
79492
79538
|
initLayout() {
|
|
79493
79539
|
super.initLayout(), this._layout && (this._layout.layoutOrient = this._orient);
|
|
@@ -79570,7 +79616,7 @@
|
|
|
79570
79616
|
this._regions = ids.length ? this._regions.filter(r => ids.includes(r.id)) : [];
|
|
79571
79617
|
} else ;
|
|
79572
79618
|
}
|
|
79573
|
-
|
|
79619
|
+
_collectDataInfo() {
|
|
79574
79620
|
const dataCollection = [],
|
|
79575
79621
|
seriesCollection = [],
|
|
79576
79622
|
stateFields = [],
|
|
@@ -79605,9 +79651,25 @@
|
|
|
79605
79651
|
userId: this._seriesUserId,
|
|
79606
79652
|
specIndex: this._seriesIndex
|
|
79607
79653
|
});
|
|
79654
|
+
return {
|
|
79655
|
+
dataCollection: dataCollection,
|
|
79656
|
+
seriesCollection: seriesCollection,
|
|
79657
|
+
stateFields: stateFields,
|
|
79658
|
+
valueFields: valueFields,
|
|
79659
|
+
isCategoryState: isCategoryState
|
|
79660
|
+
};
|
|
79661
|
+
}
|
|
79662
|
+
_initData() {
|
|
79608
79663
|
const {
|
|
79609
|
-
|
|
79610
|
-
|
|
79664
|
+
dataCollection: dataCollection,
|
|
79665
|
+
seriesCollection: seriesCollection,
|
|
79666
|
+
stateFields: stateFields,
|
|
79667
|
+
valueFields: valueFields,
|
|
79668
|
+
isCategoryState: isCategoryState
|
|
79669
|
+
} = this._collectDataInfo(),
|
|
79670
|
+
{
|
|
79671
|
+
dataSet: dataSet
|
|
79672
|
+
} = this._option;
|
|
79611
79673
|
registerDataSetInstanceParser(dataSet, "dataview", dataViewParser), registerDataSetInstanceTransform(dataSet, "dataFilterComputeDomain", dataFilterComputeDomain);
|
|
79612
79674
|
const data = new DataView(dataSet, {
|
|
79613
79675
|
name: `${this.type}_${this.id}_data`
|
|
@@ -79627,7 +79689,7 @@
|
|
|
79627
79689
|
valueField: this._valueField
|
|
79628
79690
|
}
|
|
79629
79691
|
}
|
|
79630
|
-
}, !1), this._data = new CompilableData(this._option, data), data.reRunAllTransform(), dataSet.multipleDataViewAddListener(dataCollection, "change", this.
|
|
79692
|
+
}, !1), this._data = new CompilableData(this._option, data), data.reRunAllTransform(), this._currentDataCollection = dataCollection, dataSet.multipleDataViewAddListener(dataCollection, "change", this._handleDataCollectionChangeBound);
|
|
79631
79693
|
}
|
|
79632
79694
|
_addTransformToSeries() {
|
|
79633
79695
|
this._relatedAxisComponent && "axis" === this._filterMode || (registerDataSetInstanceTransform(this._option.dataSet, "dataFilterWithNewDomain", dataFilterWithNewDomain), registerDataSetInstanceTransform(this._option.dataSet, "lockStatisticsFilter", lockStatisticsFilter), eachSeries(this._regions, s => {
|
|
@@ -79662,8 +79724,41 @@
|
|
|
79662
79724
|
}
|
|
79663
79725
|
onDataUpdate() {
|
|
79664
79726
|
var _a;
|
|
79727
|
+
const {
|
|
79728
|
+
dataCollection: dataCollection,
|
|
79729
|
+
seriesCollection: seriesCollection,
|
|
79730
|
+
stateFields: stateFields,
|
|
79731
|
+
valueFields: valueFields,
|
|
79732
|
+
isCategoryState: isCategoryState
|
|
79733
|
+
} = this._collectDataInfo();
|
|
79734
|
+
if (this._currentDataCollection.length !== dataCollection.length || this._currentDataCollection.some((dv, i) => dv !== dataCollection[i])) {
|
|
79735
|
+
this._currentDataCollection.forEach(dv => {
|
|
79736
|
+
var _a;
|
|
79737
|
+
null === (_a = null == dv ? void 0 : dv.target) || void 0 === _a || _a.removeListener("change", this._handleDataCollectionChangeBound);
|
|
79738
|
+
}), this._currentDataCollection = dataCollection;
|
|
79739
|
+
const {
|
|
79740
|
+
dataSet: dataSet
|
|
79741
|
+
} = this._option;
|
|
79742
|
+
dataSet.multipleDataViewAddListener(this._currentDataCollection, "change", this._handleDataCollectionChangeBound);
|
|
79743
|
+
}
|
|
79744
|
+
this._data.getDataView().transform({
|
|
79745
|
+
type: "dataFilterComputeDomain",
|
|
79746
|
+
options: {
|
|
79747
|
+
input: {
|
|
79748
|
+
dataCollection: dataCollection,
|
|
79749
|
+
seriesCollection: seriesCollection,
|
|
79750
|
+
stateFields: stateFields,
|
|
79751
|
+
valueFields: valueFields,
|
|
79752
|
+
isCategoryState: isCategoryState
|
|
79753
|
+
},
|
|
79754
|
+
output: {
|
|
79755
|
+
stateField: this._stateField,
|
|
79756
|
+
valueField: this._valueField
|
|
79757
|
+
}
|
|
79758
|
+
}
|
|
79759
|
+
}, !1), this._data.getDataView().reRunAllTransform();
|
|
79665
79760
|
const domain = this._computeDomainOfStateScale(isContinuous(this._stateScale.type));
|
|
79666
|
-
this._stateScale.domain(domain, !1), this._handleChange(this._start, this._end, !0), this._spec.auto && !isEqual(this._domainCache, domain) && (this._domainCache = domain, this._dataUpdating = !0, null === (_a = this.getChart()) || void 0 === _a || _a.setLayoutTag(!0, null, !1));
|
|
79761
|
+
this._stateScale.domain(domain, !1), (isValid$1(this._spec.start) || isValid$1(this._spec.end)) && this._setStateFromSpec(), this._handleChange(this._start, this._end, !0), this._spec.auto && !isEqual(this._domainCache, domain) && (this._domainCache = domain, this._dataUpdating = !0, null === (_a = this.getChart()) || void 0 === _a || _a.setLayoutTag(!0, null, !1));
|
|
79667
79762
|
}
|
|
79668
79763
|
_parseFieldOfSeries(s) {
|
|
79669
79764
|
var _a;
|
|
@@ -82546,11 +82641,11 @@
|
|
|
82546
82641
|
const sliderHeight = null !== (_a = isVertical(this._orient) ? this._spec.slider.railStyle.width : this._spec.slider.railStyle.height) && void 0 !== _a ? _a : 10,
|
|
82547
82642
|
controllersHeight = Math.max(...array(null === (_c = null === (_b = this._spec.controller.start) || void 0 === _b ? void 0 : _b.style) || void 0 === _c ? void 0 : _c.size), ...array(null === (_e = null === (_d = this._spec.controller.pause) || void 0 === _d ? void 0 : _d.style) || void 0 === _e ? void 0 : _e.size), ...array(null === (_g = null === (_f = this._spec.controller.backward) || void 0 === _f ? void 0 : _f.style) || void 0 === _g ? void 0 : _g.size), ...array(null === (_j = null === (_h = this._spec.controller.forward) || void 0 === _h ? void 0 : _h.style) || void 0 === _j ? void 0 : _j.size));
|
|
82548
82643
|
return sliderHeight >= controllersHeight ? sliderHeight - controllersHeight : 0;
|
|
82644
|
+
}, this.autoPlayCallback = () => {
|
|
82645
|
+
var _a;
|
|
82646
|
+
(null === (_a = this._spec) || void 0 === _a ? void 0 : _a.auto) && (this._playerComponent.pause(), this._playerComponent.play());
|
|
82549
82647
|
}, this._initEvent = () => {
|
|
82550
|
-
this._option.disableTriggerEvent || (this._option.globalInstance.on(ChartEvent.rendered, () => {
|
|
82551
|
-
var _a;
|
|
82552
|
-
(null === (_a = this._spec) || void 0 === _a ? void 0 : _a.auto) && (this._playerComponent.pause(), this._playerComponent.play());
|
|
82553
|
-
}), this._playerComponent.addEventListener(PlayerEventEnum.end, () => {
|
|
82648
|
+
this._option.disableTriggerEvent || (this._option.globalInstance.off(ChartEvent.rendered, this.autoPlayCallback), this._option.globalInstance.on(ChartEvent.rendered, this.autoPlayCallback), this._playerComponent.addEventListener(PlayerEventEnum.end, () => {
|
|
82554
82649
|
var _a;
|
|
82555
82650
|
this.event.emit(ChartEvent.playerEnd, {
|
|
82556
82651
|
model: this
|
|
@@ -82701,6 +82796,9 @@
|
|
|
82701
82796
|
}
|
|
82702
82797
|
});
|
|
82703
82798
|
}
|
|
82799
|
+
release() {
|
|
82800
|
+
this._option.globalInstance.off(ChartEvent.rendered, this.autoPlayCallback);
|
|
82801
|
+
}
|
|
82704
82802
|
};
|
|
82705
82803
|
Player$1.builtInTheme = {
|
|
82706
82804
|
player: player
|
|
@@ -88779,7 +88877,7 @@
|
|
|
88779
88877
|
|
|
88780
88878
|
const VChartSimple = createChart('VChartSimple');
|
|
88781
88879
|
|
|
88782
|
-
const version = "2.0.
|
|
88880
|
+
const version = "2.0.18";
|
|
88783
88881
|
|
|
88784
88882
|
exports.Area = Area;
|
|
88785
88883
|
exports.AreaChart = AreaChart;
|