@visactor/vchart 2.0.13-alpha.9 → 2.0.13

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.
Files changed (134) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +79 -103
  3. package/build/index.js +79 -103
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/compile/compiler.d.ts +0 -1
  7. package/cjs/compile/compiler.js +0 -3
  8. package/cjs/compile/compiler.js.map +1 -1
  9. package/cjs/compile/interface/compilable-item.d.ts +1 -2
  10. package/cjs/compile/interface/compilable-item.js.map +1 -1
  11. package/cjs/component/brush/brush.d.ts +1 -4
  12. package/cjs/component/brush/brush.js +14 -31
  13. package/cjs/component/brush/brush.js.map +1 -1
  14. package/cjs/component/brush/interface.d.ts +1 -3
  15. package/cjs/component/brush/interface.js.map +1 -1
  16. package/cjs/component/crosshair/interface/spec.d.ts +0 -1
  17. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  18. package/cjs/component/tooltip/interface/common.d.ts +0 -1
  19. package/cjs/component/tooltip/interface/common.js.map +1 -1
  20. package/cjs/component/tooltip/processor/base.js +1 -1
  21. package/cjs/component/tooltip/processor/base.js.map +1 -1
  22. package/cjs/component/tooltip/tooltip.d.ts +0 -1
  23. package/cjs/component/tooltip/tooltip.js +2 -3
  24. package/cjs/component/tooltip/tooltip.js.map +1 -1
  25. package/cjs/component/tooltip/utils/show-tooltip.d.ts +1 -0
  26. package/cjs/component/tooltip/utils/show-tooltip.js +30 -6
  27. package/cjs/component/tooltip/utils/show-tooltip.js.map +1 -1
  28. package/cjs/constant/correlation.js +1 -1
  29. package/cjs/constant/data.js +1 -1
  30. package/cjs/constant/event.js +1 -1
  31. package/cjs/constant/funnel.js +1 -1
  32. package/cjs/constant/gradient.js +1 -1
  33. package/cjs/constant/hierarchy.js +1 -1
  34. package/cjs/constant/label.js +1 -1
  35. package/cjs/constant/layout.js +1 -1
  36. package/cjs/constant/marker.js +1 -1
  37. package/cjs/constant/polar.js +1 -1
  38. package/cjs/constant/scatter.js +1 -1
  39. package/cjs/constant/scroll-bar.js +2 -1
  40. package/cjs/constant/sunburst.js +1 -1
  41. package/cjs/constant/waterfall.js +1 -1
  42. package/cjs/constant/word-cloud.js +1 -1
  43. package/cjs/core/index.d.ts +1 -1
  44. package/cjs/core/index.js +1 -1
  45. package/cjs/core/index.js.map +1 -1
  46. package/cjs/core/interface.d.ts +1 -9
  47. package/cjs/core/interface.js +1 -1
  48. package/cjs/core/interface.js.map +1 -1
  49. package/cjs/core/util.js +1 -1
  50. package/cjs/core/vchart.d.ts +0 -4
  51. package/cjs/core/vchart.js +2 -11
  52. package/cjs/core/vchart.js.map +1 -1
  53. package/cjs/data/initialize.js +1 -1
  54. package/cjs/data/register.js +1 -1
  55. package/cjs/env/env.js +1 -1
  56. package/cjs/env/index.js +1 -1
  57. package/cjs/event/bubble.js +1 -1
  58. package/cjs/event/event-dispatcher.js +1 -1
  59. package/cjs/event/event.js +2 -2
  60. package/cjs/event/event.js.map +1 -1
  61. package/cjs/event/events/dimension/dimension-hover.js +2 -4
  62. package/cjs/event/events/dimension/dimension-hover.js.map +1 -1
  63. package/cjs/event/index.js +1 -1
  64. package/cjs/event/interface.js +1 -2
  65. package/cjs/interaction/config.js +1 -1
  66. package/cjs/interaction/index.js +1 -1
  67. package/cjs/interaction/interaction.js +1 -1
  68. package/cjs/mark/base/base-mark.js +9 -5
  69. package/cjs/mark/base/base-mark.js.map +1 -1
  70. package/esm/compile/compiler.d.ts +0 -1
  71. package/esm/compile/compiler.js +0 -3
  72. package/esm/compile/compiler.js.map +1 -1
  73. package/esm/compile/interface/compilable-item.d.ts +1 -2
  74. package/esm/compile/interface/compilable-item.js.map +1 -1
  75. package/esm/component/brush/brush.d.ts +1 -4
  76. package/esm/component/brush/brush.js +14 -31
  77. package/esm/component/brush/brush.js.map +1 -1
  78. package/esm/component/brush/interface.d.ts +1 -3
  79. package/esm/component/brush/interface.js.map +1 -1
  80. package/esm/component/crosshair/interface/spec.d.ts +0 -1
  81. package/esm/component/crosshair/interface/spec.js.map +1 -1
  82. package/esm/component/tooltip/interface/common.d.ts +0 -1
  83. package/esm/component/tooltip/interface/common.js.map +1 -1
  84. package/esm/component/tooltip/processor/base.js +1 -1
  85. package/esm/component/tooltip/processor/base.js.map +1 -1
  86. package/esm/component/tooltip/tooltip.d.ts +0 -1
  87. package/esm/component/tooltip/tooltip.js +2 -3
  88. package/esm/component/tooltip/tooltip.js.map +1 -1
  89. package/esm/component/tooltip/utils/show-tooltip.d.ts +1 -0
  90. package/esm/component/tooltip/utils/show-tooltip.js +30 -6
  91. package/esm/component/tooltip/utils/show-tooltip.js.map +1 -1
  92. package/esm/constant/correlation.js +1 -1
  93. package/esm/constant/data.js +1 -1
  94. package/esm/constant/event.js +1 -1
  95. package/esm/constant/funnel.js +1 -1
  96. package/esm/constant/gradient.js +1 -1
  97. package/esm/constant/hierarchy.js +1 -1
  98. package/esm/constant/label.js +1 -1
  99. package/esm/constant/layout.js +1 -1
  100. package/esm/constant/marker.js +1 -1
  101. package/esm/constant/polar.js +1 -1
  102. package/esm/constant/scatter.js +1 -1
  103. package/esm/constant/scroll-bar.js +2 -1
  104. package/esm/constant/sunburst.js +1 -1
  105. package/esm/constant/waterfall.js +1 -1
  106. package/esm/constant/word-cloud.js +1 -1
  107. package/esm/core/index.d.ts +1 -1
  108. package/esm/core/index.js +1 -1
  109. package/esm/core/index.js.map +1 -1
  110. package/esm/core/interface.d.ts +1 -9
  111. package/esm/core/interface.js +1 -1
  112. package/esm/core/interface.js.map +1 -1
  113. package/esm/core/util.js +1 -1
  114. package/esm/core/vchart.d.ts +0 -4
  115. package/esm/core/vchart.js +2 -11
  116. package/esm/core/vchart.js.map +1 -1
  117. package/esm/data/initialize.js +1 -1
  118. package/esm/data/register.js +1 -1
  119. package/esm/env/env.js +1 -1
  120. package/esm/env/index.js +1 -1
  121. package/esm/event/bubble.js +1 -1
  122. package/esm/event/event-dispatcher.js +1 -1
  123. package/esm/event/event.js +2 -2
  124. package/esm/event/event.js.map +1 -1
  125. package/esm/event/events/dimension/dimension-hover.js +2 -4
  126. package/esm/event/events/dimension/dimension-hover.js.map +1 -1
  127. package/esm/event/index.js +1 -1
  128. package/esm/event/interface.js +1 -2
  129. package/esm/interaction/config.js +1 -1
  130. package/esm/interaction/index.js +1 -1
  131. package/esm/interaction/interaction.js +1 -1
  132. package/esm/mark/base/base-mark.js +9 -5
  133. package/esm/mark/base/base-mark.js.map +1 -1
  134. package/package.json +9 -9
package/build/index.es.js CHANGED
@@ -16489,6 +16489,7 @@ class Graphic extends Node {
16489
16489
  var _a;
16490
16490
  if (!states.length) return void this.clearStates(hasAnimation);
16491
16491
  if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
16492
+ this.stateSort && (states = states.sort(this.stateSort));
16492
16493
  const stateAttrs = {};
16493
16494
  states.forEach(stateName => {
16494
16495
  var _a;
@@ -18517,7 +18518,7 @@ class Glyph extends Graphic {
18517
18518
  var _a;
18518
18519
  if (!states.length) return void this.clearStates(hasAnimation);
18519
18520
  if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
18520
- this.stopStateAnimates();
18521
+ this.stopStateAnimates(), this.stateSort && (states = states.sort(this.stateSort));
18521
18522
  const stateAttrs = {},
18522
18523
  subAttrs = this.subGraphic.map(() => ({}));
18523
18524
  states.forEach(stateName => {
@@ -35171,8 +35172,8 @@ class AnimateExecutor {
35171
35172
  }
35172
35173
  parseParams(params, isTimeline, child) {
35173
35174
  var _a, _b;
35174
- const totalTime = this.resolveValue(params.totalTime, void 0, void 0),
35175
- startTime = this.resolveValue(params.startTime, void 0, 0),
35175
+ const totalTime = this.resolveValue(params.totalTime, child, void 0),
35176
+ startTime = this.resolveValue(params.startTime, child, 0),
35176
35177
  parsedParams = Object.assign({}, params);
35177
35178
  parsedParams.oneByOneDelay = 0, parsedParams.startTime = startTime, parsedParams.totalTime = totalTime;
35178
35179
  const oneByOne = this.resolveValue(params.oneByOne, child, !1);
@@ -35221,11 +35222,10 @@ class AnimateExecutor {
35221
35222
  let oneByOneDelay = 0;
35222
35223
  oneByOne && (oneByOneDelay = "number" == typeof oneByOne ? oneByOne : oneByOne ? delay + delayAfter + duration : 0), parsedParams.oneByOneDelay = oneByOneDelay, parsedParams.custom = null !== (_a = params.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[null !== (_b = params.type) && void 0 !== _b ? _b : "fromTo"];
35223
35224
  const customType = getCustomType(parsedParams.custom);
35224
- if (parsedParams.customType = customType, totalTime) {
35225
- const _totalTime = delay + delayAfter + duration + oneByOneDelay * (this._target.count - 2),
35226
- scale = totalTime ? totalTime / _totalTime : 1;
35227
- parsedParams.delay = delay * scale, parsedParams.delayAfter = delayAfter * scale, parsedParams.duration = duration * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime;
35228
- }
35225
+ parsedParams.customType = customType;
35226
+ const _totalTime = delay + delayAfter + duration + oneByOneDelay * (this._target.count - 2),
35227
+ scale = isValidNumber$1(totalTime) ? totalTime / _totalTime : 1;
35228
+ parsedParams.delay = delay * scale, parsedParams.delayAfter = delayAfter * scale, parsedParams.duration = duration * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime;
35229
35229
  }
35230
35230
  return parsedParams;
35231
35231
  }
@@ -51096,8 +51096,6 @@ loadBrushComponent();
51096
51096
  let Brush$1 = class Brush extends AbstractComponent {
51097
51097
  constructor(attributes, options) {
51098
51098
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Brush.defaultAttributes, attributes)), this.name = "brush", this._activeBrushState = !1, this._activeDrawState = !1, this._cacheDrawPoints = [], this._activeMoveState = !1, this._operatingMaskMoveDx = 0, this._operatingMaskMoveDy = 0, this._operatingMaskMoveRangeX = [-1 / 0, 1 / 0], this._operatingMaskMoveRangeY = [-1 / 0, 1 / 0], this._brushMaskAABBBoundsDict = {}, this._firstUpdate = !0, this._onBrushStart = e => {
51099
- if (!1 === this.attribute.interactive) return;
51100
- if (!1 === this._beforeBrushEvent(e)) return;
51101
51099
  const {
51102
51100
  updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
51103
51101
  endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
@@ -51105,11 +51103,11 @@ let Brush$1 = class Brush extends AbstractComponent {
51105
51103
  } = this.attribute;
51106
51104
  array(updateTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushingWithDelay)), array(endTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushEnd)), e.stopPropagation(), this._firstUpdate = !0, this._activeMoveState = brushMoved && this._isPosInBrushMask(e), this._activeDrawState = !this._activeMoveState, this._startPos = this.eventPosToStagePos(e), this._cacheDrawPoints = [this._startPos];
51107
51105
  }, this._onBrushing = e => {
51108
- !1 !== this.attribute.interactive && !1 !== this._beforeBrushEvent(e) && (this._outOfInteractiveRange(e) || (e.stopPropagation(), this._firstUpdate ? (this._activeDrawState && this._initDraw(e), this._activeMoveState && this._initMove(e), this._firstUpdate = !1) : (this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e))));
51106
+ this._outOfInteractiveRange(e) || (e.stopPropagation(), this._firstUpdate ? (this._activeDrawState && this._initDraw(e), this._activeMoveState && this._initMove(e), this._firstUpdate = !1) : (this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e)));
51109
51107
  }, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap$1[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
51110
- !1 !== this.attribute.interactive && (this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1);
51108
+ this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1;
51111
51109
  }, this._onBrushClear = e => {
51112
- !1 !== this.attribute.interactive && !1 !== this._beforeBrushEvent(e) && (e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1);
51110
+ e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1;
51113
51111
  };
51114
51112
  }
51115
51113
  _bindBrushEvents() {
@@ -51121,7 +51119,6 @@ let Brush$1 = class Brush extends AbstractComponent {
51121
51119
  array(trigger).forEach(t => this.stage.addEventListener(t, this._onBrushStart)), array(resetTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushClear));
51122
51120
  }
51123
51121
  _initDraw(e) {
51124
- if (!1 === this.attribute.interactive) return;
51125
51122
  const {
51126
51123
  brushMode: brushMode
51127
51124
  } = this.attribute,
@@ -51130,7 +51127,6 @@ let Brush$1 = class Brush extends AbstractComponent {
51130
51127
  }
51131
51128
  _initMove(e) {
51132
51129
  var _a, _b;
51133
- if (!1 === this.attribute.interactive) return;
51134
51130
  this._cacheMovePoint = this.eventPosToStagePos(e), this._operatingMaskMoveDx = null !== (_a = this._operatingMask.attribute.dx) && void 0 !== _a ? _a : 0, this._operatingMaskMoveDy = null !== (_b = this._operatingMask.attribute.dy) && void 0 !== _b ? _b : 0;
51135
51131
  const {
51136
51132
  interactiveRange: interactiveRange
@@ -51155,7 +51151,6 @@ let Brush$1 = class Brush extends AbstractComponent {
51155
51151
  }
51156
51152
  _drawing(e) {
51157
51153
  var _a;
51158
- if (!1 === this.attribute.interactive) return;
51159
51154
  const pos = this.eventPosToStagePos(e),
51160
51155
  {
51161
51156
  brushType: brushType,
@@ -51180,7 +51175,6 @@ let Brush$1 = class Brush extends AbstractComponent {
51180
51175
  (Math.abs(x2 - x1) > sizeThreshold || Math.abs(y1 - y2) > sizeThreshold) && (1 !== Object.keys(this._brushMaskAABBBoundsDict).length || this._activeBrushState ? this._dispatchBrushEvent(IOperateType.drawing, e) : (this._activeBrushState = !0, this._dispatchBrushEvent(IOperateType.brushActive, e)));
51181
51176
  }
51182
51177
  _moving(e) {
51183
- if (!1 === this.attribute.interactive) return;
51184
51178
  const startPos = this._cacheMovePoint,
51185
51179
  pos = this.eventPosToStagePos(e);
51186
51180
  if (pos.x === (null == startPos ? void 0 : startPos.x) && pos.y === (null == startPos ? void 0 : startPos.y)) return;
@@ -51194,7 +51188,6 @@ let Brush$1 = class Brush extends AbstractComponent {
51194
51188
  }), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this._dispatchBrushEvent(IOperateType.moving, e);
51195
51189
  }
51196
51190
  _drawEnd(e) {
51197
- if (!1 === this.attribute.interactive) return;
51198
51191
  const {
51199
51192
  removeOnClick = !0,
51200
51193
  sizeThreshold = DEFAULT_SIZE_THRESHOLD
@@ -51212,7 +51205,7 @@ let Brush$1 = class Brush extends AbstractComponent {
51212
51205
  }
51213
51206
  }
51214
51207
  _moveEnd(e) {
51215
- !1 !== this.attribute.interactive && (this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e));
51208
+ this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e);
51216
51209
  }
51217
51210
  render() {
51218
51211
  this._bindBrushEvents();
@@ -51319,10 +51312,6 @@ let Brush$1 = class Brush extends AbstractComponent {
51319
51312
  pos = this.eventPosToStagePos(e);
51320
51313
  return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
51321
51314
  }
51322
- _beforeBrushEvent(e) {
51323
- var _a, _b;
51324
- return null === (_b = (_a = this.attribute).beforeBrushChange) || void 0 === _b ? void 0 : _b.call(_a, e);
51325
- }
51326
51315
  _dispatchBrushEvent(operateType, e) {
51327
51316
  this._dispatchEvent(operateType, {
51328
51317
  operateMask: this._operatingMask,
@@ -53868,7 +53857,7 @@ let Event$1 = class Event {
53868
53857
  if (ComposedEventCtor) {
53869
53858
  const composedEvent = new ComposedEventCtor(this._eventDispatcher, this._mode);
53870
53859
  composedEvent.register(eType, handler);
53871
- this._composedEventMap.set(handler.callback, {
53860
+ this._composedEventMap.set(callback, {
53872
53861
  eventType: eType,
53873
53862
  event: composedEvent
53874
53863
  });
@@ -54905,9 +54894,6 @@ class Compiler {
54905
54894
  getRootGroup() {
54906
54895
  return this._rootGroup;
54907
54896
  }
54908
- getOption() {
54909
- return this._option;
54910
- }
54911
54897
  constructor(container, option) {
54912
54898
  this._count = 0;
54913
54899
  this._rootMarks = [];
@@ -58902,6 +58888,7 @@ class BaseMark extends GrammarItem {
58902
58888
  allGraphics.forEach((g, index) => {
58903
58889
  g.context.graphicCount = graphicCount;
58904
58890
  g.context.graphicIndex = index;
58891
+ g.stateSort = this._stateSort;
58905
58892
  });
58906
58893
  this._dataByKey = newGroupedData;
58907
58894
  this._graphics = allGraphics;
@@ -58947,8 +58934,13 @@ class BaseMark extends GrammarItem {
58947
58934
  var _a;
58948
58935
  const attrsByGroup = noGroupEncode ? null : this._runGroupEncoder((_a = this._encoderOfState) === null || _a === void 0 ? void 0 : _a.group);
58949
58936
  graphics.forEach((g, index) => {
58950
- var _a;
58951
- const attrs = this._runEncoderOfGraphic((_a = this._encoderOfState) === null || _a === void 0 ? void 0 : _a.update, g);
58937
+ var _a, _b;
58938
+ let attrs = this._runEncoderOfGraphic((_a = this._encoderOfState) === null || _a === void 0 ? void 0 : _a.update, g);
58939
+ (_b = g.currentStates) === null || _b === void 0 ? void 0 : _b.forEach((_state) => {
58940
+ var _a;
58941
+ const stateAttr = this._runEncoderOfGraphic((_a = this._encoderOfState) === null || _a === void 0 ? void 0 : _a[_state], g);
58942
+ attrs = Object.assign(Object.assign({}, attrs), stateAttr);
58943
+ });
58952
58944
  if (!isNil$1(this._markConfig.interactive)) {
58953
58945
  attrs.pickable = this._markConfig.interactive;
58954
58946
  }
@@ -58970,6 +58962,7 @@ class BaseMark extends GrammarItem {
58970
58962
  }
58971
58963
  g.context = mockGraphic.context;
58972
58964
  g.context.diffAttrs = finalAttrs;
58965
+ g.stateSort = this._stateSort;
58973
58966
  const gIndex = this._graphics === graphics ? index : index + this._graphics.length - graphics.length;
58974
58967
  if (gIndex >= 0) {
58975
58968
  this._graphics[gIndex] = g;
@@ -60384,7 +60377,6 @@ class VChart {
60384
60377
  this._observer = null;
60385
60378
  this._context = {};
60386
60379
  this._renderState = RenderStateEnum.render;
60387
- this._disableDimensionHoverEvent = false;
60388
60380
  this._doResize = () => {
60389
60381
  const { width, height } = this.getCurrentSize();
60390
60382
  if (this._currentSize.width !== width || this._currentSize.height !== height) {
@@ -60529,7 +60521,7 @@ class VChart {
60529
60521
  this._compiler.updateLayoutTag();
60530
60522
  this._setFontFamilyTheme(this.getTheme('fontFamily'));
60531
60523
  this._initDataSet(this._option.dataSet);
60532
- this._autoSize = isTrueBrowseEnv ? ((_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true) : false;
60524
+ this._autoSize = isTrueBrowseEnv ? (_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true : false;
60533
60525
  this._bindResizeEvent();
60534
60526
  this._bindViewEvent();
60535
60527
  this._initChartPlugin();
@@ -61182,7 +61174,7 @@ class VChart {
61182
61174
  resize = true;
61183
61175
  }
61184
61176
  const lasAutoSize = this._autoSize;
61185
- 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;
61177
+ 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;
61186
61178
  if (this._autoSize !== lasAutoSize) {
61187
61179
  resize = true;
61188
61180
  }
@@ -61423,22 +61415,6 @@ class VChart {
61423
61415
  var _a;
61424
61416
  return (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setDimensionIndex(value, opt);
61425
61417
  }
61426
- disableDimensionHoverEvent(value) {
61427
- if (value !== undefined) {
61428
- this._disableDimensionHoverEvent = value;
61429
- }
61430
- return this._disableDimensionHoverEvent;
61431
- }
61432
- disableCrossHair(value = true) {
61433
- this.getChart()
61434
- .getComponentsByKey('crosshair')
61435
- .forEach(crosshair => (crosshair.enable = !value));
61436
- }
61437
- disableTooltip(value = true) {
61438
- this.getChart()
61439
- .getComponentsByKey('tooltip')
61440
- .forEach(tooltip => (tooltip.enable = !value));
61441
- }
61442
61418
  showCrosshair(cb) {
61443
61419
  var _a;
61444
61420
  (_a = this._chart) === null || _a === void 0 ? void 0 : _a.showCrosshair(cb);
@@ -61767,7 +61743,7 @@ const lookup = (data, opt) => {
61767
61743
  });
61768
61744
  };
61769
61745
 
61770
- const version = "2.0.12";
61746
+ const version = "2.0.13";
61771
61747
 
61772
61748
  const addVChartProperty = (data, op) => {
61773
61749
  const context = op.beforeCall();
@@ -64459,8 +64435,7 @@ class DimensionHoverEvent extends DimensionEvent {
64459
64435
  super(...arguments);
64460
64436
  this._cacheDimensionInfo = null;
64461
64437
  this.onMouseMove = (params) => {
64462
- var _a, _b, _c, _d;
64463
- if (!params || ((_d = (_c = (_b = (_a = params.chart) === null || _a === void 0 ? void 0 : _a.getOption()) === null || _b === void 0 ? void 0 : _b.globalInstance) === null || _c === void 0 ? void 0 : _c.disableDimensionHoverEvent) === null || _d === void 0 ? void 0 : _d.call(_c))) {
64438
+ if (!params) {
64464
64439
  return;
64465
64440
  }
64466
64441
  const x = params.event.viewX;
@@ -64482,8 +64457,7 @@ class DimensionHoverEvent extends DimensionEvent {
64482
64457
  }
64483
64458
  };
64484
64459
  this.onMouseOut = (params) => {
64485
- var _a, _b, _c, _d;
64486
- if (!params || ((_d = (_c = (_b = (_a = params.chart) === null || _a === void 0 ? void 0 : _a.getOption()) === null || _b === void 0 ? void 0 : _b.globalInstance) === null || _c === void 0 ? void 0 : _c.disableDimensionHoverEvent) === null || _d === void 0 ? void 0 : _d.call(_c))) {
64460
+ if (!params) {
64487
64461
  return;
64488
64462
  }
64489
64463
  this._callback.call(null, Object.assign(Object.assign({}, params), { action: 'leave', dimensionInfo: this._cacheDimensionInfo ? this._cacheDimensionInfo.slice() : [] }));
@@ -71781,9 +71755,6 @@ class BaseTooltipProcessor {
71781
71755
  }
71782
71756
  shouldHandleTooltip(params, info) {
71783
71757
  var _a, _b;
71784
- if (!this.component.enable) {
71785
- return false;
71786
- }
71787
71758
  if (isNil$1(info)) {
71788
71759
  return false;
71789
71760
  }
@@ -95668,7 +95639,7 @@ const hasData = (data) => {
95668
95639
  return Object.keys(data).length > 0;
95669
95640
  };
95670
95641
  function showTooltip(datum, options, component) {
95671
- var _a, _b, _c, _d, _e, _f;
95642
+ var _a, _b, _c, _d, _e, _f, _g;
95672
95643
  const opt = Object.assign({ regionIndex: 0 }, options);
95673
95644
  const componentOptions = component.getOption();
95674
95645
  const region = componentOptions.getRegionsInUserIdOrIndex(isValid$1(opt.regionId) ? [opt.regionId] : undefined, isValid$1(opt.regionIndex) ? [opt.regionIndex] : undefined)[0];
@@ -95688,12 +95659,11 @@ function showTooltip(datum, options, component) {
95688
95659
  const getOriginDatum = (info) => {
95689
95660
  var _a;
95690
95661
  const { dimensionFields, dimensionData, measureFields, measureData, groupField, groupData } = info.data;
95691
- const originDatum = (_a = info.series.getViewData()) === null || _a === void 0 ? void 0 : _a.latestData.find((datum) => {
95662
+ return (_a = info.series.getViewData()) === null || _a === void 0 ? void 0 : _a.latestData.find((datum) => {
95692
95663
  return (datumContainsArray(dimensionFields, dimensionData)(datum) &&
95693
95664
  datumContainsArray(measureFields, measureData)(datum) &&
95694
95665
  (isNil$1(groupField) || datumContainsArray([groupField], [groupData])(datum)));
95695
95666
  });
95696
- return originDatum;
95697
95667
  };
95698
95668
  const transform = region.getOption().globalInstance.getStage().window.getViewBoxTransform().getInverse();
95699
95669
  const getMockEvent = (originPos) => {
@@ -95767,7 +95737,7 @@ function showTooltip(datum, options, component) {
95767
95737
  if (!info) {
95768
95738
  return 'none';
95769
95739
  }
95770
- const mockDatum = Object.assign(Object.assign({}, getOriginDatum(info)), datum);
95740
+ const mockDatum = (_f = info.data.originDatum) !== null && _f !== void 0 ? _f : Object.assign(Object.assign({}, getOriginDatum(info)), datum);
95771
95741
  const mockDimensionData = [
95772
95742
  {
95773
95743
  datum: [mockDatum],
@@ -95784,7 +95754,7 @@ function showTooltip(datum, options, component) {
95784
95754
  changePositionOnly: false,
95785
95755
  tooltip: null,
95786
95756
  dimensionInfo: mockDimensionInfo,
95787
- chart: (_f = componentOptions.globalInstance.getChart()) !== null && _f !== void 0 ? _f : undefined,
95757
+ chart: (_g = componentOptions.globalInstance.getChart()) !== null && _g !== void 0 ? _g : undefined,
95788
95758
  datum: mockDatum,
95789
95759
  model: info.series,
95790
95760
  source: Event_Source_Type.chart,
@@ -95849,6 +95819,40 @@ const getMarkInfoList = (datum, region) => {
95849
95819
  series
95850
95820
  });
95851
95821
  };
95822
+ const parseMarkInfoOfGeoSeries = () => {
95823
+ var _a, _b;
95824
+ const originDatum = (_b = (_a = series
95825
+ .getMapViewData) === null || _a === void 0 ? void 0 : _a.call(series)) === null || _b === void 0 ? void 0 : _b.latestData.find((datum) => dimensionFields.every((key, i) => datum.properties[key] === (dimensionData === null || dimensionData === void 0 ? void 0 : dimensionData[i])));
95826
+ let markInfoMeasureData = measureData;
95827
+ if (!hasMeasureData) {
95828
+ measureData = getDataArrayFromFieldArray(measureFields, originDatum);
95829
+ markInfoMeasureData = measureData;
95830
+ if (!hasData(measureData) && !originDatum) {
95831
+ return;
95832
+ }
95833
+ measureData = Object.assign({}, originDatum.properties);
95834
+ }
95835
+ const pos = series.type === SeriesTypeEnum.pie
95836
+ ? series.dataToCentralPosition(originDatum.properties)
95837
+ : series.dataToPosition(originDatum.properties);
95838
+ if (isNil$1(pos) || isNaN(pos.x) || isNaN(pos.y)) {
95839
+ return;
95840
+ }
95841
+ markInfoList.push({
95842
+ pos,
95843
+ data: {
95844
+ dimensionFields,
95845
+ dimensionData,
95846
+ measureFields,
95847
+ measureData: markInfoMeasureData,
95848
+ hasMeasureData,
95849
+ groupField,
95850
+ groupData,
95851
+ originDatum
95852
+ },
95853
+ series
95854
+ });
95855
+ };
95852
95856
  if (series.coordinate === 'cartesian') {
95853
95857
  const cartesianSeries = series;
95854
95858
  const dimType = isDiscrete((_f = (_e = series.getYAxisHelper()) === null || _e === void 0 ? void 0 : _e.getScale(0)) === null || _f === void 0 ? void 0 : _f.type) ? 'y' : 'x';
@@ -95973,7 +95977,7 @@ const getMarkInfoList = (datum, region) => {
95973
95977
  }
95974
95978
  }
95975
95979
  else if (series.coordinate === 'geo') {
95976
- parseMarkInfoOfSimpleSeries();
95980
+ parseMarkInfoOfGeoSeries();
95977
95981
  }
95978
95982
  });
95979
95983
  return markInfoList;
@@ -96081,7 +96085,6 @@ class Tooltip extends BaseComponent {
96081
96085
  this.specKey = 'tooltip';
96082
96086
  this.layoutType = 'none';
96083
96087
  this._isReleased = false;
96084
- this.enable = true;
96085
96088
  this._alwaysShow = false;
96086
96089
  this._eventList = [];
96087
96090
  this._isTooltipShown = false;
@@ -103237,9 +103240,6 @@ class Brush extends BaseComponent {
103237
103240
  this._initMarkBrushState(componentIndex, '');
103238
103241
  brushComponent.children[0].removeAllChild();
103239
103242
  }
103240
- _shouldEnableInteractive() {
103241
- return this.getOption().getCompiler().getOption().interactive !== false;
103242
- }
103243
103243
  _createBrushComponent(region, componentIndex) {
103244
103244
  var _a, _b;
103245
103245
  const interactiveAttr = this._getBrushInteractiveAttr(region);
@@ -103250,45 +103250,33 @@ class Brush extends BaseComponent {
103250
103250
  this._cacheInteractiveRangeAttrs.push(interactiveAttr);
103251
103251
  brush.addEventListener(IOperateType.brushActive, (e) => {
103252
103252
  this._initMarkBrushState(componentIndex, OUT_BRUSH_STATE);
103253
- this._emitEvent(ChartEvent.brushActive, region, e);
103253
+ this._emitEvent(ChartEvent.brushActive, region);
103254
103254
  });
103255
103255
  brush.addEventListener(IOperateType.drawStart, (e) => {
103256
- if (this._spec.disableDimensionHoverWhenBrushing) {
103257
- this._option.globalInstance.disableDimensionHoverEvent(true);
103258
- }
103259
103256
  this._setRegionMarkPickable(region, true);
103260
- this._emitEvent(ChartEvent.brushStart, region, e);
103257
+ this._emitEvent(ChartEvent.brushStart, region);
103261
103258
  });
103262
103259
  brush.addEventListener(IOperateType.moveStart, (e) => {
103263
- if (this._spec.disableDimensionHoverWhenBrushing) {
103264
- this._option.globalInstance.disableDimensionHoverEvent(true);
103265
- }
103266
103260
  this._setRegionMarkPickable(region, true);
103267
- this._emitEvent(ChartEvent.brushStart, region, e);
103261
+ this._emitEvent(ChartEvent.brushStart, region);
103268
103262
  });
103269
103263
  brush.addEventListener(IOperateType.drawing, (e) => {
103270
103264
  this._setRegionMarkPickable(region, false);
103271
103265
  this._handleBrushChange(region, e);
103272
- this._emitEvent(ChartEvent.brushChange, region, e);
103266
+ this._emitEvent(ChartEvent.brushChange, region);
103273
103267
  });
103274
103268
  brush.addEventListener(IOperateType.moving, (e) => {
103275
103269
  this._setRegionMarkPickable(region, false);
103276
103270
  this._handleBrushChange(region, e);
103277
- this._emitEvent(ChartEvent.brushChange, region, e);
103271
+ this._emitEvent(ChartEvent.brushChange, region);
103278
103272
  });
103279
103273
  brush.addEventListener(IOperateType.brushClear, (e) => {
103280
- if (this._spec.disableDimensionHoverWhenBrushing) {
103281
- this._option.globalInstance.disableDimensionHoverEvent(false);
103282
- }
103283
103274
  this._setRegionMarkPickable(region, true);
103284
103275
  this._initMarkBrushState(componentIndex, '');
103285
- this._emitEvent(ChartEvent.brushClear, region, e);
103276
+ this._emitEvent(ChartEvent.brushClear, region);
103286
103277
  });
103287
103278
  brush.addEventListener(IOperateType.drawEnd, (e) => {
103288
103279
  var _a;
103289
- if (this._spec.disableDimensionHoverWhenBrushing) {
103290
- this._option.globalInstance.disableDimensionHoverEvent(false);
103291
- }
103292
103280
  this._setRegionMarkPickable(region, true);
103293
103281
  const { operateMask } = e.detail;
103294
103282
  const { updateElementsState = true } = this._spec;
@@ -103296,11 +103284,11 @@ class Brush extends BaseComponent {
103296
103284
  if (this._spec.onBrushEnd(e) === true) {
103297
103285
  this.clearGraphic();
103298
103286
  this._initMarkBrushState(componentIndex, '');
103299
- this._emitEvent(ChartEvent.brushClear, region, e);
103287
+ this._emitEvent(ChartEvent.brushClear, region);
103300
103288
  }
103301
103289
  else {
103302
103290
  this._spec.onBrushEnd(e);
103303
- this._emitEvent(ChartEvent.brushEnd, region, e);
103291
+ this._emitEvent(ChartEvent.brushEnd, region);
103304
103292
  }
103305
103293
  }
103306
103294
  else {
@@ -103308,13 +103296,10 @@ class Brush extends BaseComponent {
103308
103296
  if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || !updateElementsState) {
103309
103297
  this._setAxisAndDataZoom(operateMask, region);
103310
103298
  }
103311
- this._emitEvent(ChartEvent.brushEnd, region, e);
103299
+ this._emitEvent(ChartEvent.brushEnd, region);
103312
103300
  }
103313
103301
  });
103314
103302
  brush.addEventListener(IOperateType.moveEnd, (e) => {
103315
- if (this._spec.disableDimensionHoverWhenBrushing) {
103316
- this._option.globalInstance.disableDimensionHoverEvent(false);
103317
- }
103318
103303
  this._setRegionMarkPickable(region, true);
103319
103304
  const { operateMask } = e.detail;
103320
103305
  const { updateElementsState = true } = this._spec;
@@ -103322,7 +103307,7 @@ class Brush extends BaseComponent {
103322
103307
  if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || updateElementsState) {
103323
103308
  this._setAxisAndDataZoom(operateMask, region);
103324
103309
  }
103325
- this._emitEvent(ChartEvent.brushEnd, region, e);
103310
+ this._emitEvent(ChartEvent.brushEnd, region);
103326
103311
  });
103327
103312
  }
103328
103313
  _getBrushInteractiveAttr(region) {
@@ -103340,8 +103325,7 @@ class Brush extends BaseComponent {
103340
103325
  maxX: seriesRegionEndX
103341
103326
  },
103342
103327
  xRange: [seriesRegionStartX, seriesRegionEndX],
103343
- yRange: [seriesRegionStartY, seriesRegionEndY],
103344
- interactive: this._shouldEnableInteractive()
103328
+ yRange: [seriesRegionStartY, seriesRegionEndY]
103345
103329
  };
103346
103330
  }
103347
103331
  _transformBrushedMarkAttr(brushedStyle) {
@@ -103362,7 +103346,6 @@ class Brush extends BaseComponent {
103362
103346
  }
103363
103347
  _handleBrushChange(region, e) {
103364
103348
  const { operateMask } = e.detail;
103365
- this._operateMask = operateMask;
103366
103349
  const { updateElementsState = true } = this._spec;
103367
103350
  if (updateElementsState) {
103368
103351
  this._reconfigItem(operateMask, region);
@@ -103387,7 +103370,7 @@ class Brush extends BaseComponent {
103387
103370
  }
103388
103371
  return data;
103389
103372
  }
103390
- _emitEvent(eventType, region, e) {
103373
+ _emitEvent(eventType, region) {
103391
103374
  var _a;
103392
103375
  this.event.emit(eventType, {
103393
103376
  model: this,
@@ -103404,8 +103387,7 @@ class Brush extends BaseComponent {
103404
103387
  linkedOutOfBrushElementsMap: this._linkedOutOfBrushElementsMap,
103405
103388
  zoomRecord: this._zoomRecord
103406
103389
  },
103407
- vchart: (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance,
103408
- event: e
103390
+ vchart: (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance
103409
103391
  });
103410
103392
  }
103411
103393
  _reconfigItem(operateMask, region) {
@@ -103660,12 +103642,6 @@ class Brush extends BaseComponent {
103660
103642
  this._brushComponents = null;
103661
103643
  }
103662
103644
  }
103663
- clearBrushStateAndMask() {
103664
- this._relativeRegions.forEach((region, componentIndex) => {
103665
- this._initMarkBrushState(componentIndex, '');
103666
- this._brushComponents[componentIndex].children[0].removeAllChild();
103667
- });
103668
- }
103669
103645
  }
103670
103646
  Brush.type = ComponentTypeEnum.brush;
103671
103647
  Brush.builtInTheme = {