@visactor/vchart 2.0.14-alpha.1 → 2.0.14

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 (114) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +171 -69
  3. package/build/index.js +171 -69
  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 +3 -0
  10. package/cjs/compile/compiler.js.map +1 -1
  11. package/cjs/compile/interface/compilable-item.d.ts +2 -1
  12. package/cjs/compile/interface/compilable-item.js.map +1 -1
  13. package/cjs/component/brush/brush.d.ts +4 -1
  14. package/cjs/component/brush/brush.js +31 -14
  15. package/cjs/component/brush/brush.js.map +1 -1
  16. package/cjs/component/brush/interface.d.ts +3 -1
  17. package/cjs/component/brush/interface.js.map +1 -1
  18. package/cjs/component/crosshair/interface/spec.d.ts +1 -0
  19. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  20. package/cjs/component/data-zoom/data-filter-event.js +7 -1
  21. package/cjs/component/data-zoom/data-filter-event.js.map +1 -1
  22. package/cjs/component/data-zoom/scroll-bar/interface.d.ts +2 -0
  23. package/cjs/component/data-zoom/scroll-bar/interface.js.map +1 -1
  24. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js +3 -2
  25. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  26. package/cjs/component/title/interface/spec.d.ts +2 -2
  27. package/cjs/component/title/interface/spec.js.map +1 -1
  28. package/cjs/component/title/title.js +16 -12
  29. package/cjs/component/title/title.js.map +1 -1
  30. package/cjs/component/tooltip/interface/common.d.ts +1 -0
  31. package/cjs/component/tooltip/interface/common.js.map +1 -1
  32. package/cjs/component/tooltip/processor/base.js +1 -1
  33. package/cjs/component/tooltip/processor/base.js.map +1 -1
  34. package/cjs/component/tooltip/tooltip.d.ts +1 -0
  35. package/cjs/component/tooltip/tooltip.js +6 -5
  36. package/cjs/component/tooltip/tooltip.js.map +1 -1
  37. package/cjs/core/index.d.ts +1 -1
  38. package/cjs/core/index.js +1 -1
  39. package/cjs/core/index.js.map +1 -1
  40. package/cjs/core/interface.d.ts +9 -1
  41. package/cjs/core/interface.js.map +1 -1
  42. package/cjs/core/vchart.d.ts +4 -0
  43. package/cjs/core/vchart.js +10 -1
  44. package/cjs/core/vchart.js.map +1 -1
  45. package/cjs/event/event.js +1 -1
  46. package/cjs/event/event.js.map +1 -1
  47. package/cjs/event/events/dimension/dimension-hover.js +4 -2
  48. package/cjs/event/events/dimension/dimension-hover.js.map +1 -1
  49. package/cjs/interaction/interface/trigger.d.ts +1 -1
  50. package/cjs/interaction/interface/trigger.js.map +1 -1
  51. package/cjs/interaction/triggers/base.d.ts +3 -2
  52. package/cjs/interaction/triggers/base.js +2 -2
  53. package/cjs/interaction/triggers/base.js.map +1 -1
  54. package/cjs/interaction/triggers/element-highlight.d.ts +3 -3
  55. package/cjs/interaction/triggers/element-highlight.js +11 -11
  56. package/cjs/interaction/triggers/element-highlight.js.map +1 -1
  57. package/cjs/interaction/triggers/element-select.d.ts +3 -3
  58. package/cjs/interaction/triggers/element-select.js +13 -13
  59. package/cjs/interaction/triggers/element-select.js.map +1 -1
  60. package/esm/animation/callback-disappear.js +2 -1
  61. package/esm/animation/index.js +1 -2
  62. package/esm/compile/compiler.d.ts +1 -0
  63. package/esm/compile/compiler.js +3 -0
  64. package/esm/compile/compiler.js.map +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/component/brush/brush.d.ts +4 -1
  68. package/esm/component/brush/brush.js +31 -14
  69. package/esm/component/brush/brush.js.map +1 -1
  70. package/esm/component/brush/interface.d.ts +3 -1
  71. package/esm/component/brush/interface.js.map +1 -1
  72. package/esm/component/crosshair/interface/spec.d.ts +1 -0
  73. package/esm/component/crosshair/interface/spec.js.map +1 -1
  74. package/esm/component/data-zoom/data-filter-event.js +8 -2
  75. package/esm/component/data-zoom/data-filter-event.js.map +1 -1
  76. package/esm/component/data-zoom/scroll-bar/interface.d.ts +2 -0
  77. package/esm/component/data-zoom/scroll-bar/interface.js.map +1 -1
  78. package/esm/component/data-zoom/scroll-bar/scroll-bar.js +3 -2
  79. package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  80. package/esm/component/title/interface/spec.d.ts +2 -2
  81. package/esm/component/title/interface/spec.js.map +1 -1
  82. package/esm/component/title/title.js +15 -12
  83. package/esm/component/title/title.js.map +1 -1
  84. package/esm/component/tooltip/interface/common.d.ts +1 -0
  85. package/esm/component/tooltip/interface/common.js.map +1 -1
  86. package/esm/component/tooltip/processor/base.js +1 -1
  87. package/esm/component/tooltip/processor/base.js.map +1 -1
  88. package/esm/component/tooltip/tooltip.d.ts +1 -0
  89. package/esm/component/tooltip/tooltip.js +6 -5
  90. package/esm/component/tooltip/tooltip.js.map +1 -1
  91. package/esm/core/index.d.ts +1 -1
  92. package/esm/core/index.js +1 -1
  93. package/esm/core/index.js.map +1 -1
  94. package/esm/core/interface.d.ts +9 -1
  95. package/esm/core/interface.js.map +1 -1
  96. package/esm/core/vchart.d.ts +4 -0
  97. package/esm/core/vchart.js +10 -1
  98. package/esm/core/vchart.js.map +1 -1
  99. package/esm/event/event.js +1 -1
  100. package/esm/event/event.js.map +1 -1
  101. package/esm/event/events/dimension/dimension-hover.js +4 -2
  102. package/esm/event/events/dimension/dimension-hover.js.map +1 -1
  103. package/esm/interaction/interface/trigger.d.ts +1 -1
  104. package/esm/interaction/interface/trigger.js.map +1 -1
  105. package/esm/interaction/triggers/base.d.ts +3 -2
  106. package/esm/interaction/triggers/base.js +2 -2
  107. package/esm/interaction/triggers/base.js.map +1 -1
  108. package/esm/interaction/triggers/element-highlight.d.ts +3 -3
  109. package/esm/interaction/triggers/element-highlight.js +11 -11
  110. package/esm/interaction/triggers/element-highlight.js.map +1 -1
  111. package/esm/interaction/triggers/element-select.d.ts +3 -3
  112. package/esm/interaction/triggers/element-select.js +13 -13
  113. package/esm/interaction/triggers/element-select.js.map +1 -1
  114. package/package.json +8 -8
package/build/index.js CHANGED
@@ -26721,7 +26721,7 @@
26721
26721
  return !!this._inuse;
26722
26722
  }
26723
26723
  set inuse(use) {
26724
- use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : this.nativeContext.restore());
26724
+ use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : (this.nativeContext.restore(), this._font = ""));
26725
26725
  }
26726
26726
  constructor(canvas, dpr) {
26727
26727
  this.fillAttributes = Object.assign(Object.assign({}, DefaultFillStyle), {
@@ -31467,14 +31467,20 @@
31467
31467
  x: x,
31468
31468
  y: y
31469
31469
  } = this.stage.eventPointTransform(e);
31470
- let currentScrollValue,
31471
- currentPos,
31470
+ let currentPos,
31471
+ currentScrollValue = 0,
31472
31472
  delta = 0;
31473
31473
  const {
31474
- width: width,
31475
- height: height
31476
- } = this.getSliderRenderBounds();
31477
- return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos, currentScrollValue = delta / height) : (currentPos = x, delta = currentPos - this._prePos, currentScrollValue = delta / width), [currentPos, currentScrollValue];
31474
+ width: width,
31475
+ height: height
31476
+ } = this.getSliderRenderBounds(),
31477
+ track = "vertical" === direction ? height : width,
31478
+ travel = Math.max(track - this._sliderSize, 0),
31479
+ {
31480
+ range: range
31481
+ } = this.attribute,
31482
+ ratio = clamp$1(range[1] - range[0], 0, 1);
31483
+ return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos) : (currentPos = x, delta = currentPos - this._prePos), currentScrollValue = travel > 0 && ratio < 1 ? delta / travel * (1 - ratio) : 0, [currentPos, currentScrollValue];
31478
31484
  }, this._onSliderPointerMove = e => {
31479
31485
  const {
31480
31486
  stopSliderMovePropagation = !0
@@ -31618,15 +31624,24 @@
31618
31624
  }
31619
31625
  _getSliderPos(range) {
31620
31626
  const {
31621
- direction: direction
31627
+ direction: direction,
31628
+ minSliderSize = 0
31622
31629
  } = this.attribute,
31623
31630
  {
31624
31631
  width: width,
31625
31632
  height: height,
31626
31633
  x1: x1,
31627
31634
  y1: y1
31628
- } = this.getSliderRenderBounds();
31629
- return "horizontal" === direction ? [width * range[0] + x1, width * range[1] + x1] : [height * range[0] + y1, height * range[1] + y1];
31635
+ } = this.getSliderRenderBounds(),
31636
+ track = "horizontal" === direction ? width : height,
31637
+ origin = "horizontal" === direction ? x1 : y1,
31638
+ start = clamp$1(range[0], 0, 1),
31639
+ end = clamp$1(range[1], 0, 1),
31640
+ ratio = clamp$1(end - start, 0, 1),
31641
+ L = Math.max(ratio * track, minSliderSize),
31642
+ T = Math.max(track - L, 0),
31643
+ pStart = origin + start / Math.max(1 - ratio, 1e-12) * T;
31644
+ return [pStart, pStart + L];
31630
31645
  }
31631
31646
  _getScrollRange() {
31632
31647
  if (this._sliderLimitRange) return this._sliderLimitRange;
@@ -31666,6 +31681,7 @@
31666
31681
  direction: "horizontal",
31667
31682
  round: !0,
31668
31683
  sliderSize: 20,
31684
+ minSliderSize: 0,
31669
31685
  sliderStyle: {
31670
31686
  fill: "rgba(0, 0, 0, .5)"
31671
31687
  },
@@ -35672,7 +35688,7 @@
35672
35688
  }
35673
35689
  class AStageAnimate extends ACustomAnimate {
35674
35690
  constructor(customFrom, customTo, duration, easing, params) {
35675
- super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this._beforeStageRender = () => {
35691
+ super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this.checkStatusAfterRender = !0, this._beforeStageRender = () => {
35676
35692
  if (!this.willCallBeforeStageRender) return;
35677
35693
  this.willCallBeforeStageRender = !1;
35678
35694
  const stage = this.target.stage,
@@ -35685,7 +35701,7 @@
35685
35701
  const stage = this.target.stage,
35686
35702
  canvas = stage.window.getContext().canvas.nativeCanvas,
35687
35703
  outputCanvas = this.afterStageRender(stage, canvas);
35688
- outputCanvas && this.renderToStage(stage, outputCanvas);
35704
+ outputCanvas && this.renderToStage(stage, outputCanvas), this.checkStatusAfterRender && this.animate.status === AnimateStatus.END && this.animate.timeline.removeAnimate(this.animate);
35689
35705
  }, this.props = {};
35690
35706
  }
35691
35707
  beforeStageRender(stage, canvas) {
@@ -51102,6 +51118,8 @@
51102
51118
  let Brush$1 = class Brush extends AbstractComponent {
51103
51119
  constructor(attributes, options) {
51104
51120
  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 => {
51121
+ if (!1 === this.attribute.interactive) return;
51122
+ if (!1 === this._beforeBrushEvent(e)) return;
51105
51123
  const {
51106
51124
  updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
51107
51125
  endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
@@ -51109,11 +51127,11 @@
51109
51127
  } = this.attribute;
51110
51128
  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];
51111
51129
  }, this._onBrushing = e => {
51112
- 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)));
51130
+ !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))));
51113
51131
  }, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap$1[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
51114
- this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1;
51132
+ !1 !== this.attribute.interactive && (this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1);
51115
51133
  }, this._onBrushClear = e => {
51116
- e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1;
51134
+ !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);
51117
51135
  };
51118
51136
  }
51119
51137
  _bindBrushEvents() {
@@ -51125,6 +51143,7 @@
51125
51143
  array(trigger).forEach(t => this.stage.addEventListener(t, this._onBrushStart)), array(resetTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushClear));
51126
51144
  }
51127
51145
  _initDraw(e) {
51146
+ if (!1 === this.attribute.interactive) return;
51128
51147
  const {
51129
51148
  brushMode: brushMode
51130
51149
  } = this.attribute,
@@ -51133,6 +51152,7 @@
51133
51152
  }
51134
51153
  _initMove(e) {
51135
51154
  var _a, _b;
51155
+ if (!1 === this.attribute.interactive) return;
51136
51156
  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;
51137
51157
  const {
51138
51158
  interactiveRange: interactiveRange
@@ -51157,6 +51177,7 @@
51157
51177
  }
51158
51178
  _drawing(e) {
51159
51179
  var _a;
51180
+ if (!1 === this.attribute.interactive) return;
51160
51181
  const pos = this.eventPosToStagePos(e),
51161
51182
  {
51162
51183
  brushType: brushType,
@@ -51181,6 +51202,7 @@
51181
51202
  (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)));
51182
51203
  }
51183
51204
  _moving(e) {
51205
+ if (!1 === this.attribute.interactive) return;
51184
51206
  const startPos = this._cacheMovePoint,
51185
51207
  pos = this.eventPosToStagePos(e);
51186
51208
  if (pos.x === (null == startPos ? void 0 : startPos.x) && pos.y === (null == startPos ? void 0 : startPos.y)) return;
@@ -51194,6 +51216,7 @@
51194
51216
  }), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this._dispatchBrushEvent(IOperateType.moving, e);
51195
51217
  }
51196
51218
  _drawEnd(e) {
51219
+ if (!1 === this.attribute.interactive) return;
51197
51220
  const {
51198
51221
  removeOnClick = !0,
51199
51222
  sizeThreshold = DEFAULT_SIZE_THRESHOLD
@@ -51211,7 +51234,7 @@
51211
51234
  }
51212
51235
  }
51213
51236
  _moveEnd(e) {
51214
- this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e);
51237
+ !1 !== this.attribute.interactive && (this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e));
51215
51238
  }
51216
51239
  render() {
51217
51240
  this._bindBrushEvents();
@@ -51318,6 +51341,10 @@
51318
51341
  pos = this.eventPosToStagePos(e);
51319
51342
  return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
51320
51343
  }
51344
+ _beforeBrushEvent(e) {
51345
+ var _a, _b;
51346
+ return null === (_b = (_a = this.attribute).beforeBrushChange) || void 0 === _b ? void 0 : _b.call(_a, e);
51347
+ }
51321
51348
  _dispatchBrushEvent(operateType, e) {
51322
51349
  this._dispatchEvent(operateType, {
51323
51350
  operateMask: this._operatingMask,
@@ -53863,7 +53890,7 @@
53863
53890
  if (ComposedEventCtor) {
53864
53891
  const composedEvent = new ComposedEventCtor(this._eventDispatcher, this._mode);
53865
53892
  composedEvent.register(eType, handler);
53866
- this._composedEventMap.set(callback, {
53893
+ this._composedEventMap.set(handler.callback, {
53867
53894
  eventType: eType,
53868
53895
  event: composedEvent
53869
53896
  });
@@ -54900,6 +54927,9 @@
54900
54927
  getRootGroup() {
54901
54928
  return this._rootGroup;
54902
54929
  }
54930
+ getOption() {
54931
+ return this._option;
54932
+ }
54903
54933
  constructor(container, option) {
54904
54934
  this._count = 0;
54905
54935
  this._rootMarks = [];
@@ -60028,9 +60058,9 @@
60028
60058
  });
60029
60059
  }
60030
60060
  }
60031
- start(g) {
60061
+ start(g, e) {
60032
60062
  }
60033
- reset(g) {
60063
+ reset(g, e) {
60034
60064
  }
60035
60065
  dispatchEvent(type, params) {
60036
60066
  if (this.options.event) {
@@ -60061,17 +60091,17 @@
60061
60091
  constructor(options) {
60062
60092
  super(options);
60063
60093
  this.type = "element-highlight";
60064
- this.resetAll = () => {
60094
+ this.resetAll = (e) => {
60065
60095
  const { highlightState, blurState, interaction } = this.options;
60066
60096
  if (this._lastGraphic) {
60067
60097
  interaction.clearAllStatesOfTrigger(this, highlightState, blurState);
60068
- this.dispatchEvent('reset', { graphics: [this._lastGraphic], options: this.options });
60098
+ this.dispatchEvent('reset', Object.assign({ graphics: [this._lastGraphic], options: this.options }, e));
60069
60099
  this._lastGraphic = null;
60070
60100
  interaction.setStatedGraphics(this, []);
60071
60101
  }
60072
60102
  };
60073
60103
  this.handleStart = (e) => {
60074
- this.start(e.item);
60104
+ this.start(e.item, e);
60075
60105
  };
60076
60106
  this.handleReset = (e) => {
60077
60107
  const { interaction } = this.options;
@@ -60082,10 +60112,10 @@
60082
60112
  const markGraphic = e.item;
60083
60113
  const hasActiveElement = markGraphic && this._markSet.getMarkInId(markGraphic.context.markId);
60084
60114
  if (this._resetType.includes('view') && !hasActiveElement) {
60085
- this.resetAll();
60115
+ this.resetAll(e);
60086
60116
  }
60087
60117
  else if (this._resetType.includes('self') && hasActiveElement) {
60088
- this.resetAll();
60118
+ this.resetAll(e);
60089
60119
  }
60090
60120
  };
60091
60121
  this.options = Object.assign({}, defaultOptions$6, options);
@@ -60117,7 +60147,7 @@
60117
60147
  events.push({ type: eventName, handler: this.handleReset });
60118
60148
  return events;
60119
60149
  }
60120
- start(markGraphic) {
60150
+ start(markGraphic, e) {
60121
60151
  if (markGraphic && this._markSet.getMarkInId(markGraphic.context.markId)) {
60122
60152
  const { highlightState, blurState, interaction } = this.options;
60123
60153
  if (this._lastGraphic === markGraphic) {
@@ -60126,20 +60156,20 @@
60126
60156
  const newStatedGraphics = interaction.updateStates(this, [markGraphic], interaction.getStatedGraphics(this), highlightState, blurState);
60127
60157
  interaction.setStatedGraphics(this, newStatedGraphics);
60128
60158
  this._lastGraphic = markGraphic;
60129
- this.dispatchEvent('start', { graphics: newStatedGraphics, options: this.options });
60159
+ this.dispatchEvent('start', Object.assign({ graphics: newStatedGraphics, options: this.options }, e));
60130
60160
  }
60131
60161
  else if (this._lastGraphic && this._resetType === 'view') {
60132
- this.resetAll();
60162
+ this.resetAll(e);
60133
60163
  }
60134
60164
  }
60135
- reset(markGraphic) {
60165
+ reset(markGraphic, e) {
60136
60166
  if (markGraphic) {
60137
60167
  if (this._markSet.getMarkInId(markGraphic.context.markId)) {
60138
60168
  markGraphic.removeState([this.options.highlightState, this.options.blurState]);
60139
60169
  }
60140
60170
  }
60141
60171
  else {
60142
- this.resetAll();
60172
+ this.resetAll(e);
60143
60173
  }
60144
60174
  }
60145
60175
  }
@@ -60158,17 +60188,17 @@
60158
60188
  super(options);
60159
60189
  this.type = "element-select";
60160
60190
  this._resetType = [];
60161
- this.resetAll = () => {
60191
+ this.resetAll = (e) => {
60162
60192
  const { state, reverseState, interaction } = this.options;
60163
60193
  const statedGraphics = interaction.getStatedGraphics(this);
60164
60194
  if (statedGraphics && statedGraphics.length) {
60165
60195
  interaction.clearAllStatesOfTrigger(this, state, reverseState);
60166
- this.dispatchEvent('reset', { graphics: statedGraphics, options: this.options });
60196
+ this.dispatchEvent('reset', Object.assign({ graphics: statedGraphics, options: this.options }, e));
60167
60197
  interaction.setStatedGraphics(this, []);
60168
60198
  }
60169
60199
  };
60170
60200
  this.handleStart = (e) => {
60171
- this.start(e.item);
60201
+ this.start(e.item, e);
60172
60202
  };
60173
60203
  this.handleReset = (e) => {
60174
60204
  const { interaction } = this.options;
@@ -60179,10 +60209,10 @@
60179
60209
  const markGraphic = e.item;
60180
60210
  const hasActiveElement = markGraphic && this._markSet.getMarkInId(markGraphic.context.markId);
60181
60211
  if (this._resetType.includes('view') && !hasActiveElement) {
60182
- this.resetAll();
60212
+ this.resetAll(e);
60183
60213
  }
60184
60214
  else if (this._resetType.includes('self') && hasActiveElement) {
60185
- this.resetAll();
60215
+ this.resetAll(e);
60186
60216
  }
60187
60217
  };
60188
60218
  this.options = Object.assign({}, defaultOptions$5, options);
@@ -60212,7 +60242,7 @@
60212
60242
  this._resetType = resetType;
60213
60243
  return events;
60214
60244
  }
60215
- start(markGraphic) {
60245
+ start(markGraphic, e) {
60216
60246
  const { state, reverseState, isMultiple, interaction } = this.options;
60217
60247
  const statedGraphics = interaction.getStatedGraphics(this);
60218
60248
  if (markGraphic && this._markSet.getMarkInId(markGraphic.context.markId)) {
@@ -60223,7 +60253,7 @@
60223
60253
  interaction.setStatedGraphics(this, interaction.updateStates(this, newStatedGraphics, statedGraphics, state, reverseState));
60224
60254
  }
60225
60255
  else {
60226
- this.resetAll();
60256
+ this.resetAll(e);
60227
60257
  }
60228
60258
  }
60229
60259
  }
@@ -60234,26 +60264,26 @@
60234
60264
  markGraphic.addState(state, true);
60235
60265
  const newStatedGraphics = this.options.interaction.updateStates(this, isMultiple && statedGraphics ? [...statedGraphics, markGraphic] : [markGraphic], statedGraphics, state, reverseState);
60236
60266
  interaction.setStatedGraphics(this, newStatedGraphics);
60237
- this.dispatchEvent('start', { graphics: newStatedGraphics, options: this.options });
60267
+ this.dispatchEvent('start', Object.assign({ graphics: newStatedGraphics, options: this.options }, e));
60238
60268
  if (this._resetType.includes('timeout')) {
60239
60269
  this._timer = setTimeout(() => {
60240
- this.resetAll();
60270
+ this.resetAll(e);
60241
60271
  }, this.options.triggerOff);
60242
60272
  }
60243
60273
  }
60244
60274
  }
60245
60275
  else if (this._resetType.includes('view') && statedGraphics && statedGraphics.length) {
60246
- this.resetAll();
60276
+ this.resetAll(e);
60247
60277
  }
60248
60278
  }
60249
- reset(markGraphic) {
60279
+ reset(markGraphic, e) {
60250
60280
  if (markGraphic) {
60251
60281
  if (this._markSet.getMarkInId(markGraphic.context.markId)) {
60252
60282
  markGraphic.removeState([this.options.state, this.options.reverseState]);
60253
60283
  }
60254
60284
  }
60255
60285
  else {
60256
- this.resetAll();
60286
+ this.resetAll(e);
60257
60287
  }
60258
60288
  }
60259
60289
  }
@@ -60383,6 +60413,7 @@
60383
60413
  this._observer = null;
60384
60414
  this._context = {};
60385
60415
  this._renderState = RenderStateEnum.render;
60416
+ this._disableDimensionHoverEvent = false;
60386
60417
  this._doResize = () => {
60387
60418
  const { width, height } = this.getCurrentSize();
60388
60419
  if (this._currentSize.width !== width || this._currentSize.height !== height) {
@@ -60527,7 +60558,7 @@
60527
60558
  this._compiler.updateLayoutTag();
60528
60559
  this._setFontFamilyTheme(this.getTheme('fontFamily'));
60529
60560
  this._initDataSet(this._option.dataSet);
60530
- this._autoSize = isTrueBrowseEnv ? (_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true : false;
60561
+ this._autoSize = isTrueBrowseEnv ? ((_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true) : false;
60531
60562
  this._bindResizeEvent();
60532
60563
  this._bindViewEvent();
60533
60564
  this._initChartPlugin();
@@ -61180,7 +61211,7 @@
61180
61211
  resize = true;
61181
61212
  }
61182
61213
  const lasAutoSize = this._autoSize;
61183
- 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;
61214
+ 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;
61184
61215
  if (this._autoSize !== lasAutoSize) {
61185
61216
  resize = true;
61186
61217
  }
@@ -61421,6 +61452,22 @@
61421
61452
  var _a;
61422
61453
  return (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setDimensionIndex(value, opt);
61423
61454
  }
61455
+ disableDimensionHoverEvent(value) {
61456
+ if (value !== undefined) {
61457
+ this._disableDimensionHoverEvent = value;
61458
+ }
61459
+ return this._disableDimensionHoverEvent;
61460
+ }
61461
+ disableCrossHair(value = true) {
61462
+ this.getChart()
61463
+ .getComponentsByKey('crosshair')
61464
+ .forEach(crosshair => (crosshair.enable = !value));
61465
+ }
61466
+ disableTooltip(value = true) {
61467
+ this.getChart()
61468
+ .getComponentsByKey('tooltip')
61469
+ .forEach(tooltip => (tooltip.enable = !value));
61470
+ }
61424
61471
  showCrosshair(cb) {
61425
61472
  var _a;
61426
61473
  (_a = this._chart) === null || _a === void 0 ? void 0 : _a.showCrosshair(cb);
@@ -61749,7 +61796,7 @@
61749
61796
  });
61750
61797
  };
61751
61798
 
61752
- const version = "2.0.13";
61799
+ const version = "2.0.14";
61753
61800
 
61754
61801
  const addVChartProperty = (data, op) => {
61755
61802
  const context = op.beforeCall();
@@ -64441,7 +64488,8 @@
64441
64488
  super(...arguments);
64442
64489
  this._cacheDimensionInfo = null;
64443
64490
  this.onMouseMove = (params) => {
64444
- 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))) {
64445
64493
  return;
64446
64494
  }
64447
64495
  const x = params.event.viewX;
@@ -64463,7 +64511,8 @@
64463
64511
  }
64464
64512
  };
64465
64513
  this.onMouseOut = (params) => {
64466
- if (!params) {
64514
+ var _a, _b, _c, _d;
64515
+ 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))) {
64467
64516
  return;
64468
64517
  }
64469
64518
  this._callback.call(null, Object.assign(Object.assign({}, params), { action: 'leave', dimensionInfo: this._cacheDimensionInfo ? this._cacheDimensionInfo.slice() : [] }));
@@ -71761,6 +71810,9 @@
71761
71810
  }
71762
71811
  shouldHandleTooltip(params, info) {
71763
71812
  var _a, _b;
71813
+ if (!this.component.enable) {
71814
+ return false;
71815
+ }
71764
71816
  if (isNil$1(info)) {
71765
71817
  return false;
71766
71818
  }
@@ -96105,6 +96157,7 @@
96105
96157
  this.specKey = 'tooltip';
96106
96158
  this.layoutType = 'none';
96107
96159
  this._isReleased = false;
96160
+ this.enable = true;
96108
96161
  this._alwaysShow = false;
96109
96162
  this._eventList = [];
96110
96163
  this._isTooltipShown = false;
@@ -96319,7 +96372,7 @@
96319
96372
  processor.clearCache();
96320
96373
  });
96321
96374
  const handler = (_c = this._spec.handler) !== null && _c !== void 0 ? _c : this.tooltipHandler;
96322
- if (handler.hideTooltip) {
96375
+ if (handler === null || handler === void 0 ? void 0 : handler.hideTooltip) {
96323
96376
  const result = handler.hideTooltip.call(handler, params);
96324
96377
  if (!result) {
96325
96378
  this._isTooltipShown = false;
@@ -96413,7 +96466,7 @@
96413
96466
  if (!this._needInitEventOfTooltip) {
96414
96467
  return;
96415
96468
  }
96416
- const container = (_b = (_a = this.tooltipHandler).getRootDom) === null || _b === void 0 ? void 0 : _b.call(_a);
96469
+ const container = (_b = (_a = this.tooltipHandler) === null || _a === void 0 ? void 0 : _a.getRootDom) === null || _b === void 0 ? void 0 : _b.call(_a);
96417
96470
  if (container) {
96418
96471
  container.addEventListener('pointerenter', () => {
96419
96472
  var _a;
@@ -96539,7 +96592,7 @@
96539
96592
  this._needInitEventOfTooltip = true;
96540
96593
  }
96541
96594
  this._enterable = newEnterable;
96542
- (_c = (_b = this.tooltipHandler).reInit) === null || _c === void 0 ? void 0 : _c.call(_b);
96595
+ (_c = (_b = this.tooltipHandler) === null || _b === void 0 ? void 0 : _b.reInit) === null || _c === void 0 ? void 0 : _c.call(_b);
96543
96596
  }
96544
96597
  else {
96545
96598
  this._initHandler();
@@ -97974,7 +98027,7 @@
97974
98027
  this.initZoomEvent = () => {
97975
98028
  var _a, _b, _c, _d, _e, _f, _g;
97976
98029
  const delayType = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.delayType) !== null && _b !== void 0 ? _b : 'throttle';
97977
- const delayTime = isValid$1((_c = this._spec) === null || _c === void 0 ? void 0 : _c.delayType) ? ((_e = (_d = this._spec) === null || _d === void 0 ? void 0 : _d.delayTime) !== null && _e !== void 0 ? _e : 30) : 0;
98030
+ const delayTime = isValid$1((_c = this._spec) === null || _c === void 0 ? void 0 : _c.delayType) ? (_e = (_d = this._spec) === null || _d === void 0 ? void 0 : _d.delayTime) !== null && _e !== void 0 ? _e : 30 : 0;
97978
98031
  const realTime = (_g = (_f = this._spec) === null || _f === void 0 ? void 0 : _f.realTime) !== null && _g !== void 0 ? _g : true;
97979
98032
  const option = { delayType, delayTime, realTime, allowComponentZoom: true };
97980
98033
  if (this._zoomAttr.enable) {
@@ -98029,6 +98082,12 @@
98029
98082
  value = -value;
98030
98083
  }
98031
98084
  if (active) {
98085
+ const scrollStep = this._spec.scrollStep;
98086
+ if (isValidNumber$1(scrollStep)) {
98087
+ const sign = value > 0 ? 1 : -1;
98088
+ const scrollStepPercent = (scrollStep * (this.getState().end - this.getState().start)) / 1;
98089
+ value = sign * scrollStepPercent;
98090
+ }
98032
98091
  this.handleChartMove(value, (_a = this._scrollAttr.rate) !== null && _a !== void 0 ? _a : 1);
98033
98092
  }
98034
98093
  const hasChange = this.getState().start !== 0 && this.getState().end !== 1;
@@ -99435,8 +99494,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
99435
99494
  return SCROLL_BAR_DEFAULT_SIZE;
99436
99495
  }
99437
99496
  _getAttrs() {
99438
- var _a, _b, _c, _d, _e, _f;
99439
- return Object.assign({ zIndex: this.layoutZIndex, x: this.getLayoutStartPoint().x, y: this.getLayoutStartPoint().y, width: this.getLayoutRect().width, height: this.getLayoutRect().height, range: [this._start, this._end], direction: this._isHorizontal ? 'horizontal' : 'vertical', delayType: (_a = this._spec) === null || _a === void 0 ? void 0 : _a.delayType, delayTime: isValid$1((_b = this._spec) === null || _b === void 0 ? void 0 : _b.delayType) ? ((_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.delayTime) !== null && _d !== void 0 ? _d : 30) : 0, realTime: (_f = (_e = this._spec) === null || _e === void 0 ? void 0 : _e.realTime) !== null && _f !== void 0 ? _f : true }, this._getComponentAttrs());
99497
+ var _a, _b, _c, _d, _e, _f, _g;
99498
+ return Object.assign({ zIndex: this.layoutZIndex, x: this.getLayoutStartPoint().x, y: this.getLayoutStartPoint().y, width: this.getLayoutRect().width, height: this.getLayoutRect().height, range: [this._start, this._end], direction: this._isHorizontal ? 'horizontal' : 'vertical', delayType: (_a = this._spec) === null || _a === void 0 ? void 0 : _a.delayType, delayTime: isValid$1((_b = this._spec) === null || _b === void 0 ? void 0 : _b.delayType) ? (_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.delayTime) !== null && _d !== void 0 ? _d : 30 : 0, realTime: (_f = (_e = this._spec) === null || _e === void 0 ? void 0 : _e.realTime) !== null && _f !== void 0 ? _f : true, minSliderSize: (_g = this._spec) === null || _g === void 0 ? void 0 : _g.minSliderSize }, this._getComponentAttrs());
99440
99499
  }
99441
99500
  _createOrUpdateComponent() {
99442
99501
  const attrs = this._getAttrs();
@@ -101355,7 +101414,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
101355
101414
  };
101356
101415
  }
101357
101416
  _getTitleAttrs() {
101358
- var _a, _b, _c, _d, _e, _f, _g, _h;
101417
+ var _a, _b, _c, _d, _e, _f;
101359
101418
  if (this._spec.visible === false) {
101360
101419
  return { visible: false };
101361
101420
  }
@@ -101363,10 +101422,26 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
101363
101422
  const titleWidth = calcLayoutNumber(this._spec.width, layoutRect.width, null, layoutRect.width);
101364
101423
  const titleMaxWidth = calcLayoutNumber(this._spec.maxWidth, layoutRect.width, null, layoutRect.width);
101365
101424
  const maxWidth = Math.max(Math.min(titleWidth, titleMaxWidth, layoutRect.width), 0);
101366
- const attrs = Object.assign(Object.assign({}, pickWithout(this._spec, ['padding'])), { textType: (_a = this._spec.textType) !== null && _a !== void 0 ? _a : 'text', text: (_b = this._spec.text) !== null && _b !== void 0 ? _b : '', subtextType: (_c = this._spec.subtextType) !== null && _c !== void 0 ? _c : 'text', subtext: (_d = this._spec.subtext) !== null && _d !== void 0 ? _d : '', x: (_e = this._spec.x) !== null && _e !== void 0 ? _e : 0, y: (_f = this._spec.y) !== null && _f !== void 0 ? _f : 0, height: this._spec.height, minWidth: this._spec.minWidth, maxWidth, minHeight: this._spec.minHeight, maxHeight: this._spec.maxHeight, padding: this._spec.innerPadding, align: (_g = this._spec.align) !== null && _g !== void 0 ? _g : 'left', verticalAlign: (_h = this._spec.verticalAlign) !== null && _h !== void 0 ? _h : 'top', textStyle: Object.assign({ width: maxWidth, maxLineWidth: maxWidth }, this._spec.textStyle), subtextStyle: Object.assign({ maxLineWidth: maxWidth }, this._spec.subtextStyle) });
101425
+ const hasText = isValid$1(this._spec.text) && this._spec.text !== '';
101426
+ const hasSubtext = isValid$1(this._spec.subtext) && this._spec.subtext !== '';
101427
+ const attrs = Object.assign(Object.assign({}, pickWithout(this._spec, ['padding'])), { textType: (_a = this._spec.textType) !== null && _a !== void 0 ? _a : 'text', text: hasText ? this._spec.text : undefined, subtextType: (_b = this._spec.subtextType) !== null && _b !== void 0 ? _b : 'text', subtext: hasSubtext ? this._spec.subtext : undefined, x: (_c = this._spec.x) !== null && _c !== void 0 ? _c : 0, y: (_d = this._spec.y) !== null && _d !== void 0 ? _d : 0, height: this._spec.height, minWidth: this._spec.minWidth, maxWidth, minHeight: this._spec.minHeight, maxHeight: this._spec.maxHeight, padding: this._spec.innerPadding, align: (_e = this._spec.align) !== null && _e !== void 0 ? _e : 'left', verticalAlign: (_f = this._spec.verticalAlign) !== null && _f !== void 0 ? _f : 'top', textStyle: Object.assign({ maxLineWidth: maxWidth }, this._spec.textStyle), subtextStyle: Object.assign({ maxLineWidth: maxWidth }, this._spec.subtextStyle) });
101428
+ if (hasText) {
101429
+ attrs.textStyle.width = maxWidth;
101430
+ }
101431
+ if (hasSubtext) {
101432
+ attrs.subtextStyle.width = maxWidth;
101433
+ }
101367
101434
  if (isValid$1(this._spec.width)) {
101368
- attrs.textStyle.width = Math.max(titleWidth, layoutRect.width);
101369
- attrs.subtextStyle.width = attrs.textStyle.width;
101435
+ const clampedWidth = Math.max(Math.min(titleWidth, layoutRect.width), 0);
101436
+ if (hasText) {
101437
+ attrs.textStyle.width = clampedWidth;
101438
+ }
101439
+ else {
101440
+ delete attrs.textStyle.width;
101441
+ }
101442
+ if (hasSubtext) {
101443
+ attrs.subtextStyle.width = clampedWidth;
101444
+ }
101370
101445
  }
101371
101446
  return attrs;
101372
101447
  }
@@ -103260,6 +103335,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103260
103335
  this._initMarkBrushState(componentIndex, '');
103261
103336
  brushComponent.children[0].removeAllChild();
103262
103337
  }
103338
+ _shouldEnableInteractive() {
103339
+ return this.getOption().getCompiler().getOption().interactive !== false;
103340
+ }
103263
103341
  _createBrushComponent(region, componentIndex) {
103264
103342
  var _a, _b;
103265
103343
  const interactiveAttr = this._getBrushInteractiveAttr(region);
@@ -103270,33 +103348,45 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103270
103348
  this._cacheInteractiveRangeAttrs.push(interactiveAttr);
103271
103349
  brush.addEventListener(IOperateType.brushActive, (e) => {
103272
103350
  this._initMarkBrushState(componentIndex, OUT_BRUSH_STATE);
103273
- this._emitEvent(exports.ChartEvent.brushActive, region);
103351
+ this._emitEvent(exports.ChartEvent.brushActive, region, e);
103274
103352
  });
103275
103353
  brush.addEventListener(IOperateType.drawStart, (e) => {
103354
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103355
+ this._option.globalInstance.disableDimensionHoverEvent(true);
103356
+ }
103276
103357
  this._setRegionMarkPickable(region, true);
103277
- this._emitEvent(exports.ChartEvent.brushStart, region);
103358
+ this._emitEvent(exports.ChartEvent.brushStart, region, e);
103278
103359
  });
103279
103360
  brush.addEventListener(IOperateType.moveStart, (e) => {
103361
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103362
+ this._option.globalInstance.disableDimensionHoverEvent(true);
103363
+ }
103280
103364
  this._setRegionMarkPickable(region, true);
103281
- this._emitEvent(exports.ChartEvent.brushStart, region);
103365
+ this._emitEvent(exports.ChartEvent.brushStart, region, e);
103282
103366
  });
103283
103367
  brush.addEventListener(IOperateType.drawing, (e) => {
103284
103368
  this._setRegionMarkPickable(region, false);
103285
103369
  this._handleBrushChange(region, e);
103286
- this._emitEvent(exports.ChartEvent.brushChange, region);
103370
+ this._emitEvent(exports.ChartEvent.brushChange, region, e);
103287
103371
  });
103288
103372
  brush.addEventListener(IOperateType.moving, (e) => {
103289
103373
  this._setRegionMarkPickable(region, false);
103290
103374
  this._handleBrushChange(region, e);
103291
- this._emitEvent(exports.ChartEvent.brushChange, region);
103375
+ this._emitEvent(exports.ChartEvent.brushChange, region, e);
103292
103376
  });
103293
103377
  brush.addEventListener(IOperateType.brushClear, (e) => {
103378
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103379
+ this._option.globalInstance.disableDimensionHoverEvent(false);
103380
+ }
103294
103381
  this._setRegionMarkPickable(region, true);
103295
103382
  this._initMarkBrushState(componentIndex, '');
103296
- this._emitEvent(exports.ChartEvent.brushClear, region);
103383
+ this._emitEvent(exports.ChartEvent.brushClear, region, e);
103297
103384
  });
103298
103385
  brush.addEventListener(IOperateType.drawEnd, (e) => {
103299
103386
  var _a;
103387
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103388
+ this._option.globalInstance.disableDimensionHoverEvent(false);
103389
+ }
103300
103390
  this._setRegionMarkPickable(region, true);
103301
103391
  const { operateMask } = e.detail;
103302
103392
  const { updateElementsState = true } = this._spec;
@@ -103304,11 +103394,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103304
103394
  if (this._spec.onBrushEnd(e) === true) {
103305
103395
  this.clearGraphic();
103306
103396
  this._initMarkBrushState(componentIndex, '');
103307
- this._emitEvent(exports.ChartEvent.brushClear, region);
103397
+ this._emitEvent(exports.ChartEvent.brushClear, region, e);
103308
103398
  }
103309
103399
  else {
103310
103400
  this._spec.onBrushEnd(e);
103311
- this._emitEvent(exports.ChartEvent.brushEnd, region);
103401
+ this._emitEvent(exports.ChartEvent.brushEnd, region, e);
103312
103402
  }
103313
103403
  }
103314
103404
  else {
@@ -103316,10 +103406,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103316
103406
  if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || !updateElementsState) {
103317
103407
  this._setAxisAndDataZoom(operateMask, region);
103318
103408
  }
103319
- this._emitEvent(exports.ChartEvent.brushEnd, region);
103409
+ this._emitEvent(exports.ChartEvent.brushEnd, region, e);
103320
103410
  }
103321
103411
  });
103322
103412
  brush.addEventListener(IOperateType.moveEnd, (e) => {
103413
+ if (this._spec.disableDimensionHoverWhenBrushing) {
103414
+ this._option.globalInstance.disableDimensionHoverEvent(false);
103415
+ }
103323
103416
  this._setRegionMarkPickable(region, true);
103324
103417
  const { operateMask } = e.detail;
103325
103418
  const { updateElementsState = true } = this._spec;
@@ -103327,7 +103420,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103327
103420
  if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || updateElementsState) {
103328
103421
  this._setAxisAndDataZoom(operateMask, region);
103329
103422
  }
103330
- this._emitEvent(exports.ChartEvent.brushEnd, region);
103423
+ this._emitEvent(exports.ChartEvent.brushEnd, region, e);
103331
103424
  });
103332
103425
  }
103333
103426
  _getBrushInteractiveAttr(region) {
@@ -103345,7 +103438,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103345
103438
  maxX: seriesRegionEndX
103346
103439
  },
103347
103440
  xRange: [seriesRegionStartX, seriesRegionEndX],
103348
- yRange: [seriesRegionStartY, seriesRegionEndY]
103441
+ yRange: [seriesRegionStartY, seriesRegionEndY],
103442
+ interactive: this._shouldEnableInteractive()
103349
103443
  };
103350
103444
  }
103351
103445
  _transformBrushedMarkAttr(brushedStyle) {
@@ -103366,6 +103460,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103366
103460
  }
103367
103461
  _handleBrushChange(region, e) {
103368
103462
  const { operateMask } = e.detail;
103463
+ this._operateMask = operateMask;
103369
103464
  const { updateElementsState = true } = this._spec;
103370
103465
  if (updateElementsState) {
103371
103466
  this._reconfigItem(operateMask, region);
@@ -103390,7 +103485,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103390
103485
  }
103391
103486
  return data;
103392
103487
  }
103393
- _emitEvent(eventType, region) {
103488
+ _emitEvent(eventType, region, e) {
103394
103489
  var _a;
103395
103490
  this.event.emit(eventType, {
103396
103491
  model: this,
@@ -103407,7 +103502,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103407
103502
  linkedOutOfBrushElementsMap: this._linkedOutOfBrushElementsMap,
103408
103503
  zoomRecord: this._zoomRecord
103409
103504
  },
103410
- vchart: (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance
103505
+ vchart: (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance,
103506
+ event: e
103411
103507
  });
103412
103508
  }
103413
103509
  _reconfigItem(operateMask, region) {
@@ -103662,6 +103758,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103662
103758
  this._brushComponents = null;
103663
103759
  }
103664
103760
  }
103761
+ clearBrushStateAndMask() {
103762
+ this._relativeRegions.forEach((region, componentIndex) => {
103763
+ this._initMarkBrushState(componentIndex, '');
103764
+ this._brushComponents[componentIndex].children[0].removeAllChild();
103765
+ });
103766
+ }
103665
103767
  }
103666
103768
  Brush.type = ComponentTypeEnum.brush;
103667
103769
  Brush.builtInTheme = {