@visactor/vchart 2.0.13-alpha.0 → 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 (112) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +110 -46
  3. package/build/index.js +110 -46
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/animation/callback-disappear.js +2 -1
  7. package/cjs/animation/index.js +1 -2
  8. package/cjs/compile/compiler.d.ts +1 -0
  9. package/cjs/compile/compiler.js +4 -1
  10. package/cjs/compile/compiler.js.map +1 -1
  11. package/cjs/compile/grammar-item.js +1 -1
  12. package/cjs/compile/interface/compilable-item.d.ts +2 -1
  13. package/cjs/compile/interface/compilable-item.js.map +1 -1
  14. package/cjs/compile/morph.js +1 -1
  15. package/cjs/compile/state-manager.js +1 -1
  16. package/cjs/compile/util.js +1 -1
  17. package/cjs/component/brush/brush.d.ts +4 -1
  18. package/cjs/component/brush/brush.js +31 -14
  19. package/cjs/component/brush/brush.js.map +1 -1
  20. package/cjs/component/brush/interface.d.ts +3 -1
  21. package/cjs/component/brush/interface.js.map +1 -1
  22. package/cjs/component/crosshair/interface/spec.d.ts +1 -0
  23. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  24. package/cjs/component/tooltip/interface/common.d.ts +1 -0
  25. package/cjs/component/tooltip/interface/common.js.map +1 -1
  26. package/cjs/component/tooltip/processor/base.js +1 -1
  27. package/cjs/component/tooltip/processor/base.js.map +1 -1
  28. package/cjs/component/tooltip/tooltip.d.ts +1 -0
  29. package/cjs/component/tooltip/tooltip.js +3 -2
  30. package/cjs/component/tooltip/tooltip.js.map +1 -1
  31. package/cjs/component/util.js +1 -2
  32. package/cjs/constant/data.js +2 -1
  33. package/cjs/constant/scroll-bar.js +1 -2
  34. package/cjs/core/index.js +2 -1
  35. package/cjs/core/interface.d.ts +9 -1
  36. package/cjs/core/interface.js +1 -1
  37. package/cjs/core/interface.js.map +1 -1
  38. package/cjs/core/util.js +1 -1
  39. package/cjs/core/vchart.d.ts +4 -0
  40. package/cjs/core/vchart.js +11 -2
  41. package/cjs/core/vchart.js.map +1 -1
  42. package/cjs/env/env.js +1 -1
  43. package/cjs/env/index.js +1 -1
  44. package/cjs/event/event.js +1 -1
  45. package/cjs/event/event.js.map +1 -1
  46. package/cjs/event/events/dimension/dimension-hover.js +4 -2
  47. package/cjs/event/events/dimension/dimension-hover.js.map +1 -1
  48. package/cjs/interaction/interface/trigger.d.ts +1 -1
  49. package/cjs/interaction/interface/trigger.js.map +1 -1
  50. package/cjs/interaction/triggers/base.d.ts +3 -2
  51. package/cjs/interaction/triggers/base.js +2 -2
  52. package/cjs/interaction/triggers/base.js.map +1 -1
  53. package/cjs/interaction/triggers/element-highlight.d.ts +3 -3
  54. package/cjs/interaction/triggers/element-highlight.js +11 -11
  55. package/cjs/interaction/triggers/element-highlight.js.map +1 -1
  56. package/cjs/interaction/triggers/element-select.d.ts +3 -3
  57. package/cjs/interaction/triggers/element-select.js +13 -13
  58. package/cjs/interaction/triggers/element-select.js.map +1 -1
  59. package/esm/animation/callback-disappear.js +2 -1
  60. package/esm/animation/index.js +1 -2
  61. package/esm/compile/compiler.d.ts +1 -0
  62. package/esm/compile/compiler.js +4 -1
  63. package/esm/compile/compiler.js.map +1 -1
  64. package/esm/compile/grammar-item.js +1 -1
  65. package/esm/compile/interface/compilable-item.d.ts +2 -1
  66. package/esm/compile/interface/compilable-item.js.map +1 -1
  67. package/esm/compile/morph.js +1 -1
  68. package/esm/compile/state-manager.js +1 -1
  69. package/esm/compile/util.js +1 -1
  70. package/esm/component/brush/brush.d.ts +4 -1
  71. package/esm/component/brush/brush.js +31 -14
  72. package/esm/component/brush/brush.js.map +1 -1
  73. package/esm/component/brush/interface.d.ts +3 -1
  74. package/esm/component/brush/interface.js.map +1 -1
  75. package/esm/component/crosshair/interface/spec.d.ts +1 -0
  76. package/esm/component/crosshair/interface/spec.js.map +1 -1
  77. package/esm/component/tooltip/interface/common.d.ts +1 -0
  78. package/esm/component/tooltip/interface/common.js.map +1 -1
  79. package/esm/component/tooltip/processor/base.js +1 -1
  80. package/esm/component/tooltip/processor/base.js.map +1 -1
  81. package/esm/component/tooltip/tooltip.d.ts +1 -0
  82. package/esm/component/tooltip/tooltip.js +3 -2
  83. package/esm/component/tooltip/tooltip.js.map +1 -1
  84. package/esm/component/util.js +1 -2
  85. package/esm/constant/data.js +2 -1
  86. package/esm/constant/scroll-bar.js +1 -2
  87. package/esm/core/index.js +2 -1
  88. package/esm/core/interface.d.ts +9 -1
  89. package/esm/core/interface.js +1 -1
  90. package/esm/core/interface.js.map +1 -1
  91. package/esm/core/util.js +1 -1
  92. package/esm/core/vchart.d.ts +4 -0
  93. package/esm/core/vchart.js +11 -2
  94. package/esm/core/vchart.js.map +1 -1
  95. package/esm/env/env.js +1 -1
  96. package/esm/env/index.js +1 -1
  97. package/esm/event/event.js +1 -1
  98. package/esm/event/event.js.map +1 -1
  99. package/esm/event/events/dimension/dimension-hover.js +4 -2
  100. package/esm/event/events/dimension/dimension-hover.js.map +1 -1
  101. package/esm/interaction/interface/trigger.d.ts +1 -1
  102. package/esm/interaction/interface/trigger.js.map +1 -1
  103. package/esm/interaction/triggers/base.d.ts +3 -2
  104. package/esm/interaction/triggers/base.js +2 -2
  105. package/esm/interaction/triggers/base.js.map +1 -1
  106. package/esm/interaction/triggers/element-highlight.d.ts +3 -3
  107. package/esm/interaction/triggers/element-highlight.js +11 -11
  108. package/esm/interaction/triggers/element-highlight.js.map +1 -1
  109. package/esm/interaction/triggers/element-select.d.ts +3 -3
  110. package/esm/interaction/triggers/element-select.js +13 -13
  111. package/esm/interaction/triggers/element-select.js.map +1 -1
  112. package/package.json +7 -7
package/build/index.es.js CHANGED
@@ -51096,6 +51096,8 @@ 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;
51099
51101
  const {
51100
51102
  updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
51101
51103
  endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
@@ -51103,11 +51105,11 @@ let Brush$1 = class Brush extends AbstractComponent {
51103
51105
  } = this.attribute;
51104
51106
  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];
51105
51107
  }, this._onBrushing = 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)));
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))));
51107
51109
  }, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap$1[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
51108
- this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1;
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);
51109
51111
  }, this._onBrushClear = e => {
51110
- e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1;
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);
51111
51113
  };
51112
51114
  }
51113
51115
  _bindBrushEvents() {
@@ -51119,6 +51121,7 @@ let Brush$1 = class Brush extends AbstractComponent {
51119
51121
  array(trigger).forEach(t => this.stage.addEventListener(t, this._onBrushStart)), array(resetTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushClear));
51120
51122
  }
51121
51123
  _initDraw(e) {
51124
+ if (!1 === this.attribute.interactive) return;
51122
51125
  const {
51123
51126
  brushMode: brushMode
51124
51127
  } = this.attribute,
@@ -51127,6 +51130,7 @@ let Brush$1 = class Brush extends AbstractComponent {
51127
51130
  }
51128
51131
  _initMove(e) {
51129
51132
  var _a, _b;
51133
+ if (!1 === this.attribute.interactive) return;
51130
51134
  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;
51131
51135
  const {
51132
51136
  interactiveRange: interactiveRange
@@ -51151,6 +51155,7 @@ let Brush$1 = class Brush extends AbstractComponent {
51151
51155
  }
51152
51156
  _drawing(e) {
51153
51157
  var _a;
51158
+ if (!1 === this.attribute.interactive) return;
51154
51159
  const pos = this.eventPosToStagePos(e),
51155
51160
  {
51156
51161
  brushType: brushType,
@@ -51175,6 +51180,7 @@ let Brush$1 = class Brush extends AbstractComponent {
51175
51180
  (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)));
51176
51181
  }
51177
51182
  _moving(e) {
51183
+ if (!1 === this.attribute.interactive) return;
51178
51184
  const startPos = this._cacheMovePoint,
51179
51185
  pos = this.eventPosToStagePos(e);
51180
51186
  if (pos.x === (null == startPos ? void 0 : startPos.x) && pos.y === (null == startPos ? void 0 : startPos.y)) return;
@@ -51188,6 +51194,7 @@ let Brush$1 = class Brush extends AbstractComponent {
51188
51194
  }), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this._dispatchBrushEvent(IOperateType.moving, e);
51189
51195
  }
51190
51196
  _drawEnd(e) {
51197
+ if (!1 === this.attribute.interactive) return;
51191
51198
  const {
51192
51199
  removeOnClick = !0,
51193
51200
  sizeThreshold = DEFAULT_SIZE_THRESHOLD
@@ -51205,7 +51212,7 @@ let Brush$1 = class Brush extends AbstractComponent {
51205
51212
  }
51206
51213
  }
51207
51214
  _moveEnd(e) {
51208
- this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e);
51215
+ !1 !== this.attribute.interactive && (this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e));
51209
51216
  }
51210
51217
  render() {
51211
51218
  this._bindBrushEvents();
@@ -51312,6 +51319,10 @@ let Brush$1 = class Brush extends AbstractComponent {
51312
51319
  pos = this.eventPosToStagePos(e);
51313
51320
  return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
51314
51321
  }
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
+ }
51315
51326
  _dispatchBrushEvent(operateType, e) {
51316
51327
  this._dispatchEvent(operateType, {
51317
51328
  operateMask: this._operatingMask,
@@ -53857,7 +53868,7 @@ let Event$1 = class Event {
53857
53868
  if (ComposedEventCtor) {
53858
53869
  const composedEvent = new ComposedEventCtor(this._eventDispatcher, this._mode);
53859
53870
  composedEvent.register(eType, handler);
53860
- this._composedEventMap.set(callback, {
53871
+ this._composedEventMap.set(handler.callback, {
53861
53872
  eventType: eType,
53862
53873
  event: composedEvent
53863
53874
  });
@@ -54894,6 +54905,9 @@ class Compiler {
54894
54905
  getRootGroup() {
54895
54906
  return this._rootGroup;
54896
54907
  }
54908
+ getOption() {
54909
+ return this._option;
54910
+ }
54897
54911
  constructor(container, option) {
54898
54912
  this._count = 0;
54899
54913
  this._rootMarks = [];
@@ -60015,9 +60029,9 @@ class BaseTrigger {
60015
60029
  });
60016
60030
  }
60017
60031
  }
60018
- start(g) {
60032
+ start(g, e) {
60019
60033
  }
60020
- reset(g) {
60034
+ reset(g, e) {
60021
60035
  }
60022
60036
  dispatchEvent(type, params) {
60023
60037
  if (this.options.event) {
@@ -60048,17 +60062,17 @@ class ElementHighlight extends BaseTrigger {
60048
60062
  constructor(options) {
60049
60063
  super(options);
60050
60064
  this.type = "element-highlight";
60051
- this.resetAll = () => {
60065
+ this.resetAll = (e) => {
60052
60066
  const { highlightState, blurState, interaction } = this.options;
60053
60067
  if (this._lastGraphic) {
60054
60068
  interaction.clearAllStatesOfTrigger(this, highlightState, blurState);
60055
- this.dispatchEvent('reset', { graphics: [this._lastGraphic], options: this.options });
60069
+ this.dispatchEvent('reset', Object.assign({ graphics: [this._lastGraphic], options: this.options }, e));
60056
60070
  this._lastGraphic = null;
60057
60071
  interaction.setStatedGraphics(this, []);
60058
60072
  }
60059
60073
  };
60060
60074
  this.handleStart = (e) => {
60061
- this.start(e.item);
60075
+ this.start(e.item, e);
60062
60076
  };
60063
60077
  this.handleReset = (e) => {
60064
60078
  const { interaction } = this.options;
@@ -60069,10 +60083,10 @@ class ElementHighlight extends BaseTrigger {
60069
60083
  const markGraphic = e.item;
60070
60084
  const hasActiveElement = markGraphic && this._markSet.getMarkInId(markGraphic.context.markId);
60071
60085
  if (this._resetType.includes('view') && !hasActiveElement) {
60072
- this.resetAll();
60086
+ this.resetAll(e);
60073
60087
  }
60074
60088
  else if (this._resetType.includes('self') && hasActiveElement) {
60075
- this.resetAll();
60089
+ this.resetAll(e);
60076
60090
  }
60077
60091
  };
60078
60092
  this.options = Object.assign({}, defaultOptions$6, options);
@@ -60104,7 +60118,7 @@ class ElementHighlight extends BaseTrigger {
60104
60118
  events.push({ type: eventName, handler: this.handleReset });
60105
60119
  return events;
60106
60120
  }
60107
- start(markGraphic) {
60121
+ start(markGraphic, e) {
60108
60122
  if (markGraphic && this._markSet.getMarkInId(markGraphic.context.markId)) {
60109
60123
  const { highlightState, blurState, interaction } = this.options;
60110
60124
  if (this._lastGraphic === markGraphic) {
@@ -60113,20 +60127,20 @@ class ElementHighlight extends BaseTrigger {
60113
60127
  const newStatedGraphics = interaction.updateStates(this, [markGraphic], interaction.getStatedGraphics(this), highlightState, blurState);
60114
60128
  interaction.setStatedGraphics(this, newStatedGraphics);
60115
60129
  this._lastGraphic = markGraphic;
60116
- this.dispatchEvent('start', { graphics: newStatedGraphics, options: this.options });
60130
+ this.dispatchEvent('start', Object.assign({ graphics: newStatedGraphics, options: this.options }, e));
60117
60131
  }
60118
60132
  else if (this._lastGraphic && this._resetType === 'view') {
60119
- this.resetAll();
60133
+ this.resetAll(e);
60120
60134
  }
60121
60135
  }
60122
- reset(markGraphic) {
60136
+ reset(markGraphic, e) {
60123
60137
  if (markGraphic) {
60124
60138
  if (this._markSet.getMarkInId(markGraphic.context.markId)) {
60125
60139
  markGraphic.removeState([this.options.highlightState, this.options.blurState]);
60126
60140
  }
60127
60141
  }
60128
60142
  else {
60129
- this.resetAll();
60143
+ this.resetAll(e);
60130
60144
  }
60131
60145
  }
60132
60146
  }
@@ -60145,17 +60159,17 @@ class ElementSelect extends BaseTrigger {
60145
60159
  super(options);
60146
60160
  this.type = "element-select";
60147
60161
  this._resetType = [];
60148
- this.resetAll = () => {
60162
+ this.resetAll = (e) => {
60149
60163
  const { state, reverseState, interaction } = this.options;
60150
60164
  const statedGraphics = interaction.getStatedGraphics(this);
60151
60165
  if (statedGraphics && statedGraphics.length) {
60152
60166
  interaction.clearAllStatesOfTrigger(this, state, reverseState);
60153
- this.dispatchEvent('reset', { graphics: statedGraphics, options: this.options });
60167
+ this.dispatchEvent('reset', Object.assign({ graphics: statedGraphics, options: this.options }, e));
60154
60168
  interaction.setStatedGraphics(this, []);
60155
60169
  }
60156
60170
  };
60157
60171
  this.handleStart = (e) => {
60158
- this.start(e.item);
60172
+ this.start(e.item, e);
60159
60173
  };
60160
60174
  this.handleReset = (e) => {
60161
60175
  const { interaction } = this.options;
@@ -60166,10 +60180,10 @@ class ElementSelect extends BaseTrigger {
60166
60180
  const markGraphic = e.item;
60167
60181
  const hasActiveElement = markGraphic && this._markSet.getMarkInId(markGraphic.context.markId);
60168
60182
  if (this._resetType.includes('view') && !hasActiveElement) {
60169
- this.resetAll();
60183
+ this.resetAll(e);
60170
60184
  }
60171
60185
  else if (this._resetType.includes('self') && hasActiveElement) {
60172
- this.resetAll();
60186
+ this.resetAll(e);
60173
60187
  }
60174
60188
  };
60175
60189
  this.options = Object.assign({}, defaultOptions$5, options);
@@ -60199,7 +60213,7 @@ class ElementSelect extends BaseTrigger {
60199
60213
  this._resetType = resetType;
60200
60214
  return events;
60201
60215
  }
60202
- start(markGraphic) {
60216
+ start(markGraphic, e) {
60203
60217
  const { state, reverseState, isMultiple, interaction } = this.options;
60204
60218
  const statedGraphics = interaction.getStatedGraphics(this);
60205
60219
  if (markGraphic && this._markSet.getMarkInId(markGraphic.context.markId)) {
@@ -60210,7 +60224,7 @@ class ElementSelect extends BaseTrigger {
60210
60224
  interaction.setStatedGraphics(this, interaction.updateStates(this, newStatedGraphics, statedGraphics, state, reverseState));
60211
60225
  }
60212
60226
  else {
60213
- this.resetAll();
60227
+ this.resetAll(e);
60214
60228
  }
60215
60229
  }
60216
60230
  }
@@ -60221,26 +60235,26 @@ class ElementSelect extends BaseTrigger {
60221
60235
  markGraphic.addState(state, true);
60222
60236
  const newStatedGraphics = this.options.interaction.updateStates(this, isMultiple && statedGraphics ? [...statedGraphics, markGraphic] : [markGraphic], statedGraphics, state, reverseState);
60223
60237
  interaction.setStatedGraphics(this, newStatedGraphics);
60224
- this.dispatchEvent('start', { graphics: newStatedGraphics, options: this.options });
60238
+ this.dispatchEvent('start', Object.assign({ graphics: newStatedGraphics, options: this.options }, e));
60225
60239
  if (this._resetType.includes('timeout')) {
60226
60240
  this._timer = setTimeout(() => {
60227
- this.resetAll();
60241
+ this.resetAll(e);
60228
60242
  }, this.options.triggerOff);
60229
60243
  }
60230
60244
  }
60231
60245
  }
60232
60246
  else if (this._resetType.includes('view') && statedGraphics && statedGraphics.length) {
60233
- this.resetAll();
60247
+ this.resetAll(e);
60234
60248
  }
60235
60249
  }
60236
- reset(markGraphic) {
60250
+ reset(markGraphic, e) {
60237
60251
  if (markGraphic) {
60238
60252
  if (this._markSet.getMarkInId(markGraphic.context.markId)) {
60239
60253
  markGraphic.removeState([this.options.state, this.options.reverseState]);
60240
60254
  }
60241
60255
  }
60242
60256
  else {
60243
- this.resetAll();
60257
+ this.resetAll(e);
60244
60258
  }
60245
60259
  }
60246
60260
  }
@@ -60370,6 +60384,7 @@ class VChart {
60370
60384
  this._observer = null;
60371
60385
  this._context = {};
60372
60386
  this._renderState = RenderStateEnum.render;
60387
+ this._disableDimensionHoverEvent = false;
60373
60388
  this._doResize = () => {
60374
60389
  const { width, height } = this.getCurrentSize();
60375
60390
  if (this._currentSize.width !== width || this._currentSize.height !== height) {
@@ -60514,7 +60529,7 @@ class VChart {
60514
60529
  this._compiler.updateLayoutTag();
60515
60530
  this._setFontFamilyTheme(this.getTheme('fontFamily'));
60516
60531
  this._initDataSet(this._option.dataSet);
60517
- this._autoSize = isTrueBrowseEnv ? (_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true : false;
60532
+ this._autoSize = isTrueBrowseEnv ? ((_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true) : false;
60518
60533
  this._bindResizeEvent();
60519
60534
  this._bindViewEvent();
60520
60535
  this._initChartPlugin();
@@ -61167,7 +61182,7 @@ class VChart {
61167
61182
  resize = true;
61168
61183
  }
61169
61184
  const lasAutoSize = this._autoSize;
61170
- 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;
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;
61171
61186
  if (this._autoSize !== lasAutoSize) {
61172
61187
  resize = true;
61173
61188
  }
@@ -61408,6 +61423,22 @@ class VChart {
61408
61423
  var _a;
61409
61424
  return (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setDimensionIndex(value, opt);
61410
61425
  }
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
+ }
61411
61442
  showCrosshair(cb) {
61412
61443
  var _a;
61413
61444
  (_a = this._chart) === null || _a === void 0 ? void 0 : _a.showCrosshair(cb);
@@ -64428,7 +64459,8 @@ class DimensionHoverEvent extends DimensionEvent {
64428
64459
  super(...arguments);
64429
64460
  this._cacheDimensionInfo = null;
64430
64461
  this.onMouseMove = (params) => {
64431
- if (!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))) {
64432
64464
  return;
64433
64465
  }
64434
64466
  const x = params.event.viewX;
@@ -64450,7 +64482,8 @@ class DimensionHoverEvent extends DimensionEvent {
64450
64482
  }
64451
64483
  };
64452
64484
  this.onMouseOut = (params) => {
64453
- if (!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))) {
64454
64487
  return;
64455
64488
  }
64456
64489
  this._callback.call(null, Object.assign(Object.assign({}, params), { action: 'leave', dimensionInfo: this._cacheDimensionInfo ? this._cacheDimensionInfo.slice() : [] }));
@@ -71748,6 +71781,9 @@ class BaseTooltipProcessor {
71748
71781
  }
71749
71782
  shouldHandleTooltip(params, info) {
71750
71783
  var _a, _b;
71784
+ if (!this.component.enable) {
71785
+ return false;
71786
+ }
71751
71787
  if (isNil$1(info)) {
71752
71788
  return false;
71753
71789
  }
@@ -96045,6 +96081,7 @@ class Tooltip extends BaseComponent {
96045
96081
  this.specKey = 'tooltip';
96046
96082
  this.layoutType = 'none';
96047
96083
  this._isReleased = false;
96084
+ this.enable = true;
96048
96085
  this._alwaysShow = false;
96049
96086
  this._eventList = [];
96050
96087
  this._isTooltipShown = false;
@@ -103200,6 +103237,9 @@ class Brush extends BaseComponent {
103200
103237
  this._initMarkBrushState(componentIndex, '');
103201
103238
  brushComponent.children[0].removeAllChild();
103202
103239
  }
103240
+ _shouldEnableInteractive() {
103241
+ return this.getOption().getCompiler().getOption().interactive !== false;
103242
+ }
103203
103243
  _createBrushComponent(region, componentIndex) {
103204
103244
  var _a, _b;
103205
103245
  const interactiveAttr = this._getBrushInteractiveAttr(region);
@@ -103210,33 +103250,45 @@ class Brush extends BaseComponent {
103210
103250
  this._cacheInteractiveRangeAttrs.push(interactiveAttr);
103211
103251
  brush.addEventListener(IOperateType.brushActive, (e) => {
103212
103252
  this._initMarkBrushState(componentIndex, OUT_BRUSH_STATE);
103213
- this._emitEvent(ChartEvent.brushActive, region);
103253
+ this._emitEvent(ChartEvent.brushActive, region, e);
103214
103254
  });
103215
103255
  brush.addEventListener(IOperateType.drawStart, (e) => {
103256
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103257
+ this._option.globalInstance.disableDimensionHoverEvent(true);
103258
+ }
103216
103259
  this._setRegionMarkPickable(region, true);
103217
- this._emitEvent(ChartEvent.brushStart, region);
103260
+ this._emitEvent(ChartEvent.brushStart, region, e);
103218
103261
  });
103219
103262
  brush.addEventListener(IOperateType.moveStart, (e) => {
103263
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103264
+ this._option.globalInstance.disableDimensionHoverEvent(true);
103265
+ }
103220
103266
  this._setRegionMarkPickable(region, true);
103221
- this._emitEvent(ChartEvent.brushStart, region);
103267
+ this._emitEvent(ChartEvent.brushStart, region, e);
103222
103268
  });
103223
103269
  brush.addEventListener(IOperateType.drawing, (e) => {
103224
103270
  this._setRegionMarkPickable(region, false);
103225
103271
  this._handleBrushChange(region, e);
103226
- this._emitEvent(ChartEvent.brushChange, region);
103272
+ this._emitEvent(ChartEvent.brushChange, region, e);
103227
103273
  });
103228
103274
  brush.addEventListener(IOperateType.moving, (e) => {
103229
103275
  this._setRegionMarkPickable(region, false);
103230
103276
  this._handleBrushChange(region, e);
103231
- this._emitEvent(ChartEvent.brushChange, region);
103277
+ this._emitEvent(ChartEvent.brushChange, region, e);
103232
103278
  });
103233
103279
  brush.addEventListener(IOperateType.brushClear, (e) => {
103280
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103281
+ this._option.globalInstance.disableDimensionHoverEvent(false);
103282
+ }
103234
103283
  this._setRegionMarkPickable(region, true);
103235
103284
  this._initMarkBrushState(componentIndex, '');
103236
- this._emitEvent(ChartEvent.brushClear, region);
103285
+ this._emitEvent(ChartEvent.brushClear, region, e);
103237
103286
  });
103238
103287
  brush.addEventListener(IOperateType.drawEnd, (e) => {
103239
103288
  var _a;
103289
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103290
+ this._option.globalInstance.disableDimensionHoverEvent(false);
103291
+ }
103240
103292
  this._setRegionMarkPickable(region, true);
103241
103293
  const { operateMask } = e.detail;
103242
103294
  const { updateElementsState = true } = this._spec;
@@ -103244,11 +103296,11 @@ class Brush extends BaseComponent {
103244
103296
  if (this._spec.onBrushEnd(e) === true) {
103245
103297
  this.clearGraphic();
103246
103298
  this._initMarkBrushState(componentIndex, '');
103247
- this._emitEvent(ChartEvent.brushClear, region);
103299
+ this._emitEvent(ChartEvent.brushClear, region, e);
103248
103300
  }
103249
103301
  else {
103250
103302
  this._spec.onBrushEnd(e);
103251
- this._emitEvent(ChartEvent.brushEnd, region);
103303
+ this._emitEvent(ChartEvent.brushEnd, region, e);
103252
103304
  }
103253
103305
  }
103254
103306
  else {
@@ -103256,10 +103308,13 @@ class Brush extends BaseComponent {
103256
103308
  if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || !updateElementsState) {
103257
103309
  this._setAxisAndDataZoom(operateMask, region);
103258
103310
  }
103259
- this._emitEvent(ChartEvent.brushEnd, region);
103311
+ this._emitEvent(ChartEvent.brushEnd, region, e);
103260
103312
  }
103261
103313
  });
103262
103314
  brush.addEventListener(IOperateType.moveEnd, (e) => {
103315
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103316
+ this._option.globalInstance.disableDimensionHoverEvent(false);
103317
+ }
103263
103318
  this._setRegionMarkPickable(region, true);
103264
103319
  const { operateMask } = e.detail;
103265
103320
  const { updateElementsState = true } = this._spec;
@@ -103267,7 +103322,7 @@ class Brush extends BaseComponent {
103267
103322
  if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || updateElementsState) {
103268
103323
  this._setAxisAndDataZoom(operateMask, region);
103269
103324
  }
103270
- this._emitEvent(ChartEvent.brushEnd, region);
103325
+ this._emitEvent(ChartEvent.brushEnd, region, e);
103271
103326
  });
103272
103327
  }
103273
103328
  _getBrushInteractiveAttr(region) {
@@ -103285,7 +103340,8 @@ class Brush extends BaseComponent {
103285
103340
  maxX: seriesRegionEndX
103286
103341
  },
103287
103342
  xRange: [seriesRegionStartX, seriesRegionEndX],
103288
- yRange: [seriesRegionStartY, seriesRegionEndY]
103343
+ yRange: [seriesRegionStartY, seriesRegionEndY],
103344
+ interactive: this._shouldEnableInteractive()
103289
103345
  };
103290
103346
  }
103291
103347
  _transformBrushedMarkAttr(brushedStyle) {
@@ -103306,6 +103362,7 @@ class Brush extends BaseComponent {
103306
103362
  }
103307
103363
  _handleBrushChange(region, e) {
103308
103364
  const { operateMask } = e.detail;
103365
+ this._operateMask = operateMask;
103309
103366
  const { updateElementsState = true } = this._spec;
103310
103367
  if (updateElementsState) {
103311
103368
  this._reconfigItem(operateMask, region);
@@ -103330,7 +103387,7 @@ class Brush extends BaseComponent {
103330
103387
  }
103331
103388
  return data;
103332
103389
  }
103333
- _emitEvent(eventType, region) {
103390
+ _emitEvent(eventType, region, e) {
103334
103391
  var _a;
103335
103392
  this.event.emit(eventType, {
103336
103393
  model: this,
@@ -103347,7 +103404,8 @@ class Brush extends BaseComponent {
103347
103404
  linkedOutOfBrushElementsMap: this._linkedOutOfBrushElementsMap,
103348
103405
  zoomRecord: this._zoomRecord
103349
103406
  },
103350
- vchart: (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance
103407
+ vchart: (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance,
103408
+ event: e
103351
103409
  });
103352
103410
  }
103353
103411
  _reconfigItem(operateMask, region) {
@@ -103602,6 +103660,12 @@ class Brush extends BaseComponent {
103602
103660
  this._brushComponents = null;
103603
103661
  }
103604
103662
  }
103663
+ clearBrushStateAndMask() {
103664
+ this._relativeRegions.forEach((region, componentIndex) => {
103665
+ this._initMarkBrushState(componentIndex, '');
103666
+ this._brushComponents[componentIndex].children[0].removeAllChild();
103667
+ });
103668
+ }
103605
103669
  }
103606
103670
  Brush.type = ComponentTypeEnum.brush;
103607
103671
  Brush.builtInTheme = {