@visactor/react-vchart 2.0.16 → 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 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
- this._listenerMap.has(type) || this._listenerMap.set(type, new Map()), this._listenerMap.get(type).set(listener, wrappedListener), this._nativeAddEventListener(type, wrappedListener, options);
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 wrappedListener = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener);
8184
- wrappedListener && (this._nativeRemoveEventListener(type, wrappedListener, options), this._listenerMap.get(type).delete(listener), 0 === this._listenerMap.get(type).size && this._listenerMap.delete(type));
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((listenersMap, type) => {
8191
- listenersMap.forEach((wrappedListener, originalListener) => {
8192
- this._nativeRemoveEventListener(type, wrappedListener, void 0);
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.set(constructor, []), null === (_a = this.eventPool.get(constructor)) || void 0 === _a || _a.push(event);
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).addEventListener("touchmove", this._handleTouchMove, {
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
- return textStyle = merge$1(labelAlign, textStyle), isFunction$1(textStyle.text) && (textStyle.text = textStyle.text({
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
- })), Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
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).addEventListener("touchmove", this._handleTouchMove, {
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).addEventListener("touchmove", this._handleTouchMove, {
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,
@@ -46160,6 +46200,9 @@
46160
46200
  }
46161
46201
  return isArray$1(spec) ? spec.map(s => functionTransform(s, VChart)) : spec;
46162
46202
  }
46203
+ function transformFunctionAttribute(att, ...args) {
46204
+ return isFunction$1(att) ? att(...args) : att;
46205
+ }
46163
46206
 
46164
46207
  const initTextMeasure = (textSpec, option, useNaiveCanvas) => initTextMeasure$1(textSpec, option, useNaiveCanvas, {
46165
46208
  fontFamily: token.fontFamily,
@@ -50022,12 +50065,12 @@
50022
50065
  _runApplyGraphic(graphics) {
50023
50066
  const hasAnimation = this.hasAnimation();
50024
50067
  graphics.forEach((g, index) => {
50025
- var _a, _b;
50068
+ var _a, _b, _c;
50026
50069
  const finalAttrs = g.context.finalAttrs,
50027
50070
  hasStateAnimation = this.hasAnimationByState(g.context.animationState);
50028
50071
  if (g.setAttributes) {
50029
50072
  const diffAttrs = getDiffAttributesOfGraphic(g, finalAttrs);
50030
- 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);
50031
50074
  } else {
50032
50075
  const mockGraphic = g;
50033
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;
@@ -54756,7 +54799,7 @@
54756
54799
  const components = this._getNeedClearVRenderComponents();
54757
54800
  components && components.length && components.forEach(c => {
54758
54801
  var _a;
54759
- 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);
54760
54803
  }), this._container = null, null === (_a = this.pluginService) || void 0 === _a || _a.clearAll();
54761
54804
  }
54762
54805
  compile() {
@@ -55160,7 +55203,7 @@
55160
55203
  _getGridAttributes() {
55161
55204
  const spec = this._spec;
55162
55205
  return {
55163
- alternateColor: spec.grid.alternateColor,
55206
+ alternateColor: transformFunctionAttribute(spec.grid.alternateColor),
55164
55207
  alignWithLabel: spec.grid.alignWithLabel,
55165
55208
  style: isFunction$1(spec.grid.style) ? (datum, index) => {
55166
55209
  var _a, _b;
@@ -55172,7 +55215,7 @@
55172
55215
  } : {
55173
55216
  type: "line",
55174
55217
  visible: spec.subGrid.visible,
55175
- alternateColor: spec.subGrid.alternateColor,
55218
+ alternateColor: transformFunctionAttribute(spec.subGrid.alternateColor),
55176
55219
  style: transformToGraphic(spec.subGrid.style)
55177
55220
  }
55178
55221
  };
@@ -74024,6 +74067,11 @@
74024
74067
  },
74025
74068
  cellBackground: {
74026
74069
  visible: !1
74070
+ },
74071
+ label: {
74072
+ style: {
74073
+ lineWidth: 2
74074
+ }
74027
74075
  }
74028
74076
  };
74029
74077
 
@@ -74052,8 +74100,9 @@
74052
74100
  this.initCellMarkStyle(), this.initCellBackgroundMarkStyle();
74053
74101
  }
74054
74102
  initLabelMarkStyle(textMark) {
74103
+ var _a, _b, _c;
74055
74104
  textMark && this.setMarkStyle(textMark, {
74056
- 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(),
74057
74106
  text: datum => datum[this.getMeasureField()[0]]
74058
74107
  });
74059
74108
  }
@@ -79452,7 +79501,7 @@
79452
79501
  return this._visible;
79453
79502
  }
79454
79503
  constructor(spec, options) {
79455
- 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) => {
79456
79505
  var _a, _b;
79457
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;
79458
79507
  }, this.effect = {
@@ -79484,7 +79533,7 @@
79484
79533
  }), () => this._regions, (() => this._option).bind(this), () => this.event);
79485
79534
  }
79486
79535
  created() {
79487
- 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();
79488
79537
  }
79489
79538
  initLayout() {
79490
79539
  super.initLayout(), this._layout && (this._layout.layoutOrient = this._orient);
@@ -79567,7 +79616,7 @@
79567
79616
  this._regions = ids.length ? this._regions.filter(r => ids.includes(r.id)) : [];
79568
79617
  } else ;
79569
79618
  }
79570
- _initData() {
79619
+ _collectDataInfo() {
79571
79620
  const dataCollection = [],
79572
79621
  seriesCollection = [],
79573
79622
  stateFields = [],
@@ -79602,9 +79651,25 @@
79602
79651
  userId: this._seriesUserId,
79603
79652
  specIndex: this._seriesIndex
79604
79653
  });
79654
+ return {
79655
+ dataCollection: dataCollection,
79656
+ seriesCollection: seriesCollection,
79657
+ stateFields: stateFields,
79658
+ valueFields: valueFields,
79659
+ isCategoryState: isCategoryState
79660
+ };
79661
+ }
79662
+ _initData() {
79605
79663
  const {
79606
- dataSet: dataSet
79607
- } = this._option;
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;
79608
79673
  registerDataSetInstanceParser(dataSet, "dataview", dataViewParser), registerDataSetInstanceTransform(dataSet, "dataFilterComputeDomain", dataFilterComputeDomain);
79609
79674
  const data = new DataView(dataSet, {
79610
79675
  name: `${this.type}_${this.id}_data`
@@ -79624,7 +79689,7 @@
79624
79689
  valueField: this._valueField
79625
79690
  }
79626
79691
  }
79627
- }, !1), this._data = new CompilableData(this._option, data), data.reRunAllTransform(), dataSet.multipleDataViewAddListener(dataCollection, "change", this._handleDataCollectionChange.bind(this));
79692
+ }, !1), this._data = new CompilableData(this._option, data), data.reRunAllTransform(), this._currentDataCollection = dataCollection, dataSet.multipleDataViewAddListener(dataCollection, "change", this._handleDataCollectionChangeBound);
79628
79693
  }
79629
79694
  _addTransformToSeries() {
79630
79695
  this._relatedAxisComponent && "axis" === this._filterMode || (registerDataSetInstanceTransform(this._option.dataSet, "dataFilterWithNewDomain", dataFilterWithNewDomain), registerDataSetInstanceTransform(this._option.dataSet, "lockStatisticsFilter", lockStatisticsFilter), eachSeries(this._regions, s => {
@@ -79659,8 +79724,41 @@
79659
79724
  }
79660
79725
  onDataUpdate() {
79661
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();
79662
79760
  const domain = this._computeDomainOfStateScale(isContinuous(this._stateScale.type));
79663
- 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));
79664
79762
  }
79665
79763
  _parseFieldOfSeries(s) {
79666
79764
  var _a;
@@ -82543,11 +82641,11 @@
82543
82641
  const sliderHeight = null !== (_a = isVertical(this._orient) ? this._spec.slider.railStyle.width : this._spec.slider.railStyle.height) && void 0 !== _a ? _a : 10,
82544
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));
82545
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());
82546
82647
  }, this._initEvent = () => {
82547
- this._option.disableTriggerEvent || (this._option.globalInstance.on(ChartEvent.rendered, () => {
82548
- var _a;
82549
- (null === (_a = this._spec) || void 0 === _a ? void 0 : _a.auto) && (this._playerComponent.pause(), this._playerComponent.play());
82550
- }), 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, () => {
82551
82649
  var _a;
82552
82650
  this.event.emit(ChartEvent.playerEnd, {
82553
82651
  model: this
@@ -82698,6 +82796,9 @@
82698
82796
  }
82699
82797
  });
82700
82798
  }
82799
+ release() {
82800
+ this._option.globalInstance.off(ChartEvent.rendered, this.autoPlayCallback);
82801
+ }
82701
82802
  };
82702
82803
  Player$1.builtInTheme = {
82703
82804
  player: player
@@ -88776,7 +88877,7 @@
88776
88877
 
88777
88878
  const VChartSimple = createChart('VChartSimple');
88778
88879
 
88779
- const version = "2.0.16";
88880
+ const version = "2.0.18";
88780
88881
 
88781
88882
  exports.Area = Area;
88782
88883
  exports.AreaChart = AreaChart;