@visactor/vchart 2.0.13-alpha.9 → 2.0.14-alpha.0

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 (78) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +84 -103
  3. package/build/index.js +84 -103
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/compile/compiler.d.ts +0 -1
  7. package/cjs/compile/compiler.js +0 -3
  8. package/cjs/compile/compiler.js.map +1 -1
  9. package/cjs/compile/interface/compilable-item.d.ts +1 -2
  10. package/cjs/compile/interface/compilable-item.js.map +1 -1
  11. package/cjs/component/brush/brush.d.ts +1 -4
  12. package/cjs/component/brush/brush.js +14 -31
  13. package/cjs/component/brush/brush.js.map +1 -1
  14. package/cjs/component/brush/interface.d.ts +1 -3
  15. package/cjs/component/brush/interface.js.map +1 -1
  16. package/cjs/component/crosshair/interface/spec.d.ts +0 -1
  17. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  18. package/cjs/component/tooltip/interface/common.d.ts +0 -1
  19. package/cjs/component/tooltip/interface/common.js.map +1 -1
  20. package/cjs/component/tooltip/processor/base.js +1 -1
  21. package/cjs/component/tooltip/processor/base.js.map +1 -1
  22. package/cjs/component/tooltip/tooltip.d.ts +0 -1
  23. package/cjs/component/tooltip/tooltip.js +2 -3
  24. package/cjs/component/tooltip/tooltip.js.map +1 -1
  25. package/cjs/component/tooltip/utils/show-tooltip.d.ts +1 -0
  26. package/cjs/component/tooltip/utils/show-tooltip.js +33 -6
  27. package/cjs/component/tooltip/utils/show-tooltip.js.map +1 -1
  28. package/cjs/core/index.d.ts +1 -1
  29. package/cjs/core/index.js +1 -1
  30. package/cjs/core/index.js.map +1 -1
  31. package/cjs/core/interface.d.ts +1 -9
  32. package/cjs/core/interface.js.map +1 -1
  33. package/cjs/core/vchart.d.ts +0 -4
  34. package/cjs/core/vchart.js +1 -10
  35. package/cjs/core/vchart.js.map +1 -1
  36. package/cjs/event/event.js +1 -1
  37. package/cjs/event/event.js.map +1 -1
  38. package/cjs/event/events/dimension/dimension-hover.js +2 -4
  39. package/cjs/event/events/dimension/dimension-hover.js.map +1 -1
  40. package/cjs/mark/base/base-mark.js +9 -5
  41. package/cjs/mark/base/base-mark.js.map +1 -1
  42. package/esm/compile/compiler.d.ts +0 -1
  43. package/esm/compile/compiler.js +0 -3
  44. package/esm/compile/compiler.js.map +1 -1
  45. package/esm/compile/interface/compilable-item.d.ts +1 -2
  46. package/esm/compile/interface/compilable-item.js.map +1 -1
  47. package/esm/component/brush/brush.d.ts +1 -4
  48. package/esm/component/brush/brush.js +14 -31
  49. package/esm/component/brush/brush.js.map +1 -1
  50. package/esm/component/brush/interface.d.ts +1 -3
  51. package/esm/component/brush/interface.js.map +1 -1
  52. package/esm/component/crosshair/interface/spec.d.ts +0 -1
  53. package/esm/component/crosshair/interface/spec.js.map +1 -1
  54. package/esm/component/tooltip/interface/common.d.ts +0 -1
  55. package/esm/component/tooltip/interface/common.js.map +1 -1
  56. package/esm/component/tooltip/processor/base.js +1 -1
  57. package/esm/component/tooltip/processor/base.js.map +1 -1
  58. package/esm/component/tooltip/tooltip.d.ts +0 -1
  59. package/esm/component/tooltip/tooltip.js +2 -3
  60. package/esm/component/tooltip/tooltip.js.map +1 -1
  61. package/esm/component/tooltip/utils/show-tooltip.d.ts +1 -0
  62. package/esm/component/tooltip/utils/show-tooltip.js +33 -6
  63. package/esm/component/tooltip/utils/show-tooltip.js.map +1 -1
  64. package/esm/core/index.d.ts +1 -1
  65. package/esm/core/index.js +1 -1
  66. package/esm/core/index.js.map +1 -1
  67. package/esm/core/interface.d.ts +1 -9
  68. package/esm/core/interface.js.map +1 -1
  69. package/esm/core/vchart.d.ts +0 -4
  70. package/esm/core/vchart.js +1 -10
  71. package/esm/core/vchart.js.map +1 -1
  72. package/esm/event/event.js +1 -1
  73. package/esm/event/event.js.map +1 -1
  74. package/esm/event/events/dimension/dimension-hover.js +2 -4
  75. package/esm/event/events/dimension/dimension-hover.js.map +1 -1
  76. package/esm/mark/base/base-mark.js +9 -5
  77. package/esm/mark/base/base-mark.js.map +1 -1
  78. package/package.json +8 -8
package/build/index.js CHANGED
@@ -16495,6 +16495,7 @@
16495
16495
  var _a;
16496
16496
  if (!states.length) return void this.clearStates(hasAnimation);
16497
16497
  if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
16498
+ this.stateSort && (states = states.sort(this.stateSort));
16498
16499
  const stateAttrs = {};
16499
16500
  states.forEach(stateName => {
16500
16501
  var _a;
@@ -18523,7 +18524,7 @@
18523
18524
  var _a;
18524
18525
  if (!states.length) return void this.clearStates(hasAnimation);
18525
18526
  if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
18526
- this.stopStateAnimates();
18527
+ this.stopStateAnimates(), this.stateSort && (states = states.sort(this.stateSort));
18527
18528
  const stateAttrs = {},
18528
18529
  subAttrs = this.subGraphic.map(() => ({}));
18529
18530
  states.forEach(stateName => {
@@ -35177,8 +35178,8 @@
35177
35178
  }
35178
35179
  parseParams(params, isTimeline, child) {
35179
35180
  var _a, _b;
35180
- const totalTime = this.resolveValue(params.totalTime, void 0, void 0),
35181
- startTime = this.resolveValue(params.startTime, void 0, 0),
35181
+ const totalTime = this.resolveValue(params.totalTime, child, void 0),
35182
+ startTime = this.resolveValue(params.startTime, child, 0),
35182
35183
  parsedParams = Object.assign({}, params);
35183
35184
  parsedParams.oneByOneDelay = 0, parsedParams.startTime = startTime, parsedParams.totalTime = totalTime;
35184
35185
  const oneByOne = this.resolveValue(params.oneByOne, child, !1);
@@ -35227,11 +35228,10 @@
35227
35228
  let oneByOneDelay = 0;
35228
35229
  oneByOne && (oneByOneDelay = "number" == typeof oneByOne ? oneByOne : oneByOne ? delay + delayAfter + duration : 0), parsedParams.oneByOneDelay = oneByOneDelay, parsedParams.custom = null !== (_a = params.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[null !== (_b = params.type) && void 0 !== _b ? _b : "fromTo"];
35229
35230
  const customType = getCustomType(parsedParams.custom);
35230
- if (parsedParams.customType = customType, totalTime) {
35231
- const _totalTime = delay + delayAfter + duration + oneByOneDelay * (this._target.count - 2),
35232
- scale = totalTime ? totalTime / _totalTime : 1;
35233
- parsedParams.delay = delay * scale, parsedParams.delayAfter = delayAfter * scale, parsedParams.duration = duration * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime;
35234
- }
35231
+ parsedParams.customType = customType;
35232
+ const _totalTime = delay + delayAfter + duration + oneByOneDelay * (this._target.count - 2),
35233
+ scale = isValidNumber$1(totalTime) ? totalTime / _totalTime : 1;
35234
+ parsedParams.delay = delay * scale, parsedParams.delayAfter = delayAfter * scale, parsedParams.duration = duration * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime;
35235
35235
  }
35236
35236
  return parsedParams;
35237
35237
  }
@@ -51102,8 +51102,6 @@
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;
51106
- if (!1 === this._beforeBrushEvent(e)) return;
51107
51105
  const {
51108
51106
  updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
51109
51107
  endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
@@ -51111,11 +51109,11 @@
51111
51109
  } = this.attribute;
51112
51110
  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];
51113
51111
  }, this._onBrushing = 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))));
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)));
51115
51113
  }, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap$1[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
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);
51114
+ this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1;
51117
51115
  }, this._onBrushClear = e => {
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);
51116
+ e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1;
51119
51117
  };
51120
51118
  }
51121
51119
  _bindBrushEvents() {
@@ -51127,7 +51125,6 @@
51127
51125
  array(trigger).forEach(t => this.stage.addEventListener(t, this._onBrushStart)), array(resetTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushClear));
51128
51126
  }
51129
51127
  _initDraw(e) {
51130
- if (!1 === this.attribute.interactive) return;
51131
51128
  const {
51132
51129
  brushMode: brushMode
51133
51130
  } = this.attribute,
@@ -51136,7 +51133,6 @@
51136
51133
  }
51137
51134
  _initMove(e) {
51138
51135
  var _a, _b;
51139
- if (!1 === this.attribute.interactive) return;
51140
51136
  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;
51141
51137
  const {
51142
51138
  interactiveRange: interactiveRange
@@ -51161,7 +51157,6 @@
51161
51157
  }
51162
51158
  _drawing(e) {
51163
51159
  var _a;
51164
- if (!1 === this.attribute.interactive) return;
51165
51160
  const pos = this.eventPosToStagePos(e),
51166
51161
  {
51167
51162
  brushType: brushType,
@@ -51186,7 +51181,6 @@
51186
51181
  (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)));
51187
51182
  }
51188
51183
  _moving(e) {
51189
- if (!1 === this.attribute.interactive) return;
51190
51184
  const startPos = this._cacheMovePoint,
51191
51185
  pos = this.eventPosToStagePos(e);
51192
51186
  if (pos.x === (null == startPos ? void 0 : startPos.x) && pos.y === (null == startPos ? void 0 : startPos.y)) return;
@@ -51200,7 +51194,6 @@
51200
51194
  }), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this._dispatchBrushEvent(IOperateType.moving, e);
51201
51195
  }
51202
51196
  _drawEnd(e) {
51203
- if (!1 === this.attribute.interactive) return;
51204
51197
  const {
51205
51198
  removeOnClick = !0,
51206
51199
  sizeThreshold = DEFAULT_SIZE_THRESHOLD
@@ -51218,7 +51211,7 @@
51218
51211
  }
51219
51212
  }
51220
51213
  _moveEnd(e) {
51221
- !1 !== this.attribute.interactive && (this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e));
51214
+ this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e);
51222
51215
  }
51223
51216
  render() {
51224
51217
  this._bindBrushEvents();
@@ -51325,10 +51318,6 @@
51325
51318
  pos = this.eventPosToStagePos(e);
51326
51319
  return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
51327
51320
  }
51328
- _beforeBrushEvent(e) {
51329
- var _a, _b;
51330
- return null === (_b = (_a = this.attribute).beforeBrushChange) || void 0 === _b ? void 0 : _b.call(_a, e);
51331
- }
51332
51321
  _dispatchBrushEvent(operateType, e) {
51333
51322
  this._dispatchEvent(operateType, {
51334
51323
  operateMask: this._operatingMask,
@@ -53874,7 +53863,7 @@
53874
53863
  if (ComposedEventCtor) {
53875
53864
  const composedEvent = new ComposedEventCtor(this._eventDispatcher, this._mode);
53876
53865
  composedEvent.register(eType, handler);
53877
- this._composedEventMap.set(handler.callback, {
53866
+ this._composedEventMap.set(callback, {
53878
53867
  eventType: eType,
53879
53868
  event: composedEvent
53880
53869
  });
@@ -54911,9 +54900,6 @@
54911
54900
  getRootGroup() {
54912
54901
  return this._rootGroup;
54913
54902
  }
54914
- getOption() {
54915
- return this._option;
54916
- }
54917
54903
  constructor(container, option) {
54918
54904
  this._count = 0;
54919
54905
  this._rootMarks = [];
@@ -58908,6 +58894,7 @@
58908
58894
  allGraphics.forEach((g, index) => {
58909
58895
  g.context.graphicCount = graphicCount;
58910
58896
  g.context.graphicIndex = index;
58897
+ g.stateSort = this._stateSort;
58911
58898
  });
58912
58899
  this._dataByKey = newGroupedData;
58913
58900
  this._graphics = allGraphics;
@@ -58953,8 +58940,13 @@
58953
58940
  var _a;
58954
58941
  const attrsByGroup = noGroupEncode ? null : this._runGroupEncoder((_a = this._encoderOfState) === null || _a === void 0 ? void 0 : _a.group);
58955
58942
  graphics.forEach((g, index) => {
58956
- var _a;
58957
- const attrs = this._runEncoderOfGraphic((_a = this._encoderOfState) === null || _a === void 0 ? void 0 : _a.update, g);
58943
+ var _a, _b;
58944
+ let attrs = this._runEncoderOfGraphic((_a = this._encoderOfState) === null || _a === void 0 ? void 0 : _a.update, g);
58945
+ (_b = g.currentStates) === null || _b === void 0 ? void 0 : _b.forEach((_state) => {
58946
+ var _a;
58947
+ const stateAttr = this._runEncoderOfGraphic((_a = this._encoderOfState) === null || _a === void 0 ? void 0 : _a[_state], g);
58948
+ attrs = Object.assign(Object.assign({}, attrs), stateAttr);
58949
+ });
58958
58950
  if (!isNil$1(this._markConfig.interactive)) {
58959
58951
  attrs.pickable = this._markConfig.interactive;
58960
58952
  }
@@ -58976,6 +58968,7 @@
58976
58968
  }
58977
58969
  g.context = mockGraphic.context;
58978
58970
  g.context.diffAttrs = finalAttrs;
58971
+ g.stateSort = this._stateSort;
58979
58972
  const gIndex = this._graphics === graphics ? index : index + this._graphics.length - graphics.length;
58980
58973
  if (gIndex >= 0) {
58981
58974
  this._graphics[gIndex] = g;
@@ -60390,7 +60383,6 @@
60390
60383
  this._observer = null;
60391
60384
  this._context = {};
60392
60385
  this._renderState = RenderStateEnum.render;
60393
- this._disableDimensionHoverEvent = false;
60394
60386
  this._doResize = () => {
60395
60387
  const { width, height } = this.getCurrentSize();
60396
60388
  if (this._currentSize.width !== width || this._currentSize.height !== height) {
@@ -60535,7 +60527,7 @@
60535
60527
  this._compiler.updateLayoutTag();
60536
60528
  this._setFontFamilyTheme(this.getTheme('fontFamily'));
60537
60529
  this._initDataSet(this._option.dataSet);
60538
- this._autoSize = isTrueBrowseEnv ? ((_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true) : false;
60530
+ this._autoSize = isTrueBrowseEnv ? (_g = (_f = spec.autoFit) !== null && _f !== void 0 ? _f : this._option.autoFit) !== null && _g !== void 0 ? _g : true : false;
60539
60531
  this._bindResizeEvent();
60540
60532
  this._bindViewEvent();
60541
60533
  this._initChartPlugin();
@@ -61188,7 +61180,7 @@
61188
61180
  resize = true;
61189
61181
  }
61190
61182
  const lasAutoSize = this._autoSize;
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;
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;
61192
61184
  if (this._autoSize !== lasAutoSize) {
61193
61185
  resize = true;
61194
61186
  }
@@ -61429,22 +61421,6 @@
61429
61421
  var _a;
61430
61422
  return (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setDimensionIndex(value, opt);
61431
61423
  }
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
- }
61448
61424
  showCrosshair(cb) {
61449
61425
  var _a;
61450
61426
  (_a = this._chart) === null || _a === void 0 ? void 0 : _a.showCrosshair(cb);
@@ -61773,7 +61749,7 @@
61773
61749
  });
61774
61750
  };
61775
61751
 
61776
- const version = "2.0.12";
61752
+ const version = "2.0.13";
61777
61753
 
61778
61754
  const addVChartProperty = (data, op) => {
61779
61755
  const context = op.beforeCall();
@@ -64465,8 +64441,7 @@
64465
64441
  super(...arguments);
64466
64442
  this._cacheDimensionInfo = null;
64467
64443
  this.onMouseMove = (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))) {
64444
+ if (!params) {
64470
64445
  return;
64471
64446
  }
64472
64447
  const x = params.event.viewX;
@@ -64488,8 +64463,7 @@
64488
64463
  }
64489
64464
  };
64490
64465
  this.onMouseOut = (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))) {
64466
+ if (!params) {
64493
64467
  return;
64494
64468
  }
64495
64469
  this._callback.call(null, Object.assign(Object.assign({}, params), { action: 'leave', dimensionInfo: this._cacheDimensionInfo ? this._cacheDimensionInfo.slice() : [] }));
@@ -71787,9 +71761,6 @@
71787
71761
  }
71788
71762
  shouldHandleTooltip(params, info) {
71789
71763
  var _a, _b;
71790
- if (!this.component.enable) {
71791
- return false;
71792
- }
71793
71764
  if (isNil$1(info)) {
71794
71765
  return false;
71795
71766
  }
@@ -95674,7 +95645,7 @@
95674
95645
  return Object.keys(data).length > 0;
95675
95646
  };
95676
95647
  function showTooltip(datum, options, component) {
95677
- var _a, _b, _c, _d, _e, _f;
95648
+ var _a, _b, _c, _d, _e, _f, _g;
95678
95649
  const opt = Object.assign({ regionIndex: 0 }, options);
95679
95650
  const componentOptions = component.getOption();
95680
95651
  const region = componentOptions.getRegionsInUserIdOrIndex(isValid$1(opt.regionId) ? [opt.regionId] : undefined, isValid$1(opt.regionIndex) ? [opt.regionIndex] : undefined)[0];
@@ -95694,12 +95665,11 @@
95694
95665
  const getOriginDatum = (info) => {
95695
95666
  var _a;
95696
95667
  const { dimensionFields, dimensionData, measureFields, measureData, groupField, groupData } = info.data;
95697
- const originDatum = (_a = info.series.getViewData()) === null || _a === void 0 ? void 0 : _a.latestData.find((datum) => {
95668
+ return (_a = info.series.getViewData()) === null || _a === void 0 ? void 0 : _a.latestData.find((datum) => {
95698
95669
  return (datumContainsArray(dimensionFields, dimensionData)(datum) &&
95699
95670
  datumContainsArray(measureFields, measureData)(datum) &&
95700
95671
  (isNil$1(groupField) || datumContainsArray([groupField], [groupData])(datum)));
95701
95672
  });
95702
- return originDatum;
95703
95673
  };
95704
95674
  const transform = region.getOption().globalInstance.getStage().window.getViewBoxTransform().getInverse();
95705
95675
  const getMockEvent = (originPos) => {
@@ -95773,7 +95743,7 @@
95773
95743
  if (!info) {
95774
95744
  return 'none';
95775
95745
  }
95776
- const mockDatum = Object.assign(Object.assign({}, getOriginDatum(info)), datum);
95746
+ const mockDatum = (_f = info.data.originDatum) !== null && _f !== void 0 ? _f : Object.assign(Object.assign({}, getOriginDatum(info)), datum);
95777
95747
  const mockDimensionData = [
95778
95748
  {
95779
95749
  datum: [mockDatum],
@@ -95790,7 +95760,7 @@
95790
95760
  changePositionOnly: false,
95791
95761
  tooltip: null,
95792
95762
  dimensionInfo: mockDimensionInfo,
95793
- chart: (_f = componentOptions.globalInstance.getChart()) !== null && _f !== void 0 ? _f : undefined,
95763
+ chart: (_g = componentOptions.globalInstance.getChart()) !== null && _g !== void 0 ? _g : undefined,
95794
95764
  datum: mockDatum,
95795
95765
  model: info.series,
95796
95766
  source: Event_Source_Type.chart,
@@ -95855,6 +95825,45 @@
95855
95825
  series
95856
95826
  });
95857
95827
  };
95828
+ const parseMarkInfoOfGeoSeries = () => {
95829
+ var _a, _b, _c;
95830
+ console.log('parseMarkInfoOfGeoSeries');
95831
+ let originDatum = (_a = series.getViewData()) === null || _a === void 0 ? void 0 : _a.latestData.find(datumContainsArray(dimensionFields, dimensionData));
95832
+ const originMapDatum = (_c = (_b = series
95833
+ .getMapViewData) === null || _b === void 0 ? void 0 : _b.call(series)) === null || _c === void 0 ? void 0 : _c.latestData.find((datum) => dimensionFields.every((key, i) => datum.properties[key] === (dimensionData === null || dimensionData === void 0 ? void 0 : dimensionData[i])));
95834
+ let markInfoMeasureData = measureData;
95835
+ if (originMapDatum && !originDatum) {
95836
+ originDatum = Object.assign({}, datum);
95837
+ }
95838
+ if (!hasMeasureData) {
95839
+ measureData = getDataArrayFromFieldArray(measureFields, originDatum);
95840
+ markInfoMeasureData = measureData;
95841
+ if (!hasData(measureData) && !originDatum) {
95842
+ return;
95843
+ }
95844
+ measureData = [null];
95845
+ }
95846
+ const pos = series.type === exports.SeriesTypeEnum.pie
95847
+ ? series.dataToCentralPosition(originMapDatum.properties)
95848
+ : series.dataToPosition(originMapDatum.properties);
95849
+ if (isNil$1(pos) || isNaN(pos.x) || isNaN(pos.y)) {
95850
+ return;
95851
+ }
95852
+ markInfoList.push({
95853
+ pos,
95854
+ data: {
95855
+ dimensionFields,
95856
+ dimensionData,
95857
+ measureFields,
95858
+ measureData: markInfoMeasureData,
95859
+ hasMeasureData,
95860
+ groupField,
95861
+ groupData,
95862
+ originDatum
95863
+ },
95864
+ series
95865
+ });
95866
+ };
95858
95867
  if (series.coordinate === 'cartesian') {
95859
95868
  const cartesianSeries = series;
95860
95869
  const dimType = isDiscrete((_f = (_e = series.getYAxisHelper()) === null || _e === void 0 ? void 0 : _e.getScale(0)) === null || _f === void 0 ? void 0 : _f.type) ? 'y' : 'x';
@@ -95979,7 +95988,7 @@
95979
95988
  }
95980
95989
  }
95981
95990
  else if (series.coordinate === 'geo') {
95982
- parseMarkInfoOfSimpleSeries();
95991
+ parseMarkInfoOfGeoSeries();
95983
95992
  }
95984
95993
  });
95985
95994
  return markInfoList;
@@ -96087,7 +96096,6 @@
96087
96096
  this.specKey = 'tooltip';
96088
96097
  this.layoutType = 'none';
96089
96098
  this._isReleased = false;
96090
- this.enable = true;
96091
96099
  this._alwaysShow = false;
96092
96100
  this._eventList = [];
96093
96101
  this._isTooltipShown = false;
@@ -103243,9 +103251,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103243
103251
  this._initMarkBrushState(componentIndex, '');
103244
103252
  brushComponent.children[0].removeAllChild();
103245
103253
  }
103246
- _shouldEnableInteractive() {
103247
- return this.getOption().getCompiler().getOption().interactive !== false;
103248
- }
103249
103254
  _createBrushComponent(region, componentIndex) {
103250
103255
  var _a, _b;
103251
103256
  const interactiveAttr = this._getBrushInteractiveAttr(region);
@@ -103256,45 +103261,33 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103256
103261
  this._cacheInteractiveRangeAttrs.push(interactiveAttr);
103257
103262
  brush.addEventListener(IOperateType.brushActive, (e) => {
103258
103263
  this._initMarkBrushState(componentIndex, OUT_BRUSH_STATE);
103259
- this._emitEvent(exports.ChartEvent.brushActive, region, e);
103264
+ this._emitEvent(exports.ChartEvent.brushActive, region);
103260
103265
  });
103261
103266
  brush.addEventListener(IOperateType.drawStart, (e) => {
103262
- if (this._spec.disableDimensionHoverWhenBrushing) {
103263
- this._option.globalInstance.disableDimensionHoverEvent(true);
103264
- }
103265
103267
  this._setRegionMarkPickable(region, true);
103266
- this._emitEvent(exports.ChartEvent.brushStart, region, e);
103268
+ this._emitEvent(exports.ChartEvent.brushStart, region);
103267
103269
  });
103268
103270
  brush.addEventListener(IOperateType.moveStart, (e) => {
103269
- if (this._spec.disableDimensionHoverWhenBrushing) {
103270
- this._option.globalInstance.disableDimensionHoverEvent(true);
103271
- }
103272
103271
  this._setRegionMarkPickable(region, true);
103273
- this._emitEvent(exports.ChartEvent.brushStart, region, e);
103272
+ this._emitEvent(exports.ChartEvent.brushStart, region);
103274
103273
  });
103275
103274
  brush.addEventListener(IOperateType.drawing, (e) => {
103276
103275
  this._setRegionMarkPickable(region, false);
103277
103276
  this._handleBrushChange(region, e);
103278
- this._emitEvent(exports.ChartEvent.brushChange, region, e);
103277
+ this._emitEvent(exports.ChartEvent.brushChange, region);
103279
103278
  });
103280
103279
  brush.addEventListener(IOperateType.moving, (e) => {
103281
103280
  this._setRegionMarkPickable(region, false);
103282
103281
  this._handleBrushChange(region, e);
103283
- this._emitEvent(exports.ChartEvent.brushChange, region, e);
103282
+ this._emitEvent(exports.ChartEvent.brushChange, region);
103284
103283
  });
103285
103284
  brush.addEventListener(IOperateType.brushClear, (e) => {
103286
- if (this._spec.disableDimensionHoverWhenBrushing) {
103287
- this._option.globalInstance.disableDimensionHoverEvent(false);
103288
- }
103289
103285
  this._setRegionMarkPickable(region, true);
103290
103286
  this._initMarkBrushState(componentIndex, '');
103291
- this._emitEvent(exports.ChartEvent.brushClear, region, e);
103287
+ this._emitEvent(exports.ChartEvent.brushClear, region);
103292
103288
  });
103293
103289
  brush.addEventListener(IOperateType.drawEnd, (e) => {
103294
103290
  var _a;
103295
- if (this._spec.disableDimensionHoverWhenBrushing) {
103296
- this._option.globalInstance.disableDimensionHoverEvent(false);
103297
- }
103298
103291
  this._setRegionMarkPickable(region, true);
103299
103292
  const { operateMask } = e.detail;
103300
103293
  const { updateElementsState = true } = this._spec;
@@ -103302,11 +103295,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103302
103295
  if (this._spec.onBrushEnd(e) === true) {
103303
103296
  this.clearGraphic();
103304
103297
  this._initMarkBrushState(componentIndex, '');
103305
- this._emitEvent(exports.ChartEvent.brushClear, region, e);
103298
+ this._emitEvent(exports.ChartEvent.brushClear, region);
103306
103299
  }
103307
103300
  else {
103308
103301
  this._spec.onBrushEnd(e);
103309
- this._emitEvent(exports.ChartEvent.brushEnd, region, e);
103302
+ this._emitEvent(exports.ChartEvent.brushEnd, region);
103310
103303
  }
103311
103304
  }
103312
103305
  else {
@@ -103314,13 +103307,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103314
103307
  if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || !updateElementsState) {
103315
103308
  this._setAxisAndDataZoom(operateMask, region);
103316
103309
  }
103317
- this._emitEvent(exports.ChartEvent.brushEnd, region, e);
103310
+ this._emitEvent(exports.ChartEvent.brushEnd, region);
103318
103311
  }
103319
103312
  });
103320
103313
  brush.addEventListener(IOperateType.moveEnd, (e) => {
103321
- if (this._spec.disableDimensionHoverWhenBrushing) {
103322
- this._option.globalInstance.disableDimensionHoverEvent(false);
103323
- }
103324
103314
  this._setRegionMarkPickable(region, true);
103325
103315
  const { operateMask } = e.detail;
103326
103316
  const { updateElementsState = true } = this._spec;
@@ -103328,7 +103318,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103328
103318
  if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || updateElementsState) {
103329
103319
  this._setAxisAndDataZoom(operateMask, region);
103330
103320
  }
103331
- this._emitEvent(exports.ChartEvent.brushEnd, region, e);
103321
+ this._emitEvent(exports.ChartEvent.brushEnd, region);
103332
103322
  });
103333
103323
  }
103334
103324
  _getBrushInteractiveAttr(region) {
@@ -103346,8 +103336,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103346
103336
  maxX: seriesRegionEndX
103347
103337
  },
103348
103338
  xRange: [seriesRegionStartX, seriesRegionEndX],
103349
- yRange: [seriesRegionStartY, seriesRegionEndY],
103350
- interactive: this._shouldEnableInteractive()
103339
+ yRange: [seriesRegionStartY, seriesRegionEndY]
103351
103340
  };
103352
103341
  }
103353
103342
  _transformBrushedMarkAttr(brushedStyle) {
@@ -103368,7 +103357,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103368
103357
  }
103369
103358
  _handleBrushChange(region, e) {
103370
103359
  const { operateMask } = e.detail;
103371
- this._operateMask = operateMask;
103372
103360
  const { updateElementsState = true } = this._spec;
103373
103361
  if (updateElementsState) {
103374
103362
  this._reconfigItem(operateMask, region);
@@ -103393,7 +103381,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103393
103381
  }
103394
103382
  return data;
103395
103383
  }
103396
- _emitEvent(eventType, region, e) {
103384
+ _emitEvent(eventType, region) {
103397
103385
  var _a;
103398
103386
  this.event.emit(eventType, {
103399
103387
  model: this,
@@ -103410,8 +103398,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103410
103398
  linkedOutOfBrushElementsMap: this._linkedOutOfBrushElementsMap,
103411
103399
  zoomRecord: this._zoomRecord
103412
103400
  },
103413
- vchart: (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance,
103414
- event: e
103401
+ vchart: (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance
103415
103402
  });
103416
103403
  }
103417
103404
  _reconfigItem(operateMask, region) {
@@ -103666,12 +103653,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103666
103653
  this._brushComponents = null;
103667
103654
  }
103668
103655
  }
103669
- clearBrushStateAndMask() {
103670
- this._relativeRegions.forEach((region, componentIndex) => {
103671
- this._initMarkBrushState(componentIndex, '');
103672
- this._brushComponents[componentIndex].children[0].removeAllChild();
103673
- });
103674
- }
103675
103656
  }
103676
103657
  Brush.type = ComponentTypeEnum.brush;
103677
103658
  Brush.builtInTheme = {