@visactor/vchart 2.0.13-alpha.1 → 2.0.13-alpha.10

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 (88) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +98 -36
  3. package/build/index.js +98 -36
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/compile/compiler.d.ts +1 -0
  7. package/cjs/compile/compiler.js +3 -0
  8. package/cjs/compile/compiler.js.map +1 -1
  9. package/cjs/compile/interface/compilable-item.d.ts +2 -1
  10. package/cjs/compile/interface/compilable-item.js.map +1 -1
  11. package/cjs/component/brush/brush.d.ts +4 -1
  12. package/cjs/component/brush/brush.js +18 -2
  13. package/cjs/component/brush/brush.js.map +1 -1
  14. package/cjs/component/brush/interface.d.ts +1 -0
  15. package/cjs/component/brush/interface.js.map +1 -1
  16. package/cjs/component/crosshair/interface/spec.d.ts +1 -0
  17. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  18. package/cjs/component/tooltip/interface/common.d.ts +1 -0
  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 +1 -0
  23. package/cjs/component/tooltip/tooltip.js +3 -2
  24. package/cjs/component/tooltip/tooltip.js.map +1 -1
  25. package/cjs/component/tooltip/utils/show-tooltip.js +10 -2
  26. package/cjs/component/tooltip/utils/show-tooltip.js.map +1 -1
  27. package/cjs/core/interface.d.ts +9 -1
  28. package/cjs/core/interface.js.map +1 -1
  29. package/cjs/core/vchart.d.ts +4 -0
  30. package/cjs/core/vchart.js +10 -1
  31. package/cjs/core/vchart.js.map +1 -1
  32. package/cjs/event/event.js +1 -1
  33. package/cjs/event/event.js.map +1 -1
  34. package/cjs/event/events/dimension/dimension-hover.js +4 -2
  35. package/cjs/event/events/dimension/dimension-hover.js.map +1 -1
  36. package/cjs/interaction/interface/trigger.d.ts +1 -1
  37. package/cjs/interaction/interface/trigger.js.map +1 -1
  38. package/cjs/interaction/triggers/base.d.ts +3 -2
  39. package/cjs/interaction/triggers/base.js +2 -2
  40. package/cjs/interaction/triggers/base.js.map +1 -1
  41. package/cjs/interaction/triggers/element-highlight.d.ts +3 -3
  42. package/cjs/interaction/triggers/element-highlight.js +11 -11
  43. package/cjs/interaction/triggers/element-highlight.js.map +1 -1
  44. package/cjs/interaction/triggers/element-select.d.ts +3 -3
  45. package/cjs/interaction/triggers/element-select.js +13 -13
  46. package/cjs/interaction/triggers/element-select.js.map +1 -1
  47. package/esm/compile/compiler.d.ts +1 -0
  48. package/esm/compile/compiler.js +3 -0
  49. package/esm/compile/compiler.js.map +1 -1
  50. package/esm/compile/interface/compilable-item.d.ts +2 -1
  51. package/esm/compile/interface/compilable-item.js.map +1 -1
  52. package/esm/component/brush/brush.d.ts +4 -1
  53. package/esm/component/brush/brush.js +18 -2
  54. package/esm/component/brush/brush.js.map +1 -1
  55. package/esm/component/brush/interface.d.ts +1 -0
  56. package/esm/component/brush/interface.js.map +1 -1
  57. package/esm/component/crosshair/interface/spec.d.ts +1 -0
  58. package/esm/component/crosshair/interface/spec.js.map +1 -1
  59. package/esm/component/tooltip/interface/common.d.ts +1 -0
  60. package/esm/component/tooltip/interface/common.js.map +1 -1
  61. package/esm/component/tooltip/processor/base.js +1 -1
  62. package/esm/component/tooltip/processor/base.js.map +1 -1
  63. package/esm/component/tooltip/tooltip.d.ts +1 -0
  64. package/esm/component/tooltip/tooltip.js +3 -2
  65. package/esm/component/tooltip/tooltip.js.map +1 -1
  66. package/esm/component/tooltip/utils/show-tooltip.js +10 -2
  67. package/esm/component/tooltip/utils/show-tooltip.js.map +1 -1
  68. package/esm/core/interface.d.ts +9 -1
  69. package/esm/core/interface.js.map +1 -1
  70. package/esm/core/vchart.d.ts +4 -0
  71. package/esm/core/vchart.js +10 -1
  72. package/esm/core/vchart.js.map +1 -1
  73. package/esm/event/event.js +1 -1
  74. package/esm/event/event.js.map +1 -1
  75. package/esm/event/events/dimension/dimension-hover.js +4 -2
  76. package/esm/event/events/dimension/dimension-hover.js.map +1 -1
  77. package/esm/interaction/interface/trigger.d.ts +1 -1
  78. package/esm/interaction/interface/trigger.js.map +1 -1
  79. package/esm/interaction/triggers/base.d.ts +3 -2
  80. package/esm/interaction/triggers/base.js +2 -2
  81. package/esm/interaction/triggers/base.js.map +1 -1
  82. package/esm/interaction/triggers/element-highlight.d.ts +3 -3
  83. package/esm/interaction/triggers/element-highlight.js +11 -11
  84. package/esm/interaction/triggers/element-highlight.js.map +1 -1
  85. package/esm/interaction/triggers/element-select.d.ts +3 -3
  86. package/esm/interaction/triggers/element-select.js +13 -13
  87. package/esm/interaction/triggers/element-select.js.map +1 -1
  88. package/package.json +9 -9
package/build/index.js CHANGED
@@ -51102,6 +51102,7 @@
51102
51102
  let Brush$1 = class Brush extends AbstractComponent {
51103
51103
  constructor(attributes, options) {
51104
51104
  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 => {
51105
+ if (!1 === this.attribute.interactive) return;
51105
51106
  if (!1 === this._beforeBrushEvent(e)) return;
51106
51107
  const {
51107
51108
  updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
@@ -51110,11 +51111,11 @@
51110
51111
  } = this.attribute;
51111
51112
  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];
51112
51113
  }, this._onBrushing = e => {
51113
- !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))));
51114
+ !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))));
51114
51115
  }, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap$1[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
51115
- this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1;
51116
+ !1 !== this.attribute.interactive && (this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1);
51116
51117
  }, this._onBrushClear = e => {
51117
- !1 !== this._beforeBrushEvent(e) && (e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1);
51118
+ !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);
51118
51119
  };
51119
51120
  }
51120
51121
  _bindBrushEvents() {
@@ -51126,6 +51127,7 @@
51126
51127
  array(trigger).forEach(t => this.stage.addEventListener(t, this._onBrushStart)), array(resetTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushClear));
51127
51128
  }
51128
51129
  _initDraw(e) {
51130
+ if (!1 === this.attribute.interactive) return;
51129
51131
  const {
51130
51132
  brushMode: brushMode
51131
51133
  } = this.attribute,
@@ -51134,6 +51136,7 @@
51134
51136
  }
51135
51137
  _initMove(e) {
51136
51138
  var _a, _b;
51139
+ if (!1 === this.attribute.interactive) return;
51137
51140
  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;
51138
51141
  const {
51139
51142
  interactiveRange: interactiveRange
@@ -51158,6 +51161,7 @@
51158
51161
  }
51159
51162
  _drawing(e) {
51160
51163
  var _a;
51164
+ if (!1 === this.attribute.interactive) return;
51161
51165
  const pos = this.eventPosToStagePos(e),
51162
51166
  {
51163
51167
  brushType: brushType,
@@ -51182,6 +51186,7 @@
51182
51186
  (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)));
51183
51187
  }
51184
51188
  _moving(e) {
51189
+ if (!1 === this.attribute.interactive) return;
51185
51190
  const startPos = this._cacheMovePoint,
51186
51191
  pos = this.eventPosToStagePos(e);
51187
51192
  if (pos.x === (null == startPos ? void 0 : startPos.x) && pos.y === (null == startPos ? void 0 : startPos.y)) return;
@@ -51195,6 +51200,7 @@
51195
51200
  }), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this._dispatchBrushEvent(IOperateType.moving, e);
51196
51201
  }
51197
51202
  _drawEnd(e) {
51203
+ if (!1 === this.attribute.interactive) return;
51198
51204
  const {
51199
51205
  removeOnClick = !0,
51200
51206
  sizeThreshold = DEFAULT_SIZE_THRESHOLD
@@ -51212,7 +51218,7 @@
51212
51218
  }
51213
51219
  }
51214
51220
  _moveEnd(e) {
51215
- this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e);
51221
+ !1 !== this.attribute.interactive && (this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e));
51216
51222
  }
51217
51223
  render() {
51218
51224
  this._bindBrushEvents();
@@ -53868,7 +53874,7 @@
53868
53874
  if (ComposedEventCtor) {
53869
53875
  const composedEvent = new ComposedEventCtor(this._eventDispatcher, this._mode);
53870
53876
  composedEvent.register(eType, handler);
53871
- this._composedEventMap.set(callback, {
53877
+ this._composedEventMap.set(handler.callback, {
53872
53878
  eventType: eType,
53873
53879
  event: composedEvent
53874
53880
  });
@@ -54905,6 +54911,9 @@
54905
54911
  getRootGroup() {
54906
54912
  return this._rootGroup;
54907
54913
  }
54914
+ getOption() {
54915
+ return this._option;
54916
+ }
54908
54917
  constructor(container, option) {
54909
54918
  this._count = 0;
54910
54919
  this._rootMarks = [];
@@ -60026,9 +60035,9 @@
60026
60035
  });
60027
60036
  }
60028
60037
  }
60029
- start(g) {
60038
+ start(g, e) {
60030
60039
  }
60031
- reset(g) {
60040
+ reset(g, e) {
60032
60041
  }
60033
60042
  dispatchEvent(type, params) {
60034
60043
  if (this.options.event) {
@@ -60059,17 +60068,17 @@
60059
60068
  constructor(options) {
60060
60069
  super(options);
60061
60070
  this.type = "element-highlight";
60062
- this.resetAll = () => {
60071
+ this.resetAll = (e) => {
60063
60072
  const { highlightState, blurState, interaction } = this.options;
60064
60073
  if (this._lastGraphic) {
60065
60074
  interaction.clearAllStatesOfTrigger(this, highlightState, blurState);
60066
- this.dispatchEvent('reset', { graphics: [this._lastGraphic], options: this.options });
60075
+ this.dispatchEvent('reset', Object.assign({ graphics: [this._lastGraphic], options: this.options }, e));
60067
60076
  this._lastGraphic = null;
60068
60077
  interaction.setStatedGraphics(this, []);
60069
60078
  }
60070
60079
  };
60071
60080
  this.handleStart = (e) => {
60072
- this.start(e.item);
60081
+ this.start(e.item, e);
60073
60082
  };
60074
60083
  this.handleReset = (e) => {
60075
60084
  const { interaction } = this.options;
@@ -60080,10 +60089,10 @@
60080
60089
  const markGraphic = e.item;
60081
60090
  const hasActiveElement = markGraphic && this._markSet.getMarkInId(markGraphic.context.markId);
60082
60091
  if (this._resetType.includes('view') && !hasActiveElement) {
60083
- this.resetAll();
60092
+ this.resetAll(e);
60084
60093
  }
60085
60094
  else if (this._resetType.includes('self') && hasActiveElement) {
60086
- this.resetAll();
60095
+ this.resetAll(e);
60087
60096
  }
60088
60097
  };
60089
60098
  this.options = Object.assign({}, defaultOptions$6, options);
@@ -60115,7 +60124,7 @@
60115
60124
  events.push({ type: eventName, handler: this.handleReset });
60116
60125
  return events;
60117
60126
  }
60118
- start(markGraphic) {
60127
+ start(markGraphic, e) {
60119
60128
  if (markGraphic && this._markSet.getMarkInId(markGraphic.context.markId)) {
60120
60129
  const { highlightState, blurState, interaction } = this.options;
60121
60130
  if (this._lastGraphic === markGraphic) {
@@ -60124,20 +60133,20 @@
60124
60133
  const newStatedGraphics = interaction.updateStates(this, [markGraphic], interaction.getStatedGraphics(this), highlightState, blurState);
60125
60134
  interaction.setStatedGraphics(this, newStatedGraphics);
60126
60135
  this._lastGraphic = markGraphic;
60127
- this.dispatchEvent('start', { graphics: newStatedGraphics, options: this.options });
60136
+ this.dispatchEvent('start', Object.assign({ graphics: newStatedGraphics, options: this.options }, e));
60128
60137
  }
60129
60138
  else if (this._lastGraphic && this._resetType === 'view') {
60130
- this.resetAll();
60139
+ this.resetAll(e);
60131
60140
  }
60132
60141
  }
60133
- reset(markGraphic) {
60142
+ reset(markGraphic, e) {
60134
60143
  if (markGraphic) {
60135
60144
  if (this._markSet.getMarkInId(markGraphic.context.markId)) {
60136
60145
  markGraphic.removeState([this.options.highlightState, this.options.blurState]);
60137
60146
  }
60138
60147
  }
60139
60148
  else {
60140
- this.resetAll();
60149
+ this.resetAll(e);
60141
60150
  }
60142
60151
  }
60143
60152
  }
@@ -60156,17 +60165,17 @@
60156
60165
  super(options);
60157
60166
  this.type = "element-select";
60158
60167
  this._resetType = [];
60159
- this.resetAll = () => {
60168
+ this.resetAll = (e) => {
60160
60169
  const { state, reverseState, interaction } = this.options;
60161
60170
  const statedGraphics = interaction.getStatedGraphics(this);
60162
60171
  if (statedGraphics && statedGraphics.length) {
60163
60172
  interaction.clearAllStatesOfTrigger(this, state, reverseState);
60164
- this.dispatchEvent('reset', { graphics: statedGraphics, options: this.options });
60173
+ this.dispatchEvent('reset', Object.assign({ graphics: statedGraphics, options: this.options }, e));
60165
60174
  interaction.setStatedGraphics(this, []);
60166
60175
  }
60167
60176
  };
60168
60177
  this.handleStart = (e) => {
60169
- this.start(e.item);
60178
+ this.start(e.item, e);
60170
60179
  };
60171
60180
  this.handleReset = (e) => {
60172
60181
  const { interaction } = this.options;
@@ -60177,10 +60186,10 @@
60177
60186
  const markGraphic = e.item;
60178
60187
  const hasActiveElement = markGraphic && this._markSet.getMarkInId(markGraphic.context.markId);
60179
60188
  if (this._resetType.includes('view') && !hasActiveElement) {
60180
- this.resetAll();
60189
+ this.resetAll(e);
60181
60190
  }
60182
60191
  else if (this._resetType.includes('self') && hasActiveElement) {
60183
- this.resetAll();
60192
+ this.resetAll(e);
60184
60193
  }
60185
60194
  };
60186
60195
  this.options = Object.assign({}, defaultOptions$5, options);
@@ -60210,7 +60219,7 @@
60210
60219
  this._resetType = resetType;
60211
60220
  return events;
60212
60221
  }
60213
- start(markGraphic) {
60222
+ start(markGraphic, e) {
60214
60223
  const { state, reverseState, isMultiple, interaction } = this.options;
60215
60224
  const statedGraphics = interaction.getStatedGraphics(this);
60216
60225
  if (markGraphic && this._markSet.getMarkInId(markGraphic.context.markId)) {
@@ -60221,7 +60230,7 @@
60221
60230
  interaction.setStatedGraphics(this, interaction.updateStates(this, newStatedGraphics, statedGraphics, state, reverseState));
60222
60231
  }
60223
60232
  else {
60224
- this.resetAll();
60233
+ this.resetAll(e);
60225
60234
  }
60226
60235
  }
60227
60236
  }
@@ -60232,26 +60241,26 @@
60232
60241
  markGraphic.addState(state, true);
60233
60242
  const newStatedGraphics = this.options.interaction.updateStates(this, isMultiple && statedGraphics ? [...statedGraphics, markGraphic] : [markGraphic], statedGraphics, state, reverseState);
60234
60243
  interaction.setStatedGraphics(this, newStatedGraphics);
60235
- this.dispatchEvent('start', { graphics: newStatedGraphics, options: this.options });
60244
+ this.dispatchEvent('start', Object.assign({ graphics: newStatedGraphics, options: this.options }, e));
60236
60245
  if (this._resetType.includes('timeout')) {
60237
60246
  this._timer = setTimeout(() => {
60238
- this.resetAll();
60247
+ this.resetAll(e);
60239
60248
  }, this.options.triggerOff);
60240
60249
  }
60241
60250
  }
60242
60251
  }
60243
60252
  else if (this._resetType.includes('view') && statedGraphics && statedGraphics.length) {
60244
- this.resetAll();
60253
+ this.resetAll(e);
60245
60254
  }
60246
60255
  }
60247
- reset(markGraphic) {
60256
+ reset(markGraphic, e) {
60248
60257
  if (markGraphic) {
60249
60258
  if (this._markSet.getMarkInId(markGraphic.context.markId)) {
60250
60259
  markGraphic.removeState([this.options.state, this.options.reverseState]);
60251
60260
  }
60252
60261
  }
60253
60262
  else {
60254
- this.resetAll();
60263
+ this.resetAll(e);
60255
60264
  }
60256
60265
  }
60257
60266
  }
@@ -60381,6 +60390,7 @@
60381
60390
  this._observer = null;
60382
60391
  this._context = {};
60383
60392
  this._renderState = RenderStateEnum.render;
60393
+ this._disableDimensionHoverEvent = false;
60384
60394
  this._doResize = () => {
60385
60395
  const { width, height } = this.getCurrentSize();
60386
60396
  if (this._currentSize.width !== width || this._currentSize.height !== height) {
@@ -60525,7 +60535,7 @@
60525
60535
  this._compiler.updateLayoutTag();
60526
60536
  this._setFontFamilyTheme(this.getTheme('fontFamily'));
60527
60537
  this._initDataSet(this._option.dataSet);
60528
- this._autoSize = isTrueBrowseEnv ? (_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true : false;
60538
+ this._autoSize = isTrueBrowseEnv ? ((_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true) : false;
60529
60539
  this._bindResizeEvent();
60530
60540
  this._bindViewEvent();
60531
60541
  this._initChartPlugin();
@@ -61178,7 +61188,7 @@
61178
61188
  resize = true;
61179
61189
  }
61180
61190
  const lasAutoSize = this._autoSize;
61181
- 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;
61191
+ 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;
61182
61192
  if (this._autoSize !== lasAutoSize) {
61183
61193
  resize = true;
61184
61194
  }
@@ -61419,6 +61429,22 @@
61419
61429
  var _a;
61420
61430
  return (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setDimensionIndex(value, opt);
61421
61431
  }
61432
+ disableDimensionHoverEvent(value) {
61433
+ if (value !== undefined) {
61434
+ this._disableDimensionHoverEvent = value;
61435
+ }
61436
+ return this._disableDimensionHoverEvent;
61437
+ }
61438
+ disableCrossHair(value = true) {
61439
+ this.getChart()
61440
+ .getComponentsByKey('crosshair')
61441
+ .forEach(crosshair => (crosshair.enable = !value));
61442
+ }
61443
+ disableTooltip(value = true) {
61444
+ this.getChart()
61445
+ .getComponentsByKey('tooltip')
61446
+ .forEach(tooltip => (tooltip.enable = !value));
61447
+ }
61422
61448
  showCrosshair(cb) {
61423
61449
  var _a;
61424
61450
  (_a = this._chart) === null || _a === void 0 ? void 0 : _a.showCrosshair(cb);
@@ -64439,7 +64465,8 @@
64439
64465
  super(...arguments);
64440
64466
  this._cacheDimensionInfo = null;
64441
64467
  this.onMouseMove = (params) => {
64442
- if (!params) {
64468
+ var _a, _b, _c, _d;
64469
+ 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))) {
64443
64470
  return;
64444
64471
  }
64445
64472
  const x = params.event.viewX;
@@ -64461,7 +64488,8 @@
64461
64488
  }
64462
64489
  };
64463
64490
  this.onMouseOut = (params) => {
64464
- if (!params) {
64491
+ var _a, _b, _c, _d;
64492
+ 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))) {
64465
64493
  return;
64466
64494
  }
64467
64495
  this._callback.call(null, Object.assign(Object.assign({}, params), { action: 'leave', dimensionInfo: this._cacheDimensionInfo ? this._cacheDimensionInfo.slice() : [] }));
@@ -71759,6 +71787,9 @@
71759
71787
  }
71760
71788
  shouldHandleTooltip(params, info) {
71761
71789
  var _a, _b;
71790
+ if (!this.component.enable) {
71791
+ return false;
71792
+ }
71762
71793
  if (isNil$1(info)) {
71763
71794
  return false;
71764
71795
  }
@@ -95670,11 +95701,15 @@
95670
95701
  });
95671
95702
  return originDatum;
95672
95703
  };
95704
+ const transform = region.getOption().globalInstance.getStage().window.getViewBoxTransform().getInverse();
95673
95705
  const getMockEvent = (originPos) => {
95674
95706
  var _a, _b;
95675
95707
  const pos = bound(originPos);
95676
- const canvasX = (_a = opt.x) !== null && _a !== void 0 ? _a : regionPos.x + pos.x;
95677
- const canvasY = (_b = opt.y) !== null && _b !== void 0 ? _b : regionPos.y + pos.y;
95708
+ const tempX = (_a = opt.x) !== null && _a !== void 0 ? _a : regionPos.x + pos.x;
95709
+ const tempY = (_b = opt.y) !== null && _b !== void 0 ? _b : regionPos.y + pos.y;
95710
+ const canvasPoint = { x: 0, y: 0 };
95711
+ transform.transformPoint({ x: tempX, y: tempY }, canvasPoint);
95712
+ const { x: canvasX, y: canvasY } = canvasPoint;
95678
95713
  return {
95679
95714
  canvasX,
95680
95715
  canvasY,
@@ -96052,6 +96087,7 @@
96052
96087
  this.specKey = 'tooltip';
96053
96088
  this.layoutType = 'none';
96054
96089
  this._isReleased = false;
96090
+ this.enable = true;
96055
96091
  this._alwaysShow = false;
96056
96092
  this._eventList = [];
96057
96093
  this._isTooltipShown = false;
@@ -103207,6 +103243,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103207
103243
  this._initMarkBrushState(componentIndex, '');
103208
103244
  brushComponent.children[0].removeAllChild();
103209
103245
  }
103246
+ _shouldEnableInteractive() {
103247
+ return this.getOption().getCompiler().getOption().interactive !== false;
103248
+ }
103210
103249
  _createBrushComponent(region, componentIndex) {
103211
103250
  var _a, _b;
103212
103251
  const interactiveAttr = this._getBrushInteractiveAttr(region);
@@ -103220,10 +103259,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103220
103259
  this._emitEvent(exports.ChartEvent.brushActive, region, e);
103221
103260
  });
103222
103261
  brush.addEventListener(IOperateType.drawStart, (e) => {
103262
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103263
+ this._option.globalInstance.disableDimensionHoverEvent(true);
103264
+ }
103223
103265
  this._setRegionMarkPickable(region, true);
103224
103266
  this._emitEvent(exports.ChartEvent.brushStart, region, e);
103225
103267
  });
103226
103268
  brush.addEventListener(IOperateType.moveStart, (e) => {
103269
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103270
+ this._option.globalInstance.disableDimensionHoverEvent(true);
103271
+ }
103227
103272
  this._setRegionMarkPickable(region, true);
103228
103273
  this._emitEvent(exports.ChartEvent.brushStart, region, e);
103229
103274
  });
@@ -103238,12 +103283,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103238
103283
  this._emitEvent(exports.ChartEvent.brushChange, region, e);
103239
103284
  });
103240
103285
  brush.addEventListener(IOperateType.brushClear, (e) => {
103286
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103287
+ this._option.globalInstance.disableDimensionHoverEvent(false);
103288
+ }
103241
103289
  this._setRegionMarkPickable(region, true);
103242
103290
  this._initMarkBrushState(componentIndex, '');
103243
103291
  this._emitEvent(exports.ChartEvent.brushClear, region, e);
103244
103292
  });
103245
103293
  brush.addEventListener(IOperateType.drawEnd, (e) => {
103246
103294
  var _a;
103295
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103296
+ this._option.globalInstance.disableDimensionHoverEvent(false);
103297
+ }
103247
103298
  this._setRegionMarkPickable(region, true);
103248
103299
  const { operateMask } = e.detail;
103249
103300
  const { updateElementsState = true } = this._spec;
@@ -103267,6 +103318,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103267
103318
  }
103268
103319
  });
103269
103320
  brush.addEventListener(IOperateType.moveEnd, (e) => {
103321
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103322
+ this._option.globalInstance.disableDimensionHoverEvent(false);
103323
+ }
103270
103324
  this._setRegionMarkPickable(region, true);
103271
103325
  const { operateMask } = e.detail;
103272
103326
  const { updateElementsState = true } = this._spec;
@@ -103292,7 +103346,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103292
103346
  maxX: seriesRegionEndX
103293
103347
  },
103294
103348
  xRange: [seriesRegionStartX, seriesRegionEndX],
103295
- yRange: [seriesRegionStartY, seriesRegionEndY]
103349
+ yRange: [seriesRegionStartY, seriesRegionEndY],
103350
+ interactive: this._shouldEnableInteractive()
103296
103351
  };
103297
103352
  }
103298
103353
  _transformBrushedMarkAttr(brushedStyle) {
@@ -103313,6 +103368,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103313
103368
  }
103314
103369
  _handleBrushChange(region, e) {
103315
103370
  const { operateMask } = e.detail;
103371
+ this._operateMask = operateMask;
103316
103372
  const { updateElementsState = true } = this._spec;
103317
103373
  if (updateElementsState) {
103318
103374
  this._reconfigItem(operateMask, region);
@@ -103610,6 +103666,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103610
103666
  this._brushComponents = null;
103611
103667
  }
103612
103668
  }
103669
+ clearBrushStateAndMask() {
103670
+ this._relativeRegions.forEach((region, componentIndex) => {
103671
+ this._initMarkBrushState(componentIndex, '');
103672
+ this._brushComponents[componentIndex].children[0].removeAllChild();
103673
+ });
103674
+ }
103613
103675
  }
103614
103676
  Brush.type = ComponentTypeEnum.brush;
103615
103677
  Brush.builtInTheme = {