@visactor/vchart 1.13.11-alpha.2 → 1.13.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +376 -184
  3. package/build/index.js +376 -184
  4. package/build/index.min.js +1 -1
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/chart/histogram/base/histogram-base-transformer.js +1 -1
  7. package/cjs/chart/histogram/base/histogram-base-transformer.js.map +1 -1
  8. package/cjs/component/brush/brush.d.ts +1 -1
  9. package/cjs/component/brush/brush.js +18 -15
  10. package/cjs/component/brush/brush.js.map +1 -1
  11. package/cjs/component/crosshair/base.js +4 -3
  12. package/cjs/component/crosshair/base.js.map +1 -1
  13. package/cjs/component/crosshair/cartesian.js +3 -2
  14. package/cjs/component/crosshair/cartesian.js.map +1 -1
  15. package/cjs/component/crosshair/interface/common.d.ts +3 -1
  16. package/cjs/component/crosshair/interface/common.js.map +1 -1
  17. package/cjs/component/crosshair/interface/spec.d.ts +1 -0
  18. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  19. package/cjs/component/crosshair/interface/theme.d.ts +2 -0
  20. package/cjs/component/crosshair/interface/theme.js.map +1 -1
  21. package/cjs/component/crosshair/utils/cartesian.js +15 -13
  22. package/cjs/component/crosshair/utils/cartesian.js.map +1 -1
  23. package/cjs/component/crosshair/utils/common.js +9 -5
  24. package/cjs/component/crosshair/utils/common.js.map +1 -1
  25. package/cjs/component/data-zoom/data-filter-base-component.js +7 -6
  26. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  27. package/cjs/component/data-zoom/util.d.ts +1 -0
  28. package/cjs/component/data-zoom/util.js +13 -10
  29. package/cjs/component/data-zoom/util.js.map +1 -1
  30. package/cjs/component/marker/utils.js +14 -9
  31. package/cjs/component/marker/utils.js.map +1 -1
  32. package/cjs/component/tooltip/interface/theme.d.ts +3 -0
  33. package/cjs/component/tooltip/interface/theme.js.map +1 -1
  34. package/cjs/component/tooltip/tooltip-transformer.js +3 -1
  35. package/cjs/component/tooltip/tooltip-transformer.js.map +1 -1
  36. package/cjs/core/expression-function.js +1 -2
  37. package/cjs/core/index.d.ts +1 -1
  38. package/cjs/core/index.js +3 -2
  39. package/cjs/core/index.js.map +1 -1
  40. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +2 -3
  41. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
  42. package/cjs/series/bar/bar.d.ts +3 -0
  43. package/cjs/series/bar/bar.js +28 -7
  44. package/cjs/series/bar/bar.js.map +1 -1
  45. package/cjs/series/bar/interface.d.ts +1 -0
  46. package/cjs/series/bar/interface.js.map +1 -1
  47. package/esm/chart/histogram/base/histogram-base-transformer.js +1 -1
  48. package/esm/chart/histogram/base/histogram-base-transformer.js.map +1 -1
  49. package/esm/component/brush/brush.d.ts +1 -1
  50. package/esm/component/brush/brush.js +18 -15
  51. package/esm/component/brush/brush.js.map +1 -1
  52. package/esm/component/crosshair/base.js +4 -3
  53. package/esm/component/crosshair/base.js.map +1 -1
  54. package/esm/component/crosshair/cartesian.js +3 -2
  55. package/esm/component/crosshair/cartesian.js.map +1 -1
  56. package/esm/component/crosshair/interface/common.d.ts +3 -1
  57. package/esm/component/crosshair/interface/common.js.map +1 -1
  58. package/esm/component/crosshair/interface/spec.d.ts +1 -0
  59. package/esm/component/crosshair/interface/spec.js.map +1 -1
  60. package/esm/component/crosshair/interface/theme.d.ts +2 -0
  61. package/esm/component/crosshair/interface/theme.js.map +1 -1
  62. package/esm/component/crosshair/utils/cartesian.js +15 -13
  63. package/esm/component/crosshair/utils/cartesian.js.map +1 -1
  64. package/esm/component/crosshair/utils/common.js +8 -4
  65. package/esm/component/crosshair/utils/common.js.map +1 -1
  66. package/esm/component/data-zoom/data-filter-base-component.js +6 -4
  67. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  68. package/esm/component/data-zoom/util.d.ts +1 -0
  69. package/esm/component/data-zoom/util.js +13 -9
  70. package/esm/component/data-zoom/util.js.map +1 -1
  71. package/esm/component/marker/utils.js +15 -8
  72. package/esm/component/marker/utils.js.map +1 -1
  73. package/esm/component/tooltip/interface/theme.d.ts +3 -0
  74. package/esm/component/tooltip/interface/theme.js.map +1 -1
  75. package/esm/component/tooltip/tooltip-transformer.js +3 -1
  76. package/esm/component/tooltip/tooltip-transformer.js.map +1 -1
  77. package/esm/core/expression-function.js +1 -2
  78. package/esm/core/index.d.ts +1 -1
  79. package/esm/core/index.js +3 -2
  80. package/esm/core/index.js.map +1 -1
  81. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +2 -3
  82. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
  83. package/esm/series/bar/bar.d.ts +3 -0
  84. package/esm/series/bar/bar.js +26 -7
  85. package/esm/series/bar/bar.js.map +1 -1
  86. package/esm/series/bar/interface.d.ts +1 -0
  87. package/esm/series/bar/interface.js.map +1 -1
  88. package/package.json +13 -13
package/build/index.js CHANGED
@@ -7846,11 +7846,14 @@
7846
7846
  const ContributionProvider = Symbol("ContributionProvider");
7847
7847
  class ContributionProviderCache {
7848
7848
  constructor(serviceIdentifier, container) {
7849
- this.serviceIdentifier = serviceIdentifier, this.container = container;
7849
+ this.serviceIdentifier = serviceIdentifier, this.container = container, ContributionStore.setStore(this.serviceIdentifier, this);
7850
7850
  }
7851
7851
  getContributions() {
7852
7852
  return this.caches || (this.caches = [], this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier))), this.caches;
7853
7853
  }
7854
+ refresh() {
7855
+ this.caches && (this.caches.length = 0, this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier)));
7856
+ }
7854
7857
  }
7855
7858
  function bindContributionProvider(bind, id) {
7856
7859
  bind(ContributionProvider).toDynamicValue(_ref => {
@@ -7868,6 +7871,20 @@
7868
7871
  return new ContributionProviderCache(id, container);
7869
7872
  }).whenTargetNamed(id);
7870
7873
  }
7874
+ class ContributionStore {
7875
+ static getStore(id) {
7876
+ return this.store.get(id);
7877
+ }
7878
+ static setStore(id, cache) {
7879
+ this.store.set(id, cache);
7880
+ }
7881
+ static refreshAllContributions() {
7882
+ this.store.forEach(cache => {
7883
+ cache.refresh();
7884
+ });
7885
+ }
7886
+ }
7887
+ ContributionStore.store = new Map();
7871
7888
 
7872
7889
  class Hook {
7873
7890
  constructor(args, name) {
@@ -7934,6 +7951,48 @@
7934
7951
  const VGlobal = Symbol.for("VGlobal");
7935
7952
  const DEFAULT_TEXT_FONT_FAMILY$1 = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
7936
7953
 
7954
+ class EventListenerManager {
7955
+ constructor() {
7956
+ this._listenerMap = new Map(), this._eventListenerTransformer = event => event;
7957
+ }
7958
+ setEventListenerTransformer(transformer) {
7959
+ this._eventListenerTransformer = transformer || (event => event);
7960
+ }
7961
+ addEventListener(type, listener, options) {
7962
+ if (!listener) return;
7963
+ const wrappedListener = event => {
7964
+ const transformedEvent = this._eventListenerTransformer(event);
7965
+ "function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
7966
+ };
7967
+ this._listenerMap.has(type) || this._listenerMap.set(type, new Map()), this._listenerMap.get(type).set(listener, wrappedListener), this._nativeAddEventListener(type, wrappedListener, options);
7968
+ }
7969
+ removeEventListener(type, listener, options) {
7970
+ var _a;
7971
+ if (!listener) return;
7972
+ const wrappedListener = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener);
7973
+ wrappedListener && (this._nativeRemoveEventListener(type, wrappedListener, options), this._listenerMap.get(type).delete(listener), 0 === this._listenerMap.get(type).size && this._listenerMap.delete(type));
7974
+ }
7975
+ dispatchEvent(event) {
7976
+ return this._nativeDispatchEvent(event);
7977
+ }
7978
+ clearAllEventListeners() {
7979
+ this._listenerMap.forEach((listenersMap, type) => {
7980
+ listenersMap.forEach((wrappedListener, originalListener) => {
7981
+ this._nativeRemoveEventListener(type, wrappedListener, void 0);
7982
+ });
7983
+ }), this._listenerMap.clear();
7984
+ }
7985
+ _nativeAddEventListener(type, listener, options) {
7986
+ throw new Error("_nativeAddEventListener must be implemented by derived classes");
7987
+ }
7988
+ _nativeRemoveEventListener(type, listener, options) {
7989
+ throw new Error("_nativeRemoveEventListener must be implemented by derived classes");
7990
+ }
7991
+ _nativeDispatchEvent(event) {
7992
+ throw new Error("_nativeDispatchEvent must be implemented by derived classes");
7993
+ }
7994
+ }
7995
+
7937
7996
  var __decorate$1B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7938
7997
  var d,
7939
7998
  c = arguments.length,
@@ -7974,7 +8033,7 @@
7974
8033
  step((generator = generator.apply(thisArg, _arguments || [])).next());
7975
8034
  });
7976
8035
  };
7977
- let DefaultGlobal = class {
8036
+ let DefaultGlobal = class extends EventListenerManager {
7978
8037
  get env() {
7979
8038
  return this._env;
7980
8039
  }
@@ -8018,10 +8077,19 @@
8018
8077
  this._env || this.setEnv("browser"), this.envContribution.applyStyles = support;
8019
8078
  }
8020
8079
  constructor(contributions) {
8021
- this.contributions = contributions, this._isImageAnonymous = !0, this.id = Generator.GenAutoIncrementId(), this.hooks = {
8080
+ super(), this.contributions = contributions, this._isImageAnonymous = !0, this.eventListenerTransformer = event => event, this.id = Generator.GenAutoIncrementId(), this.hooks = {
8022
8081
  onSetEnv: new SyncHook(["lastEnv", "env", "global"])
8023
8082
  }, this.measureTextMethod = "native", this.optimizeVisible = !1;
8024
8083
  }
8084
+ _nativeAddEventListener(type, listener, options) {
8085
+ return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
8086
+ }
8087
+ _nativeRemoveEventListener(type, listener, options) {
8088
+ return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
8089
+ }
8090
+ _nativeDispatchEvent(event) {
8091
+ return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
8092
+ }
8025
8093
  bindContribution(params) {
8026
8094
  const promiseArr = [];
8027
8095
  if (this.contributions.getContributions().forEach(contribution => {
@@ -8062,15 +8130,6 @@
8062
8130
  releaseCanvas(canvas) {
8063
8131
  return this._env || this.setEnv("browser"), this.envContribution.releaseCanvas(canvas);
8064
8132
  }
8065
- addEventListener(type, listener, options) {
8066
- return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
8067
- }
8068
- removeEventListener(type, listener, options) {
8069
- return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
8070
- }
8071
- dispatchEvent(event) {
8072
- return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
8073
- }
8074
8133
  getRequestAnimationFrame() {
8075
8134
  return this._env || this.setEnv("browser"), this.envContribution.getRequestAnimationFrame();
8076
8135
  }
@@ -11099,7 +11158,7 @@
11099
11158
  };
11100
11159
  const VWindow = Symbol.for("VWindow");
11101
11160
  const WindowHandlerContribution = Symbol.for("WindowHandlerContribution");
11102
- let DefaultWindow = class {
11161
+ let DefaultWindow = class extends EventListenerManager {
11103
11162
  get width() {
11104
11163
  if (this._handler) {
11105
11164
  const wh = this._handler.getWH();
@@ -11118,7 +11177,7 @@
11118
11177
  return this._handler.getDpr();
11119
11178
  }
11120
11179
  constructor() {
11121
- this.hooks = {
11180
+ super(), this.hooks = {
11122
11181
  onChange: new SyncHook(["x", "y", "width", "height"])
11123
11182
  }, this.active = () => {
11124
11183
  const global = this.global;
@@ -11126,6 +11185,15 @@
11126
11185
  container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
11127
11186
  }, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
11128
11187
  }
11188
+ _nativeAddEventListener(type, listener, options) {
11189
+ return this._handler.addEventListener(type, listener, options);
11190
+ }
11191
+ _nativeRemoveEventListener(type, listener, options) {
11192
+ return this._handler.removeEventListener(type, listener, options);
11193
+ }
11194
+ _nativeDispatchEvent(event) {
11195
+ return this._handler.dispatchEvent(event);
11196
+ }
11129
11197
  postInit() {
11130
11198
  this.global.hooks.onSetEnv.tap("window", this.active), this.active();
11131
11199
  }
@@ -11165,7 +11233,7 @@
11165
11233
  throw new Error("暂不支持");
11166
11234
  }
11167
11235
  release() {
11168
- return this.global.hooks.onSetEnv.unTap("window", this.active), this._handler.releaseWindow();
11236
+ return this.global.hooks.onSetEnv.unTap("window", this.active), this.clearAllEventListeners(), this._handler.releaseWindow();
11169
11237
  }
11170
11238
  getContext() {
11171
11239
  return this._handler.getContext();
@@ -11176,15 +11244,6 @@
11176
11244
  getImageBuffer(type) {
11177
11245
  return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
11178
11246
  }
11179
- addEventListener(type, listener, options) {
11180
- return this._handler.addEventListener(type, listener, options);
11181
- }
11182
- removeEventListener(type, listener, options) {
11183
- return this._handler.removeEventListener(type, listener, options);
11184
- }
11185
- dispatchEvent(event) {
11186
- return this._handler.dispatchEvent(event);
11187
- }
11188
11247
  getBoundingClientRect() {
11189
11248
  return this._handler.getBoundingClientRect();
11190
11249
  }
@@ -12393,19 +12452,17 @@
12393
12452
  globalObj: globalObj,
12394
12453
  domElement: domElement
12395
12454
  } = this;
12396
- this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.getDocument().addEventListener("pointermove", this.onPointerMove, !0), globalObj.getDocument().addEventListener("pointerup", this.onPointerUp, !0)) : (domElement.addEventListener("pointermove", this.onPointerMove, !0), domElement.addEventListener("pointerup", this.onPointerUp, !0)), domElement.addEventListener("pointerdown", this.onPointerDown, !0), domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), domElement.addEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.getDocument().addEventListener("mousemove", this.onPointerMove, !0), globalObj.getDocument().addEventListener("mouseup", this.onPointerUp, !0)) : (domElement.addEventListener("mousemove", this.onPointerMove, !0), domElement.addEventListener("mouseup", this.onPointerUp, !0)), domElement.addEventListener("mousedown", this.onPointerDown, !0), domElement.addEventListener("mouseout", this.onPointerOverOut, !0), domElement.addEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.addEventListener("touchstart", this.onPointerDown, !0), domElement.addEventListener("touchend", this.onPointerUp, !0), domElement.addEventListener("touchmove", this.onPointerMove, !0)), domElement.addEventListener("wheel", this.onWheel, {
12455
+ this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.addEventListener("pointermove", this.onPointerMove, !0), globalObj.addEventListener("pointerup", this.onPointerUp, !0)) : (domElement.addEventListener("pointermove", this.onPointerMove, !0), domElement.addEventListener("pointerup", this.onPointerUp, !0)), domElement.addEventListener("pointerdown", this.onPointerDown, !0), domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), domElement.addEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.addEventListener("mousemove", this.onPointerMove, !0), globalObj.addEventListener("mouseup", this.onPointerUp, !0)) : (domElement.addEventListener("mousemove", this.onPointerMove, !0), domElement.addEventListener("mouseup", this.onPointerUp, !0)), domElement.addEventListener("mousedown", this.onPointerDown, !0), domElement.addEventListener("mouseout", this.onPointerOverOut, !0), domElement.addEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.addEventListener("touchstart", this.onPointerDown, !0), domElement.addEventListener("touchend", this.onPointerUp, !0), domElement.addEventListener("touchmove", this.onPointerMove, !0)), domElement.addEventListener("wheel", this.onWheel, {
12397
12456
  capture: !0
12398
12457
  }), this.eventsAdded = !0;
12399
12458
  }
12400
12459
  removeEvents() {
12401
- var _a;
12402
12460
  if (!this.eventsAdded || !this.domElement) return;
12403
12461
  const {
12404
- globalObj: globalObj,
12405
- domElement: domElement
12406
- } = this,
12407
- globalDocument = null !== (_a = globalObj.getDocument()) && void 0 !== _a ? _a : domElement;
12408
- this.supportsPointerEvents ? (globalDocument.removeEventListener("pointermove", this.onPointerMove, !0), globalDocument.removeEventListener("pointerup", this.onPointerUp, !0), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalDocument.removeEventListener("mousemove", this.onPointerMove, !0), globalDocument.removeEventListener("mouseup", this.onPointerUp, !0), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
12462
+ globalObj: globalObj,
12463
+ domElement: domElement
12464
+ } = this;
12465
+ this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.removeEventListener("pointermove", this.onPointerMove, !0), globalObj.removeEventListener("pointerup", this.onPointerUp, !0)) : (domElement.removeEventListener("pointermove", this.onPointerMove, !0), domElement.removeEventListener("pointerup", this.onPointerUp, !0)), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.removeEventListener("mousemove", this.onPointerMove, !0), globalObj.removeEventListener("mouseup", this.onPointerUp, !0)) : (domElement.removeEventListener("mousemove", this.onPointerMove, !0), domElement.removeEventListener("mouseup", this.onPointerUp, !0)), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
12409
12466
  }
12410
12467
  mapToViewportPoint(event) {
12411
12468
  return this.domElement.pointTransform ? this.domElement.pointTransform(event.x, event.y) : event;
@@ -13659,23 +13716,27 @@
13659
13716
  isValidNumber$1(lastClipRange * this.clipRange) && (this.clipRange *= lastClipRange);
13660
13717
  }
13661
13718
  onUpdate(end, ratio, out) {
13662
- if (this.points = this.points.map((point, index) => {
13663
- const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
13664
- return newPoint.context = point.context, newPoint;
13665
- }), this.clipRange) {
13666
- if (this.shrinkClipRange) return void (end ? (out.points = this.toPoints, out.clipRange = 1) : (out.points = this.fromPoints, out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio));
13667
- out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;
13668
- }
13669
- if (this.segmentsCache && this.to.segments) {
13670
- let start = 0;
13671
- out.segments = this.to.segments.map((segment, index) => {
13672
- const end = start + this.segmentsCache[index],
13673
- points = this.points.slice(start, end);
13674
- return start = end, Object.assign(Object.assign({}, segment), {
13675
- points: points
13719
+ if (end) Object.keys(this.to).forEach(k => {
13720
+ out[k] = this.to[k];
13721
+ });else {
13722
+ if (this.points = this.points.map((point, index) => {
13723
+ const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
13724
+ return newPoint.context = point.context, newPoint;
13725
+ }), this.clipRange) {
13726
+ if (this.shrinkClipRange) return void (end ? (out.points = this.toPoints, out.clipRange = 1) : (out.points = this.fromPoints, out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio));
13727
+ out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;
13728
+ }
13729
+ if (this.segmentsCache && this.to.segments) {
13730
+ let start = 0;
13731
+ out.segments = this.to.segments.map((segment, index) => {
13732
+ const end = start + this.segmentsCache[index],
13733
+ points = this.points.slice(start, end);
13734
+ return start = end, Object.assign(Object.assign({}, segment), {
13735
+ points: points
13736
+ });
13676
13737
  });
13677
- });
13678
- } else out.points = this.points;
13738
+ } else out.points = this.points;
13739
+ }
13679
13740
  }
13680
13741
  }
13681
13742
  class ClipGraphicAnimate extends ACustomAnimate {
@@ -21080,6 +21141,9 @@
21080
21141
  init(contributions) {
21081
21142
  contributions && (this._renderContribitions = contributions.getContributions()), this._renderContribitions || (this._renderContribitions = []), this.builtinContributions || (this.builtinContributions = []), this.builtinContributions.push(defaultBaseClipRenderBeforeContribution), this.builtinContributions.push(defaultBaseClipRenderAfterContribution), this.builtinContributions.forEach(item => this._renderContribitions.push(item)), this._renderContribitions.length && (this._renderContribitions.sort((a, b) => b.order - a.order), this._beforeRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.beforeFillStroke), this._afterRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.afterFillStroke));
21082
21143
  }
21144
+ reInit() {
21145
+ this.init(this.graphicRenderContributions);
21146
+ }
21083
21147
  beforeRenderStep(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, params) {
21084
21148
  this._beforeRenderContribitions && this._beforeRenderContribitions.forEach(c => {
21085
21149
  if (c.supportedAppName && graphic.stage && graphic.stage.params && graphic.stage.params.context && graphic.stage.params.context.appName) {
@@ -21249,8 +21313,8 @@
21249
21313
  };
21250
21314
  };
21251
21315
  let DefaultCanvasArcRender = class extends BaseRender {
21252
- constructor(arcRenderContribitions) {
21253
- super(), this.arcRenderContribitions = arcRenderContribitions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(arcRenderContribitions);
21316
+ constructor(graphicRenderContributions) {
21317
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(graphicRenderContributions);
21254
21318
  }
21255
21319
  drawArcTailCapPath(arc, context, cx, cy, outerRadius, innerRadius, _sa, _ea) {
21256
21320
  const capAngle = _ea - _sa,
@@ -21425,8 +21489,8 @@
21425
21489
  };
21426
21490
  };
21427
21491
  let DefaultCanvasCircleRender = class extends BaseRender {
21428
- constructor(circleRenderContribitions) {
21429
- super(), this.circleRenderContribitions = circleRenderContribitions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(circleRenderContribitions);
21492
+ constructor(graphicRenderContributions) {
21493
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(graphicRenderContributions);
21430
21494
  }
21431
21495
  drawShape(circle, context, x, y, drawContext, params, fillCb, strokeCb) {
21432
21496
  const circleAttribute = getTheme$1(circle, null == params ? void 0 : params.theme).circle,
@@ -21812,8 +21876,8 @@
21812
21876
  };
21813
21877
  };
21814
21878
  let DefaultCanvasAreaRender = class extends BaseRender {
21815
- constructor(areaRenderContribitions) {
21816
- super(), this.areaRenderContribitions = areaRenderContribitions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(areaRenderContribitions);
21879
+ constructor(graphicRenderContributions) {
21880
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(graphicRenderContributions);
21817
21881
  }
21818
21882
  drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
21819
21883
  var _a, _b, _c;
@@ -22056,8 +22120,8 @@
22056
22120
  };
22057
22121
  };
22058
22122
  let DefaultCanvasPathRender = class extends BaseRender {
22059
- constructor(pathRenderContribitions) {
22060
- super(), this.pathRenderContribitions = pathRenderContribitions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(pathRenderContribitions);
22123
+ constructor(graphicRenderContributions) {
22124
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(graphicRenderContributions);
22061
22125
  }
22062
22126
  drawShape(path, context, x, y, drawContext, params, fillCb, strokeCb) {
22063
22127
  var _a, _b, _c;
@@ -22112,8 +22176,8 @@
22112
22176
  };
22113
22177
  };
22114
22178
  let DefaultCanvasRectRender = class extends BaseRender {
22115
- constructor(rectRenderContribitions) {
22116
- super(), this.rectRenderContribitions = rectRenderContribitions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(rectRenderContribitions);
22179
+ constructor(graphicRenderContributions) {
22180
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(graphicRenderContributions);
22117
22181
  }
22118
22182
  drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
22119
22183
  var _a;
@@ -22184,8 +22248,8 @@
22184
22248
  };
22185
22249
  };
22186
22250
  let DefaultCanvasSymbolRender = class extends BaseRender {
22187
- constructor(symbolRenderContribitions) {
22188
- super(), this.symbolRenderContribitions = symbolRenderContribitions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(symbolRenderContribitions);
22251
+ constructor(graphicRenderContributions) {
22252
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
22189
22253
  }
22190
22254
  drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb) {
22191
22255
  var _a;
@@ -22356,8 +22420,8 @@
22356
22420
  };
22357
22421
  };
22358
22422
  let DefaultCanvasTextRender = class extends BaseRender {
22359
- constructor(textRenderContribitions) {
22360
- super(), this.textRenderContribitions = textRenderContribitions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(textRenderContribitions);
22423
+ constructor(graphicRenderContributions) {
22424
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(graphicRenderContributions);
22361
22425
  }
22362
22426
  drawShape(text, context, x, y, drawContext, params, fillCb, strokeCb) {
22363
22427
  var _a, _b, _c;
@@ -22561,8 +22625,8 @@
22561
22625
  };
22562
22626
  };
22563
22627
  let DefaultCanvasPolygonRender = class extends BaseRender {
22564
- constructor(polygonRenderContribitions) {
22565
- super(), this.polygonRenderContribitions = polygonRenderContribitions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(polygonRenderContribitions);
22628
+ constructor(graphicRenderContributions) {
22629
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
22566
22630
  }
22567
22631
  drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
22568
22632
  const polygonAttribute = getTheme$1(polygon, null == params ? void 0 : params.theme).polygon,
@@ -22617,6 +22681,9 @@
22617
22681
  constructor(groupRenderContribitions) {
22618
22682
  this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
22619
22683
  }
22684
+ reInit() {
22685
+ this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution);
22686
+ }
22620
22687
  drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
22621
22688
  const groupAttribute = getTheme$1(group, null == params ? void 0 : params.theme).group,
22622
22689
  {
@@ -22747,8 +22814,8 @@
22747
22814
  };
22748
22815
  const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
22749
22816
  let DefaultCanvasImageRender = class extends BaseRender {
22750
- constructor(imageRenderContribitions) {
22751
- super(), this.imageRenderContribitions = imageRenderContribitions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(imageRenderContribitions);
22817
+ constructor(graphicRenderContributions) {
22818
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(graphicRenderContributions);
22752
22819
  }
22753
22820
  drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
22754
22821
  const imageAttribute = getTheme$1(image).image,
@@ -23075,6 +23142,9 @@
23075
23142
  afterDraw(params) {
23076
23143
  this.drawContribution.afterDraw && this.drawContribution.afterDraw(this, Object.assign({}, this.drawParams));
23077
23144
  }
23145
+ reInit() {
23146
+ this.drawContribution.reInit();
23147
+ }
23078
23148
  render(groups, params) {
23079
23149
  this.renderTreeRoots = groups, this.drawParams = params;
23080
23150
  const updateBounds = params.updateBounds;
@@ -23476,6 +23546,11 @@
23476
23546
  constructor(contributions, drawItemInterceptorContributions) {
23477
23547
  this.contributions = contributions, this.drawItemInterceptorContributions = drawItemInterceptorContributions, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds(), this.backupDirtyBounds = new Bounds(), this.global = application.global, this.layerService = application.layerService, isArray$1(this.contributions) || (this.contributions = [this.contributions]), this.init();
23478
23548
  }
23549
+ reInit() {
23550
+ this.init(), this.contributions.forEach(item => {
23551
+ item.reInit();
23552
+ });
23553
+ }
23479
23554
  init() {
23480
23555
  this.contributions.forEach(item => {
23481
23556
  if (item.style) {
@@ -24595,6 +24670,9 @@
24595
24670
  getPickerService() {
24596
24671
  return this.pickerService || (this.pickerService = container.get(PickerService)), this.pickerService;
24597
24672
  }
24673
+ reInit() {
24674
+ this.renderService.reInit(), this.pickerService.reInit();
24675
+ }
24598
24676
  }
24599
24677
 
24600
24678
  function createStage(params) {
@@ -25192,6 +25270,9 @@
25192
25270
  constructor(pickItemInterceptorContributions, pickServiceInterceptorContributions) {
25193
25271
  this.pickItemInterceptorContributions = pickItemInterceptorContributions, this.pickServiceInterceptorContributions = pickServiceInterceptorContributions, this.type = "default", this.global = application.global;
25194
25272
  }
25273
+ reInit() {
25274
+ this._init();
25275
+ }
25195
25276
  _init() {
25196
25277
  this.InterceptorContributions = this.pickItemInterceptorContributions.getContributions().sort((a, b) => a.order - b.order), this.pickerServiceInterceptorContributions = this.pickServiceInterceptorContributions.getContributions().sort((a, b) => a.order - b.order);
25197
25278
  }
@@ -25360,6 +25441,7 @@
25360
25441
  constructor() {
25361
25442
  this.numberType = GLYPH_NUMBER_TYPE;
25362
25443
  }
25444
+ reInit() {}
25363
25445
  drawShape(glyph, context, x, y, drawContext, params, fillCb, strokeCb) {
25364
25446
  drawContext.drawContribution && glyph.getSubGraphic().forEach(item => {
25365
25447
  const renderer = drawContext.drawContribution.getRenderContribution(item);
@@ -26584,6 +26666,18 @@
26584
26666
  const changeEvent = new CustomEvent(eventName, details);
26585
26667
  changeEvent.manager = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventSystem.manager, this.dispatchEvent(changeEvent);
26586
26668
  }
26669
+ eventPosToStagePos(e) {
26670
+ var _a, _b;
26671
+ const result = {
26672
+ x: 0,
26673
+ y: 0
26674
+ },
26675
+ stagePoints = null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventPointTransform(e)) && void 0 !== _b ? _b : {
26676
+ x: 0,
26677
+ y: 0
26678
+ };
26679
+ return this.globalTransMatrix.transformPoint(stagePoints, result), result;
26680
+ }
26587
26681
  }
26588
26682
 
26589
26683
  const MathPickerContribution = Symbol.for("MathPickerContribution");
@@ -35348,7 +35442,7 @@
35348
35442
  const MIN_TICK_GAP = 12;
35349
35443
  const calculateFlushPos = (basePosition, size, rangePosition, otherEnd) => rangePosition < basePosition ? Math.max(basePosition - size / 2, rangePosition) : rangePosition > basePosition ? Math.min(basePosition - size / 2, rangePosition - size) : rangePosition < otherEnd ? rangePosition : rangePosition - size;
35350
35444
  const getCartesianLabelBounds = (scale, domain, op) => {
35351
- var _a;
35445
+ var _a, _b, _c;
35352
35446
  const {
35353
35447
  labelStyle: labelStyle,
35354
35448
  axisOrientType: axisOrientType,
@@ -35364,27 +35458,32 @@
35364
35458
  scaleY = 0;
35365
35459
  isHorizontal || (isVertical ? (scaleX = 0, scaleY = 1) : startAngle && (scaleX = Math.cos(startAngle), scaleY = -Math.sin(startAngle)));
35366
35460
  const textMeasure = initTextMeasure$1(labelStyle),
35367
- range = scale.range(),
35368
- labelBoundsList = domain.map((v, i) => {
35369
- var _a, _b;
35370
- const str = labelFormatter ? labelFormatter(v) : `${v}`,
35371
- {
35372
- width: width,
35373
- height: height
35374
- } = textMeasure.quickMeasure(str),
35375
- textWidth = Math.max(width, 12),
35376
- textHeight = Math.max(height, 12),
35377
- pos = scale.scale(v),
35378
- baseTextX = scaleX * pos,
35379
- baseTextY = scaleY * pos;
35380
- let align,
35381
- baseline,
35382
- textX = baseTextX,
35383
- textY = baseTextY;
35384
- labelFlush && isHorizontal && 0 === i ? textX = calculateFlushPos(baseTextX, textWidth, range[0], range[range.length - 1]) : labelFlush && isHorizontal && i === domain.length - 1 ? textX = calculateFlushPos(baseTextX, textWidth, range[range.length - 1], range[0]) : align = null !== (_a = labelStyle.textAlign) && void 0 !== _a ? _a : "center", "right" === align ? textX -= textWidth : "center" === align && (textX -= textWidth / 2), labelFlush && isVertical && 0 === i ? textY = calculateFlushPos(baseTextY, textHeight, range[0], range[range.length - 1]) : labelFlush && isVertical && i === domain.length - 1 ? textY = calculateFlushPos(baseTextY, textHeight, range[range.length - 1], range[0]) : baseline = null !== (_b = labelStyle.textBaseline) && void 0 !== _b ? _b : "middle", "bottom" === baseline ? textY -= textHeight : "middle" === baseline && (textY -= textHeight / 2);
35385
- const bounds = new AABBBounds().set(textX, textY, textX + textWidth, textY + textHeight);
35386
- return labelAngle && bounds.rotate(labelAngle, baseTextX, baseTextY), bounds;
35387
- });
35461
+ range = scale.range();
35462
+ let labelBoundsList = [];
35463
+ for (let i = 0; i < domain.length; i++) {
35464
+ const v = domain[i],
35465
+ str = labelFormatter ? labelFormatter(v) : `${v}`;
35466
+ if (isPlainObject$1(str)) {
35467
+ labelBoundsList = void 0;
35468
+ break;
35469
+ }
35470
+ const {
35471
+ width: width,
35472
+ height: height
35473
+ } = textMeasure.quickMeasure(str),
35474
+ textWidth = Math.max(width, 12),
35475
+ textHeight = Math.max(height, 12),
35476
+ pos = scale.scale(v),
35477
+ baseTextX = scaleX * pos,
35478
+ baseTextY = scaleY * pos;
35479
+ let align,
35480
+ baseline,
35481
+ textX = baseTextX,
35482
+ textY = baseTextY;
35483
+ labelFlush && isHorizontal && 0 === i ? textX = calculateFlushPos(baseTextX, textWidth, range[0], range[range.length - 1]) : labelFlush && isHorizontal && i === domain.length - 1 ? textX = calculateFlushPos(baseTextX, textWidth, range[range.length - 1], range[0]) : align = null !== (_b = labelStyle.textAlign) && void 0 !== _b ? _b : "center", "right" === align ? textX -= textWidth : "center" === align && (textX -= textWidth / 2), labelFlush && isVertical && 0 === i ? textY = calculateFlushPos(baseTextY, textHeight, range[0], range[range.length - 1]) : labelFlush && isVertical && i === domain.length - 1 ? textY = calculateFlushPos(baseTextY, textHeight, range[range.length - 1], range[0]) : baseline = null !== (_c = labelStyle.textBaseline) && void 0 !== _c ? _c : "middle", "bottom" === baseline ? textY -= textHeight : "middle" === baseline && (textY -= textHeight / 2);
35484
+ const bounds = new AABBBounds().set(textX, textY, textX + textWidth, textY + textHeight);
35485
+ labelAngle && bounds.rotate(labelAngle, baseTextX, baseTextY), labelBoundsList.push(bounds);
35486
+ }
35388
35487
  return labelBoundsList;
35389
35488
  };
35390
35489
  const isAxisHorizontal = axisOrientType => ["bottom", "top", "z"].includes(axisOrientType);
@@ -36433,7 +36532,7 @@
36433
36532
  }
36434
36533
  }
36435
36534
  const continuousTicks = (scale, op) => {
36436
- var _a, _b;
36535
+ var _a, _b, _c, _d;
36437
36536
  if (!isContinuous(scale.type)) return convertDomainToTickData(scale.domain());
36438
36537
  const range = scale.range(),
36439
36538
  rangeSize = Math.abs(range[range.length - 1] - range[0]);
@@ -36485,23 +36584,25 @@
36485
36584
  step = Math.floor(scaleTicks.length * MIN_FONT_SIZE / rangeSize);
36486
36585
  scaleTicks.forEach((tick, index) => {
36487
36586
  index % step != 0 && index !== scaleTicks.length - 1 || samplingScaleTicks.push(tick);
36488
- }), items = getCartesianLabelBounds(scale, samplingScaleTicks, op).map((bounds, i) => ({
36587
+ }), items = null === (_c = getCartesianLabelBounds(scale, samplingScaleTicks, op)) || void 0 === _c ? void 0 : _c.map((bounds, i) => ({
36489
36588
  AABBBounds: bounds,
36490
36589
  value: samplingScaleTicks[i]
36491
36590
  }));
36492
- } else items = getCartesianLabelBounds(scale, scaleTicks, op).map((bounds, i) => ({
36591
+ } else items = null === (_d = getCartesianLabelBounds(scale, scaleTicks, op)) || void 0 === _d ? void 0 : _d.map((bounds, i) => ({
36493
36592
  AABBBounds: bounds,
36494
36593
  value: scaleTicks[i]
36495
36594
  }));
36496
- const firstSourceItem = items[0],
36497
- lastSourceItem = last(items),
36498
- samplingMethod = breakData && breakData() ? methods$1.greedy : methods$1.parity;
36499
- for (; items.length >= 3 && hasOverlap$1(items, labelGap);) items = samplingMethod(items, labelGap);
36500
- const checkFirst = op.labelFirstVisible;
36501
- let checkLast = op.labelLastVisible;
36502
- textIntersect(firstSourceItem, lastSourceItem, labelGap) && items.includes(lastSourceItem) && items.length > 1 && checkFirst && checkLast && (items.splice(items.indexOf(lastSourceItem), 1), checkLast = !1), forceItemVisible(firstSourceItem, items, checkFirst, item => textIntersect(item, firstSourceItem, labelGap)), forceItemVisible(lastSourceItem, items, checkLast, item => textIntersect(item, lastSourceItem, labelGap) || !(!checkFirst || item === firstSourceItem) && textIntersect(item, firstSourceItem, labelGap), !0);
36503
- const ticks = items.map(item => item.value);
36504
- ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last(ticks) !== last(scaleTicks) && ticks.push(last(scaleTicks))), scaleTicks = ticks;
36595
+ if (items) {
36596
+ const firstSourceItem = items[0],
36597
+ lastSourceItem = last(items),
36598
+ samplingMethod = breakData && breakData() ? methods$1.greedy : methods$1.parity;
36599
+ for (; items.length >= 3 && hasOverlap$1(items, labelGap);) items = samplingMethod(items, labelGap);
36600
+ const checkFirst = op.labelFirstVisible;
36601
+ let checkLast = op.labelLastVisible;
36602
+ textIntersect(firstSourceItem, lastSourceItem, labelGap) && items.includes(lastSourceItem) && items.length > 1 && checkFirst && checkLast && (items.splice(items.indexOf(lastSourceItem), 1), checkLast = !1), forceItemVisible(firstSourceItem, items, checkFirst, item => textIntersect(item, firstSourceItem, labelGap)), forceItemVisible(lastSourceItem, items, checkLast, item => textIntersect(item, lastSourceItem, labelGap) || !(!checkFirst || item === firstSourceItem) && textIntersect(item, firstSourceItem, labelGap), !0);
36603
+ const ticks = items.map(item => item.value);
36604
+ ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last(ticks) !== last(scaleTicks) && ticks.push(last(scaleTicks))), scaleTicks = ticks;
36605
+ }
36505
36606
  }
36506
36607
  return convertDomainToTickData(scaleTicks);
36507
36608
  };
@@ -36515,7 +36616,10 @@
36515
36616
  }
36516
36617
  };
36517
36618
 
36518
- const getOneDimensionalLabelBounds = (scale, domain, op, isHorizontal) => getCartesianLabelBounds(scale, domain, op).map(bounds => isHorizontal ? [bounds.x1, bounds.x2, bounds.width()] : [bounds.y1, bounds.y2, bounds.height()]),
36619
+ const getOneDimensionalLabelBounds = (scale, domain, op, isHorizontal) => {
36620
+ const labelBoundsList = getCartesianLabelBounds(scale, domain, op);
36621
+ return labelBoundsList && labelBoundsList.map(bounds => isHorizontal ? [bounds.x1, bounds.x2, bounds.width()] : [bounds.y1, bounds.y2, bounds.height()]);
36622
+ },
36519
36623
  boundsOverlap = function (prevBounds, nextBounds) {
36520
36624
  let gap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
36521
36625
  return Math.max(prevBounds[0], nextBounds[0]) - gap / 2 <= Math.min(prevBounds[1], nextBounds[1]) + gap / 2;
@@ -36549,23 +36653,27 @@
36549
36653
  rangeStart = minInArray(range),
36550
36654
  rangeEnd = maxInArray(range);
36551
36655
  if (domain.length <= rangeSize / fontSize) {
36552
- const incrementUnit = (rangeEnd - rangeStart) / domain.length,
36553
- labelBoundsList = getOneDimensionalLabelBounds(scale, domain, op, isHorizontal),
36554
- minBoundsLength = Math.min(...labelBoundsList.map(bounds => bounds[2])),
36555
- stepResult = getStep$1(domain, labelBoundsList, labelGap, op.labelLastVisible, Math.floor(minBoundsLength / incrementUnit), !1);
36556
- scaleTicks = scale.stepTicks(stepResult.step), op.labelLastVisible && (stepResult.delCount && (scaleTicks = scaleTicks.slice(0, scaleTicks.length - stepResult.delCount)), scaleTicks.push(domain[domain.length - 1]));
36656
+ const labelBoundsList = getOneDimensionalLabelBounds(scale, domain, op, isHorizontal);
36657
+ if (labelBoundsList) {
36658
+ const minBoundsLength = Math.min(...labelBoundsList.map(bounds => bounds[2])),
36659
+ incrementUnit = (rangeEnd - rangeStart) / domain.length,
36660
+ stepResult = getStep$1(domain, labelBoundsList, labelGap, op.labelLastVisible, Math.floor(minBoundsLength / incrementUnit), !1);
36661
+ scaleTicks = scale.stepTicks(stepResult.step), op.labelLastVisible && (stepResult.delCount && (scaleTicks = scaleTicks.slice(0, scaleTicks.length - stepResult.delCount)), scaleTicks.push(domain[domain.length - 1]));
36662
+ }
36557
36663
  } else {
36558
36664
  const tempDomain = [domain[0], domain[Math.floor(domain.length / 2)], domain[domain.length - 1]],
36559
36665
  tempList = getOneDimensionalLabelBounds(scale, tempDomain, op, isHorizontal);
36560
- let maxBounds = null;
36561
- tempList.forEach(current => {
36562
- maxBounds ? maxBounds[2] < current[2] && (maxBounds = current) : maxBounds = current;
36563
- });
36564
- const step = rangeEnd - rangeStart - labelGap > 0 ? Math.ceil(domain.length * (labelGap + maxBounds[2]) / (rangeEnd - rangeStart - labelGap)) : domain.length - 1;
36565
- scaleTicks = scale.stepTicks(step), !op.labelLastVisible || scaleTicks.length && scaleTicks[scaleTicks.length - 1] === domain[domain.length - 1] || (scaleTicks.length && Math.abs(scale.scale(scaleTicks[scaleTicks.length - 1]) - scale.scale(domain[domain.length - 1])) < maxBounds[2] && (scaleTicks = scaleTicks.slice(0, -1)), scaleTicks.push(domain[domain.length - 1]));
36666
+ if (tempList) {
36667
+ let maxBounds = null;
36668
+ tempList.forEach(current => {
36669
+ maxBounds ? maxBounds[2] < current[2] && (maxBounds = current) : maxBounds = current;
36670
+ });
36671
+ const step = rangeEnd - rangeStart - labelGap > 0 ? Math.ceil(domain.length * (labelGap + maxBounds[2]) / (rangeEnd - rangeStart - labelGap)) : domain.length - 1;
36672
+ scaleTicks = scale.stepTicks(step), !op.labelLastVisible || scaleTicks.length && scaleTicks[scaleTicks.length - 1] === domain[domain.length - 1] || (scaleTicks.length && Math.abs(scale.scale(scaleTicks[scaleTicks.length - 1]) - scale.scale(domain[domain.length - 1])) < maxBounds[2] && (scaleTicks = scaleTicks.slice(0, -1)), scaleTicks.push(domain[domain.length - 1]));
36673
+ }
36566
36674
  }
36567
- } else scaleTicks = scale.domain();
36568
- return convertDomainToTickData(scaleTicks);
36675
+ }
36676
+ return isNil$1(scaleTicks) && (scaleTicks = scale.domain()), convertDomainToTickData(scaleTicks);
36569
36677
  };
36570
36678
  const getStep$1 = (domain, labelBoundsList, labelGap, labelLastVisible, defaultStep, areAllBoundsSame) => {
36571
36679
  let resultDelCount = 0,
@@ -39531,13 +39639,6 @@
39531
39639
  end: end
39532
39640
  }));
39533
39641
  }
39534
- eventPosToStagePos(e) {
39535
- var _a, _b;
39536
- return null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventPointTransform(e)) && void 0 !== _b ? _b : {
39537
- x: 0,
39538
- y: 0
39539
- };
39540
- }
39541
39642
  _clearDragEvents() {
39542
39643
  const evtTarget = "browser" === vglobal.env ? vglobal : this.stage,
39543
39644
  triggers = getEndTriggersOfDrag();
@@ -39696,7 +39797,13 @@
39696
39797
  } = this.attribute.startTextStyle;
39697
39798
  if (new Bounds().set(x1, y1, x2, y2).intersects(endTextBounds)) {
39698
39799
  const direction = "bottom" === this.attribute.orient || "right" === this.attribute.orient ? -1 : 1;
39699
- this._isHorizontal ? this._startText.setAttribute("dy", startTextDy + direction * Math.abs(endTextBounds.y1 - endTextBounds.y2)) : this._startText.setAttribute("dx", startTextDx + direction * Math.abs(endTextBounds.x1 - endTextBounds.x2));
39800
+ if (this._isHorizontal) {
39801
+ const boundsYDiff = Math.abs(endTextBounds.y1 - endTextBounds.y2);
39802
+ this._startText.setAttribute("dy", startTextDy + direction * (Number.isFinite(boundsYDiff) ? boundsYDiff : 0));
39803
+ } else {
39804
+ const boundsXDiff = Math.abs(endTextBounds.x1 - endTextBounds.x2);
39805
+ this._startText.setAttribute("dx", startTextDx + direction * (Number.isFinite(boundsXDiff) ? boundsXDiff : 0));
39806
+ }
39700
39807
  } else this._isHorizontal ? this._startText.setAttribute("dy", startTextDy) : this._startText.setAttribute("dx", startTextDx);
39701
39808
  }
39702
39809
  getLayoutAttrFromConfig() {
@@ -44891,8 +44998,7 @@
44891
44998
  loadBrushComponent();
44892
44999
  let Brush$1 = class Brush extends AbstractComponent {
44893
45000
  constructor(attributes, options) {
44894
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Brush.defaultAttributes, attributes)), this.name = "brush", 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 => {
44895
- if (this._outOfInteractiveRange(e)) return void (this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)));
45001
+ 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 => {
44896
45002
  const {
44897
45003
  updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
44898
45004
  endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
@@ -44920,7 +45026,7 @@
44920
45026
  brushMode: brushMode
44921
45027
  } = this.attribute,
44922
45028
  pos = this.eventPosToStagePos(e);
44923
- this._cacheDrawPoints.push(pos), "single" === brushMode && this._clearMask(), this._addBrushMask(), this._dispatchBrushEvent(IOperateType.drawStart, e), 1 === Object.keys(this._brushMaskAABBBoundsDict).length && this._dispatchBrushEvent(IOperateType.brushActive, e);
45029
+ this._cacheDrawPoints.push(pos), "single" === brushMode && this._clearMask(), this._addBrushMask(), this._dispatchBrushEvent(IOperateType.drawStart, e), this._activeBrushState = !1;
44924
45030
  }
44925
45031
  _initMove(e) {
44926
45032
  var _a, _b;
@@ -44950,7 +45056,8 @@
44950
45056
  var _a;
44951
45057
  const pos = this.eventPosToStagePos(e),
44952
45058
  {
44953
- brushType: brushType
45059
+ brushType: brushType,
45060
+ sizeThreshold = DEFAULT_SIZE_THRESHOLD
44954
45061
  } = this.attribute,
44955
45062
  cacheLength = this._cacheDrawPoints.length;
44956
45063
  if (cacheLength > 0) {
@@ -44959,7 +45066,16 @@
44959
45066
  }
44960
45067
  "polygon" === brushType || cacheLength <= 1 ? this._cacheDrawPoints.push(pos) : this._cacheDrawPoints[cacheLength - 1] = pos;
44961
45068
  const maskPoints = this._computeMaskPoints();
44962
- this._operatingMask.setAttribute("points", maskPoints), this._dispatchBrushEvent(IOperateType.drawing, e);
45069
+ this._operatingMask.setAttribute("points", maskPoints);
45070
+ const {
45071
+ x: x1,
45072
+ y: y1
45073
+ } = this._startPos,
45074
+ {
45075
+ x: x2,
45076
+ y: y2
45077
+ } = this.eventPosToStagePos(e);
45078
+ (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)));
44963
45079
  }
44964
45080
  _moving(e) {
44965
45081
  const startPos = this._cacheMovePoint,
@@ -45099,9 +45215,6 @@
45099
45215
  pos = this.eventPosToStagePos(e);
45100
45216
  return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
45101
45217
  }
45102
- eventPosToStagePos(e) {
45103
- return this.stage.eventPointTransform(e);
45104
- }
45105
45218
  _dispatchBrushEvent(operateType, e) {
45106
45219
  this._dispatchEvent(operateType, {
45107
45220
  operateMask: this._operatingMask,
@@ -45110,7 +45223,7 @@
45110
45223
  });
45111
45224
  }
45112
45225
  _clearMask() {
45113
- this._brushMaskAABBBoundsDict = {}, this._container.incrementalClearChild(), this._operatingMask = null;
45226
+ this._brushMaskAABBBoundsDict = {}, this._container.removeAllChild(), this._operatingMask = null;
45114
45227
  }
45115
45228
  _isEmptyMask() {
45116
45229
  return isEmpty(this._brushMaskAABBBoundsDict) || Object.keys(this._brushMaskAABBBoundsDict).every(key => this._brushMaskAABBBoundsDict[key].empty());
@@ -64123,7 +64236,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64123
64236
  };
64124
64237
  registerVChartCore();
64125
64238
 
64126
- const version = "1.13.11-alpha.2";
64239
+ const version = "1.13.12";
64127
64240
 
64128
64241
  const addVChartProperty = (data, op) => {
64129
64242
  const context = op.beforeCall();
@@ -67712,7 +67825,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67712
67825
  const getCartesianCrosshairTheme = (chartTheme, chartSpec) => {
67713
67826
  var _a, _b;
67714
67827
  const axes = array((_a = chartSpec.axes) !== null && _a !== void 0 ? _a : []);
67715
- const { bandField, linearField, xField, yField } = (_b = getComponentThemeFromOption(ComponentTypeEnum.crosshair, chartTheme)) !== null && _b !== void 0 ? _b : {};
67828
+ const crosshairTheme = (_b = getComponentThemeFromOption(ComponentTypeEnum.crosshair, chartTheme)) !== null && _b !== void 0 ? _b : {};
67829
+ const { bandField, linearField, xField, yField, trigger, triggerOff } = crosshairTheme;
67716
67830
  const xAxis = axes.find(axis => isXAxis(axis.orient));
67717
67831
  let newXField;
67718
67832
  if (isValid$1(xAxis)) {
@@ -67731,13 +67845,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67731
67845
  }
67732
67846
  return {
67733
67847
  xField: newXField,
67734
- yField: newYField
67848
+ yField: newYField,
67849
+ trigger,
67850
+ triggerOff
67735
67851
  };
67736
67852
  };
67737
67853
  const getPolarCrosshairTheme = (chartTheme, chartSpec) => {
67738
67854
  var _a, _b;
67739
67855
  const axes = array((_a = chartSpec.axes) !== null && _a !== void 0 ? _a : []);
67740
- const { bandField, linearField, categoryField, valueField } = (_b = getComponentThemeFromOption(ComponentTypeEnum.crosshair, chartTheme)) !== null && _b !== void 0 ? _b : {};
67856
+ const { bandField, linearField, categoryField, valueField, trigger, triggerOff } = (_b = getComponentThemeFromOption(ComponentTypeEnum.crosshair, chartTheme)) !== null && _b !== void 0 ? _b : {};
67741
67857
  const angleAxis = axes.find(axis => axis.orient === 'angle');
67742
67858
  let newAngleField;
67743
67859
  if (isValid$1(angleAxis)) {
@@ -67756,7 +67872,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67756
67872
  }
67757
67873
  return {
67758
67874
  categoryField: newAngleField,
67759
- valueField: newRadiusField
67875
+ valueField: newRadiusField,
67876
+ trigger,
67877
+ triggerOff
67760
67878
  };
67761
67879
  };
67762
67880
 
@@ -72742,6 +72860,26 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
72742
72860
  this._barMarkType = "rect";
72743
72861
  this.transformerConstructor = BarSeriesSpecTransformer;
72744
72862
  this._bandPosition = 0;
72863
+ this._getLinearBarRange = (start, end) => {
72864
+ let [x, x1] = [start, end].sort((a, b) => a - b);
72865
+ const realBarWidth = x1 - x;
72866
+ if (this._spec.barGap) {
72867
+ const halfBarGap = this._spec.barGap * 0.5;
72868
+ const tempX = x + halfBarGap;
72869
+ const tempX1 = x1 - halfBarGap;
72870
+ x = tempX;
72871
+ x1 = tempX1;
72872
+ }
72873
+ const curBarWidth = x1 - x;
72874
+ const barMinWidth = getActualNumValue(this._spec.barMinWidth || 2, realBarWidth);
72875
+ if (curBarWidth < barMinWidth) {
72876
+ const widthDiff = barMinWidth - curBarWidth;
72877
+ const halfWidthDiff = widthDiff / 2;
72878
+ x -= halfWidthDiff;
72879
+ x1 += halfWidthDiff;
72880
+ }
72881
+ return [x, x1];
72882
+ };
72745
72883
  this._getBarXStart = (datum, scale, useWholeRange) => {
72746
72884
  if (this._shouldDoPreCalculate()) {
72747
72885
  this._calculateStackRectPosition(false);
@@ -72759,6 +72897,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
72759
72897
  }
72760
72898
  return valueInScaleRange(this._dataToPosX1(datum), scale, useWholeRange);
72761
72899
  };
72900
+ this._getLinearBarXRange = (datum, scale, useWholeRange) => {
72901
+ const x = valueInScaleRange(this._dataToPosX(datum), scale, useWholeRange);
72902
+ const x1 = valueInScaleRange(this._dataToPosX1(datum), scale, useWholeRange);
72903
+ return this._getLinearBarRange(x, x1);
72904
+ };
72762
72905
  this._getBarYStart = (datum, scale) => {
72763
72906
  if (this._shouldDoPreCalculate()) {
72764
72907
  this._calculateStackRectPosition(true);
@@ -72776,6 +72919,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
72776
72919
  }
72777
72920
  return valueInScaleRange(this._dataToPosY1(datum), scale);
72778
72921
  };
72922
+ this._getLinearBarYRange = (datum, scale, useWholeRange) => {
72923
+ const y = valueInScaleRange(this._dataToPosY(datum), scale, useWholeRange);
72924
+ const y1 = valueInScaleRange(this._dataToPosY1(datum), scale, useWholeRange);
72925
+ return this._getLinearBarRange(y, y1);
72926
+ };
72779
72927
  this._getBarBackgroundXStart = (scale) => {
72780
72928
  const range = scale.range();
72781
72929
  const min = Math.min(range[0], range[range.length - 1]);
@@ -73143,8 +73291,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
73143
73291
  if (this.direction === "horizontal") {
73144
73292
  const yChannels = isValid$1(this._fieldY2)
73145
73293
  ? {
73146
- y: (datum) => valueInScaleRange(this._dataToPosY(datum), yScale, true),
73147
- y1: (datum) => valueInScaleRange(this._dataToPosY1(datum), yScale, true)
73294
+ y: (datum) => this._getLinearBarYRange(datum, yScale, true)[0],
73295
+ y1: (datum) => this._getLinearBarYRange(datum, yScale, true)[1]
73148
73296
  }
73149
73297
  : {
73150
73298
  y: (datum) => valueInScaleRange(this._dataToPosY(datum) - this._getBarWidth(this._yAxisHelper) / 2, yScale, true),
@@ -73156,8 +73304,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
73156
73304
  else {
73157
73305
  const xChannels = isValid$1(this._fieldX2)
73158
73306
  ? {
73159
- x: (datum) => valueInScaleRange(this._dataToPosX(datum), xScale, true),
73160
- x1: (datum) => valueInScaleRange(this._dataToPosX1(datum), xScale, true)
73307
+ x: (datum) => this._getLinearBarXRange(datum, xScale, true)[0],
73308
+ x1: (datum) => this._getLinearBarXRange(datum, xScale, true)[1]
73161
73309
  }
73162
73310
  : {
73163
73311
  x: (datum) => valueInScaleRange(this._dataToPosX(datum) - this._getBarWidth(this._xAxisHelper) / 2, xScale, true),
@@ -91661,7 +91809,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91661
91809
  spec.axes.forEach((axis) => (axis.type = 'linear'));
91662
91810
  }
91663
91811
  _getDefaultSeriesSpec(spec) {
91664
- return super._getDefaultSeriesSpec(spec, ['x2Field', 'y2Field', 'barMinHeight', 'barBackground']);
91812
+ return super._getDefaultSeriesSpec(spec, ['x2Field', 'y2Field', 'barMinHeight', 'barBackground', 'barGap']);
91665
91813
  }
91666
91814
  }
91667
91815
 
@@ -94182,11 +94330,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
94182
94330
  return false;
94183
94331
  }
94184
94332
  _initTheme(spec, chartSpec) {
94185
- var _a;
94333
+ var _a, _b, _c;
94186
94334
  const { spec: newSpec, theme } = super._initTheme(spec, chartSpec);
94187
94335
  newSpec.style = mergeSpec({}, this._theme, newSpec.style);
94188
94336
  newSpec.offset = mergeSpec({}, theme.offset, spec.offset);
94189
94337
  newSpec.transitionDuration = (_a = spec.transitionDuration) !== null && _a !== void 0 ? _a : theme.transitionDuration;
94338
+ newSpec.trigger = (_b = spec.trigger) !== null && _b !== void 0 ? _b : theme.trigger;
94339
+ newSpec.triggerOff = (_c = spec.triggerOff) !== null && _c !== void 0 ? _c : theme.triggerOff;
94190
94340
  return { spec: newSpec, theme };
94191
94341
  }
94192
94342
  _transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo) {
@@ -95139,7 +95289,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95139
95289
  }
95140
95290
  }
95141
95291
  _parseField(field, fieldName) {
95142
- var _a, _b;
95292
+ var _a, _b, _c;
95143
95293
  const hair = {};
95144
95294
  const { line = {}, label = {}, visible } = field;
95145
95295
  hair.visible = visible;
@@ -95150,7 +95300,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95150
95300
  else {
95151
95301
  const style = line.style || {};
95152
95302
  const { stroke, fill, lineWidth } = style;
95153
- const _c = style, { strokeOpacity, fillOpacity, opacity } = _c, restStyle = __rest$e(_c, ["strokeOpacity", "fillOpacity", "opacity"]);
95303
+ const _d = style, { strokeOpacity, fillOpacity, opacity } = _d, restStyle = __rest$e(_d, ["strokeOpacity", "fillOpacity", "opacity"]);
95154
95304
  const isLineType = hair.type === 'line';
95155
95305
  let finalOpacity = isLineType ? strokeOpacity : fillOpacity;
95156
95306
  if (isNumber$1(opacity)) {
@@ -95178,8 +95328,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95178
95328
  }
95179
95329
  if (!!label.visible) {
95180
95330
  const labelBackground = label.labelBackground || {};
95331
+ const syncAxisLabelAngle = (_c = label.syncAxisLabelAngle) !== null && _c !== void 0 ? _c : false;
95181
95332
  const labelStyle = label.style || {};
95182
- const _d = labelBackground.style || {}, { fill: rectFill = 'rgba(47, 59, 82, 0.9)', stroke: rectStroke, outerBorder } = _d, rectStyle = __rest$e(_d, ["fill", "stroke", "outerBorder"]);
95333
+ const _e = labelBackground.style || {}, { fill: rectFill = 'rgba(47, 59, 82, 0.9)', stroke: rectStroke, outerBorder } = _e, rectStyle = __rest$e(_e, ["fill", "stroke", "outerBorder"]);
95183
95334
  hair.label = {
95184
95335
  visible: true,
95185
95336
  formatMethod: label.formatMethod,
@@ -95187,6 +95338,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95187
95338
  minWidth: labelBackground.minWidth,
95188
95339
  maxWidth: labelBackground.maxWidth,
95189
95340
  padding: labelBackground.padding,
95341
+ syncAxisLabelAngle,
95190
95342
  textStyle: Object.assign(Object.assign({ fontSize: 14, pickable: false }, labelStyle), { fill: labelStyle.fill || '#fff', stroke: get$1(labelStyle, 'stroke') }),
95191
95343
  panel: (isBoolean$1(labelBackground.visible) ? labelBackground.visible : !!labelBackground)
95192
95344
  ? Object.assign({ visible: true, pickable: false, fill: rectFill, stroke: rectStroke, outerBorder: Object.assign({ stroke: rectFill, distance: 0, lineWidth: 3 }, outerBorder) }, rectStyle) : { visible: false },
@@ -95279,9 +95431,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95279
95431
  layoutStartPoint = { x: 0, y: 0 };
95280
95432
  }
95281
95433
  Object.keys(stateByField).forEach(field => {
95434
+ var _a, _b, _c, _d, _e;
95282
95435
  const { currentValue, cacheInfo, labelsComp, attributes, coordKey } = stateByField[field];
95283
95436
  let axis = null;
95284
95437
  let coord = 0;
95438
+ let axisLabel = null;
95285
95439
  if (currentValue.size) {
95286
95440
  const item = Array.from(currentValue.values())[0];
95287
95441
  coord =
@@ -95289,6 +95443,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95289
95443
  item.axis.getLayoutStartPoint()[coordKey] -
95290
95444
  layoutStartPoint[coordKey];
95291
95445
  axis = item.axis;
95446
+ axisLabel = (_e = (_d = (_c = (_b = (_a = axis
95447
+ .getVRenderComponents()[0]) === null || _a === void 0 ? void 0 : _a.children[0]) === null || _b === void 0 ? void 0 : _b.children[0]) === null || _c === void 0 ? void 0 : _c.getChildByName('axis-label-container')) === null || _d === void 0 ? void 0 : _d.getChildByName('axis-label-container-layer-0')) === null || _e === void 0 ? void 0 : _e.children[0];
95292
95448
  }
95293
95449
  const isVisible = !!currentValue.size && Number.isFinite(coord) && !Number.isNaN(coord);
95294
95450
  const useCache = enableRemain && !isVisible && isValid$1(cacheInfo);
@@ -95306,7 +95462,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95306
95462
  }, {})
95307
95463
  : null,
95308
95464
  visible: isVisible,
95309
- axis
95465
+ axis,
95466
+ axisLabel: axisLabel
95310
95467
  };
95311
95468
  if (newCacheInfo) {
95312
95469
  newCacheInfo._isCache = useCache;
@@ -95315,7 +95472,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95315
95472
  let offsetSize = 0;
95316
95473
  if (attributes) {
95317
95474
  currentValue.forEach(({ axis, datum: value = '' }) => {
95318
- var _a;
95475
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
95319
95476
  let niceLabelFormatter = null;
95320
95477
  const scale = axis.getScale();
95321
95478
  if (isDiscrete(scale.type)) {
@@ -95344,36 +95501,37 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95344
95501
  if (newCacheInfo && ((_a = attributes.label) === null || _a === void 0 ? void 0 : _a.visible) && !useCache) {
95345
95502
  const labelOffset = getAxisLabelOffset(axis.getSpec());
95346
95503
  const axisOrient = axis.getOrient();
95504
+ const syncAxisLabelAngle = (_b = attributes.label) === null || _b === void 0 ? void 0 : _b.syncAxisLabelAngle;
95347
95505
  if (newCacheInfo.labels[axisOrient]) {
95348
95506
  newCacheInfo.labels[axisOrient].visible = true;
95349
95507
  newCacheInfo.labels[axisOrient].text = value;
95350
95508
  if (axisOrient === 'left') {
95351
95509
  newCacheInfo.labels[axisOrient].dx = -labelOffset;
95352
95510
  newCacheInfo.labelsTextStyle[axisOrient] = {
95353
- textAlign: 'right',
95354
- textBaseline: 'middle'
95511
+ textAlign: syncAxisLabelAngle && axisLabel ? ((_c = axisLabel.attribute.textAlign) !== null && _c !== void 0 ? _c : 'right') : 'right',
95512
+ textBaseline: syncAxisLabelAngle && axisLabel ? ((_d = axisLabel.attribute.textBaseline) !== null && _d !== void 0 ? _d : 'middle') : 'middle'
95355
95513
  };
95356
95514
  }
95357
95515
  else if (axisOrient === 'right') {
95358
95516
  newCacheInfo.labels[axisOrient].dx = labelOffset;
95359
95517
  newCacheInfo.labelsTextStyle[axisOrient] = {
95360
- textAlign: 'left',
95361
- textBaseline: 'middle'
95518
+ textAlign: syncAxisLabelAngle && axisLabel ? ((_e = axisLabel.attribute.textAlign) !== null && _e !== void 0 ? _e : 'left') : 'left',
95519
+ textBaseline: syncAxisLabelAngle && axisLabel ? ((_f = axisLabel.attribute.textBaseline) !== null && _f !== void 0 ? _f : 'middle') : 'middle'
95362
95520
  };
95363
95521
  }
95364
95522
  else if (axisOrient === 'top') {
95365
95523
  newCacheInfo.labels[axisOrient].y = 0;
95366
95524
  newCacheInfo.labels[axisOrient].dy = -labelOffset;
95367
95525
  newCacheInfo.labelsTextStyle[axisOrient] = {
95368
- textAlign: 'center',
95369
- textBaseline: 'bottom'
95526
+ textAlign: syncAxisLabelAngle && axisLabel ? ((_g = axisLabel.attribute.textAlign) !== null && _g !== void 0 ? _g : 'center') : 'center',
95527
+ textBaseline: syncAxisLabelAngle && axisLabel ? ((_h = axisLabel.attribute.textBaseline) !== null && _h !== void 0 ? _h : 'bottom') : 'bottom'
95370
95528
  };
95371
95529
  }
95372
95530
  else if (axisOrient === 'bottom') {
95373
95531
  newCacheInfo.labels[axisOrient].dy = labelOffset;
95374
95532
  newCacheInfo.labelsTextStyle[axisOrient] = {
95375
- textAlign: 'center',
95376
- textBaseline: 'top'
95533
+ textAlign: syncAxisLabelAngle && axisLabel ? ((_j = axisLabel.attribute.textAlign) !== null && _j !== void 0 ? _j : 'center') : 'center',
95534
+ textBaseline: syncAxisLabelAngle && axisLabel ? ((_k = axisLabel.attribute.textBaseline) !== null && _k !== void 0 ? _k : 'top') : 'top'
95377
95535
  };
95378
95536
  }
95379
95537
  newCacheInfo.labels[axisOrient].defaultFormatter = niceLabelFormatter;
@@ -95617,9 +95775,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95617
95775
  const positionAttribute = layoutCrosshair$1(this._stateByField[field]);
95618
95776
  this._updateCrosshairByField(field, positionAttribute);
95619
95777
  Object.keys(labels).forEach(labelKey => {
95620
- var _a;
95778
+ var _a, _b, _c;
95621
95779
  if (labels[labelKey].visible) {
95622
- const updateAttrs = Object.assign(Object.assign(Object.assign({ [coordKey]: coord + bandSize / 2 }, labels[labelKey]), attributes.label), { textStyle: Object.assign(Object.assign({}, (_a = attributes.label) === null || _a === void 0 ? void 0 : _a.textStyle), labelsTextStyle[labelKey]), zIndex: this.labelZIndex, visible: true });
95780
+ const updateAttrs = Object.assign(Object.assign(Object.assign({ [coordKey]: coord + bandSize / 2 }, labels[labelKey]), attributes.label), { angle: attributes.label.syncAxisLabelAngle ? ((_b = (_a = cacheInfo.axisLabel) === null || _a === void 0 ? void 0 : _a.attribute.angle) !== null && _b !== void 0 ? _b : 0) : 0, textStyle: Object.assign(Object.assign({}, (_c = attributes.label) === null || _c === void 0 ? void 0 : _c.textStyle), labelsTextStyle[labelKey]), zIndex: this.labelZIndex, visible: true });
95623
95781
  this._updateCrosshairLabel(labelsComp[labelKey], updateAttrs, label => {
95624
95782
  label.name = `crosshair-${field.replace('Field', '')}-${labelKey}-label`;
95625
95783
  labelsComp[labelKey] = label;
@@ -96035,10 +96193,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96035
96193
  return data.filter(filter);
96036
96194
  };
96037
96195
  const dataFilterComputeDomain = (data, op) => {
96038
- const { stateFields, valueFields, dataCollection } = op.input;
96196
+ const { stateFields, valueFields, dataCollection, isCategoryState } = op.input;
96039
96197
  const { stateField, valueField } = op.output;
96040
96198
  const resultObj = {};
96041
96199
  const resultData = [];
96200
+ const stateValues = [];
96201
+ let hasLockDomain = false;
96042
96202
  dataCollection.forEach((dv, i) => {
96043
96203
  var _a;
96044
96204
  if (isNil$1(stateFields[i])) {
@@ -96046,14 +96206,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96046
96206
  }
96047
96207
  const stateFieldInfo = (_a = dv.getFields()) === null || _a === void 0 ? void 0 : _a[stateFields[i]];
96048
96208
  if (stateFieldInfo && stateFieldInfo.lockStatisticsByDomain) {
96209
+ hasLockDomain = true;
96049
96210
  stateFieldInfo.domain.forEach((d) => {
96050
- resultObj[d] = 0;
96211
+ if (isNil$1(resultObj[d])) {
96212
+ stateValues.push(d);
96213
+ resultObj[d] = 0;
96214
+ }
96051
96215
  });
96052
96216
  }
96053
96217
  dv.latestData.forEach((d) => {
96054
96218
  array(stateFields[i]).forEach(state => {
96055
96219
  if (!isNil$1(d[state])) {
96056
96220
  if (isNil$1(resultObj[d[state]])) {
96221
+ stateValues.push(d[state]);
96057
96222
  resultObj[d[state]] = 0;
96058
96223
  }
96059
96224
  if (!isNil$1(valueFields[i])) {
@@ -96063,10 +96228,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96063
96228
  });
96064
96229
  });
96065
96230
  });
96066
- Object.keys(resultObj).forEach((d, i) => {
96067
- const res = { [stateField]: d };
96231
+ const sortedStateValues = hasLockDomain
96232
+ ? stateValues
96233
+ : isCategoryState === false
96234
+ ? stateValues.sort((a, b) => a - b)
96235
+ : Object.keys(resultObj);
96236
+ sortedStateValues.forEach(state => {
96237
+ const res = { [stateField]: state };
96068
96238
  if (valueField) {
96069
- res[valueField] = resultObj[d];
96239
+ res[valueField] = resultObj[state];
96070
96240
  }
96071
96241
  resultData.push(res);
96072
96242
  });
@@ -96416,6 +96586,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96416
96586
  const dataCollection = [];
96417
96587
  const stateFields = [];
96418
96588
  const valueFields = [];
96589
+ let isCategoryState;
96419
96590
  if (this._relatedAxisComponent) {
96420
96591
  const originalStateFields = {};
96421
96592
  eachSeries(this._regions, s => {
@@ -96441,8 +96612,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96441
96612
  ? xAxisHelper
96442
96613
  : yAxisHelper;
96443
96614
  const valueAxisHelper = stateAxisHelper === xAxisHelper ? yAxisHelper : xAxisHelper;
96444
- const isValidateValueAxis = isContinuous(valueAxisHelper.getScale(0).type);
96445
- const isValidateStateAxis = isContinuous(stateAxisHelper.getScale(0).type);
96446
96615
  dataCollection.push(s.getRawData());
96447
96616
  const seriesSpec = s.getSpec();
96448
96617
  const xField = s.coordinate === 'cartesian'
@@ -96453,7 +96622,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96453
96622
  : array((_b = seriesSpec.radiusField) !== null && _b !== void 0 ? _b : seriesSpec.valueField);
96454
96623
  originalStateFields[s.id] =
96455
96624
  s.type === 'link' ? ['from_xField'] : stateAxisHelper === xAxisHelper ? xField : yField;
96456
- if (isValidateStateAxis) {
96625
+ if (isContinuous(stateAxisHelper.getScale(0).type)) {
96626
+ isCategoryState = false;
96457
96627
  stateFields.push(originalStateFields[s.id]);
96458
96628
  }
96459
96629
  else {
@@ -96461,7 +96631,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96461
96631
  }
96462
96632
  if (this._valueField) {
96463
96633
  const valueField = s.type === 'link' ? ['from_yField'] : valueAxisHelper === xAxisHelper ? xField : yField;
96464
- if (isValidateValueAxis) {
96634
+ if (isContinuous(valueAxisHelper.getScale(0).type)) {
96465
96635
  valueFields.push(...valueField);
96466
96636
  }
96467
96637
  }
@@ -96493,7 +96663,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96493
96663
  input: {
96494
96664
  dataCollection: dataCollection,
96495
96665
  stateFields,
96496
- valueFields
96666
+ valueFields,
96667
+ isCategoryState
96497
96668
  },
96498
96669
  output: {
96499
96670
  stateField: this._stateField,
@@ -97612,7 +97783,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97612
97783
  x = convertPercentToValue(datum.x, regionWidth) + regionStartLayoutStartPoint.x;
97613
97784
  }
97614
97785
  else {
97615
- x = relativeSeries.getXAxisHelper().dataToPosition([datum.x]) + regionStartLayoutStartPoint.x;
97786
+ x =
97787
+ convertDatumToValue(relativeSeries.getXAxisHelper(), [datum.x]) +
97788
+ regionStartLayoutStartPoint.x;
97616
97789
  }
97617
97790
  return x;
97618
97791
  }
@@ -97627,7 +97800,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97627
97800
  y = convertPercentToValue(datum.y, regionHeight) + regionStartLayoutStartPoint.y;
97628
97801
  }
97629
97802
  else {
97630
- y = relativeSeries.getYAxisHelper().dataToPosition([datum.y]) + regionStartLayoutStartPoint.y;
97803
+ y =
97804
+ convertDatumToValue(relativeSeries.getYAxisHelper(), [datum.y]) +
97805
+ regionStartLayoutStartPoint.y;
97631
97806
  }
97632
97807
  return y;
97633
97808
  }
@@ -97637,7 +97812,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97637
97812
  isNumber$1(datum.angle) &&
97638
97813
  isNeedExtendDomain(angleDomain, datum.angle, autoRange) &&
97639
97814
  ((_b = (_a = relativeSeries.angleAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_angleAxis_extend', datum.angle));
97640
- return relativeSeries.angleAxisHelper.dataToPosition([datum.angle]);
97815
+ return convertDatumToValue(relativeSeries.angleAxisHelper, [datum.angle]);
97641
97816
  }
97642
97817
  function getRadiusValue(datum, radiusDomain, autoRange, refSeries) {
97643
97818
  var _a, _b;
@@ -97645,11 +97820,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97645
97820
  isNumber$1(datum.radius) &&
97646
97821
  isNeedExtendDomain(radiusDomain, datum.radius, autoRange) &&
97647
97822
  ((_b = (_a = relativeSeries.radiusAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_radiusAxis_extend', datum.radius));
97648
- return relativeSeries.radiusAxisHelper.dataToPosition([datum.radius]);
97823
+ return convertDatumToValue(relativeSeries.radiusAxisHelper, [datum.radius]);
97649
97824
  }
97650
97825
  function convertPercentToValue(percent, relativeLength) {
97651
97826
  return (Number(percent.substring(0, percent.length - 1)) * relativeLength) / 100;
97652
97827
  }
97828
+ function convertDatumToValue(axisHelper, datum) {
97829
+ const scale = axisHelper.getScale(0);
97830
+ if (isContinuous(scale.type) && scale.domain()[0] === scale.domain()[1] && datum[0] !== scale.domain()[0]) {
97831
+ return NaN;
97832
+ }
97833
+ return axisHelper.dataToPosition(datum);
97834
+ }
97653
97835
  function isAggrSpec(spec) {
97654
97836
  return AGGR_TYPE.includes(spec);
97655
97837
  }
@@ -97814,8 +97996,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97814
97996
  isNeedExtendDomain(yDomain, yValue[0], autoRange) &&
97815
97997
  ((_d = (_c = refRelativeSeries.getYAxisHelper()) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, 'marker_yAxis_extend', yValue[0]));
97816
97998
  points.push({
97817
- x: refRelativeSeries.getXAxisHelper().dataToPosition(xValue) + regionStartLayoutStartPoint.x + offsetX,
97818
- y: refRelativeSeries.getYAxisHelper().dataToPosition(yValue) + regionStartLayoutStartPoint.y + offsetY
97999
+ x: convertDatumToValue(refRelativeSeries.getXAxisHelper(), xValue) + regionStartLayoutStartPoint.x + offsetX,
98000
+ y: convertDatumToValue(refRelativeSeries.getYAxisHelper(), yValue) + regionStartLayoutStartPoint.y + offsetY
97819
98001
  });
97820
98002
  });
97821
98003
  return points;
@@ -97839,8 +98021,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97839
98021
  isNeedExtendDomain(radiusDomain, radiusValue[0], autoRange) &&
97840
98022
  ((_d = (_c = refRelativeSeries.radiusAxisHelper) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, 'marker_yAxis_extend', radiusValue[0]));
97841
98023
  points.push({
97842
- angle: refRelativeSeries.angleAxisHelper.dataToPosition(angleValue),
97843
- radius: refRelativeSeries.radiusAxisHelper.dataToPosition(radiusValue)
98024
+ angle: convertDatumToValue(refRelativeSeries.angleAxisHelper, angleValue),
98025
+ radius: convertDatumToValue(refRelativeSeries.radiusAxisHelper, radiusValue)
97844
98026
  });
97845
98027
  });
97846
98028
  return points;
@@ -100594,7 +100776,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100594
100776
  this._linkedInBrushElementsMap = {};
100595
100777
  this._linkedOutOfBrushElementsMap = {};
100596
100778
  this._cacheInteractiveRangeAttrs = [];
100597
- this._needDisablePickable = false;
100598
100779
  this._releatedAxes = [];
100599
100780
  this._regionAxisMap = {};
100600
100781
  this._axisDataZoomMap = {};
@@ -100750,34 +100931,36 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100750
100931
  this._emitEvent(ChartEvent.brushActive, region);
100751
100932
  });
100752
100933
  brush.addEventListener(IOperateType.drawStart, (e) => {
100934
+ this._setRegionMarkPickable(region, true);
100753
100935
  this._emitEvent(ChartEvent.brushStart, region);
100754
100936
  });
100755
100937
  brush.addEventListener(IOperateType.moveStart, (e) => {
100938
+ this._setRegionMarkPickable(region, true);
100756
100939
  this._emitEvent(ChartEvent.brushStart, region);
100757
100940
  });
100758
100941
  brush.addEventListener(IOperateType.drawing, (e) => {
100759
- this._needDisablePickable = true;
100942
+ this._setRegionMarkPickable(region, false);
100760
100943
  this._handleBrushChange(region, e);
100761
100944
  this._emitEvent(ChartEvent.brushChange, region);
100762
100945
  });
100763
100946
  brush.addEventListener(IOperateType.moving, (e) => {
100947
+ this._setRegionMarkPickable(region, false);
100764
100948
  this._handleBrushChange(region, e);
100765
100949
  this._emitEvent(ChartEvent.brushChange, region);
100766
100950
  });
100767
100951
  brush.addEventListener(IOperateType.brushClear, (e) => {
100952
+ this._setRegionMarkPickable(region, true);
100768
100953
  this._initMarkBrushState(componentIndex, '');
100769
- this._needDisablePickable = false;
100770
100954
  this._emitEvent(ChartEvent.brushClear, region);
100771
100955
  });
100772
100956
  brush.addEventListener(IOperateType.drawEnd, (e) => {
100773
100957
  var _a;
100774
- this._needDisablePickable = false;
100958
+ this._setRegionMarkPickable(region, true);
100775
100959
  const { operateMask } = e.detail;
100776
100960
  if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.onBrushEnd) {
100777
100961
  if (this._spec.onBrushEnd(e) === true) {
100778
100962
  this.clearGraphic();
100779
100963
  this._initMarkBrushState(componentIndex, '');
100780
- this._needDisablePickable = false;
100781
100964
  this._emitEvent(ChartEvent.brushClear, region);
100782
100965
  }
100783
100966
  else {
@@ -100794,6 +100977,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100794
100977
  }
100795
100978
  });
100796
100979
  brush.addEventListener(IOperateType.moveEnd, (e) => {
100980
+ this._setRegionMarkPickable(region, true);
100797
100981
  const { operateMask } = e.detail;
100798
100982
  const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
100799
100983
  if (!this._spec.zoomWhenEmpty && inBrushData.length > 0) {
@@ -100921,7 +101105,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100921
101105
  this._outOfBrushElementsMap[elementKey] = el;
100922
101106
  delete this._inBrushElementsMap[operateMask.name][elementKey];
100923
101107
  }
100924
- graphicItem.setAttribute('pickable', !this._needDisablePickable);
100925
101108
  });
100926
101109
  });
100927
101110
  }
@@ -100980,7 +101163,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100980
101163
  el.addState(OUT_BRUSH_STATE);
100981
101164
  this._linkedOutOfBrushElementsMap[elementKey] = el;
100982
101165
  }
100983
- graphicItem.setAttribute('pickable', !this._needDisablePickable);
100984
101166
  });
100985
101167
  });
100986
101168
  }
@@ -101062,6 +101244,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
101062
101244
  });
101063
101245
  });
101064
101246
  }
101247
+ _setRegionMarkPickable(region, pickable) {
101248
+ region
101249
+ .getGroupMark()
101250
+ .getProduct()
101251
+ .elements.forEach(el => el.getGraphicItem().setAttribute('childrenPickable', pickable));
101252
+ }
101065
101253
  _stateClamp(state) {
101066
101254
  return Math.min(Math.max(0, state), 1);
101067
101255
  }
@@ -101141,7 +101329,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
101141
101329
  const container = this.getContainer();
101142
101330
  this._brushComponents.forEach((brush, index) => {
101143
101331
  this._initMarkBrushState(index, '');
101144
- this._needDisablePickable = false;
101145
101332
  brush.removeAllChild();
101146
101333
  brush.releaseBrushEvents();
101147
101334
  if (container) {
@@ -103074,12 +103261,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103074
103261
  const rowStyle = this._domStyle.row;
103075
103262
  const chilren = [...this._rootDom.children];
103076
103263
  let titleDom = chilren.find(child => child.className.includes(TOOLTIP_TITLE_CLASS_NAME));
103264
+ let contentDom = chilren.find(child => child.className.includes(TOOLTIP_CONTENT_BOX_CLASS_NAME));
103077
103265
  if (!titleDom && title.visible !== false) {
103078
103266
  titleDom = document.createElement('h2');
103079
103267
  const span = document.createElement('span');
103080
103268
  titleDom.appendChild(span);
103081
103269
  titleDom.classList.add(TOOLTIP_TITLE_CLASS_NAME);
103082
- this._rootDom.appendChild(titleDom);
103270
+ if (this._rootDom.firstChild) {
103271
+ this._rootDom.insertBefore(titleDom, this._rootDom.firstChild);
103272
+ }
103273
+ else {
103274
+ this._rootDom.appendChild(titleDom);
103275
+ }
103083
103276
  }
103084
103277
  if (titleDom && title.visible !== false) {
103085
103278
  setStyleToDom(titleDom, Object.assign(Object.assign(Object.assign({}, this._domStyle.title), (hasContent ? rowStyle : { marginBottom: '0px' })), { marginTop: '0px' }));
@@ -103088,7 +103281,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103088
103281
  else if (titleDom && title.visible === false) {
103089
103282
  titleDom.parentNode.removeChild(titleDom);
103090
103283
  }
103091
- let contentDom = chilren.find(child => child.className.includes(TOOLTIP_CONTENT_BOX_CLASS_NAME));
103092
103284
  const columns = ['shape', 'key', 'value'];
103093
103285
  if (!contentDom && hasContent) {
103094
103286
  contentDom = document.createElement('div');