@visactor/vchart 2.0.0-alpha.2 → 2.0.0-alpha.3

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 (102) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +199 -106
  3. package/build/index.js +199 -106
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/animation/utils.d.ts +2 -2
  7. package/cjs/chart/mosaic/mosaic-transformer.js +1 -1
  8. package/cjs/chart/mosaic/mosaic-transformer.js.map +1 -1
  9. package/cjs/chart/mosaic/mosaic.js.map +1 -1
  10. package/cjs/chart/util.js +1 -2
  11. package/cjs/component/data-zoom/util.js +7 -7
  12. package/cjs/component/data-zoom/util.js.map +1 -1
  13. package/cjs/component/tooltip/tooltip.js +5 -7
  14. package/cjs/component/tooltip/tooltip.js.map +1 -1
  15. package/cjs/component/util.js +2 -1
  16. package/cjs/core/expression-function.js +1 -1
  17. package/cjs/core/factory.js +1 -1
  18. package/cjs/core/index.d.ts +1 -1
  19. package/cjs/core/index.js +2 -2
  20. package/cjs/core/index.js.map +1 -1
  21. package/cjs/core/instance-manager.js +1 -1
  22. package/cjs/core/interface.js +1 -1
  23. package/cjs/core/vchart.js +1 -1
  24. package/cjs/core/vchart.js.map +1 -1
  25. package/cjs/data/initialize.js +1 -1
  26. package/cjs/data/register.js +1 -1
  27. package/cjs/env/env.js +1 -1
  28. package/cjs/env/index.js +1 -1
  29. package/cjs/event/bubble.js +1 -1
  30. package/cjs/mark/base/base-mark.d.ts +1 -1
  31. package/cjs/mark/base/base-mark.js +5 -4
  32. package/cjs/mark/base/base-mark.js.map +1 -1
  33. package/cjs/mark/component.d.ts +0 -1
  34. package/cjs/mark/component.js +1 -5
  35. package/cjs/mark/component.js.map +1 -1
  36. package/cjs/mark/group.js +2 -2
  37. package/cjs/mark/group.js.map +1 -1
  38. package/cjs/mark/interface/common.d.ts +1 -0
  39. package/cjs/mark/interface/common.js.map +1 -1
  40. package/cjs/mark/interface/mark.d.ts +0 -1
  41. package/cjs/mark/interface/mark.js.map +1 -1
  42. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -0
  43. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +3 -0
  44. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
  45. package/cjs/series/mosaic/interface.d.ts +1 -0
  46. package/cjs/series/mosaic/interface.js.map +1 -1
  47. package/cjs/series/mosaic/mosaic.d.ts +2 -0
  48. package/cjs/series/mosaic/mosaic.js +5 -2
  49. package/cjs/series/mosaic/mosaic.js.map +1 -1
  50. package/cjs/typings/tooltip/handler.d.ts +1 -0
  51. package/cjs/typings/tooltip/handler.js.map +1 -1
  52. package/cjs/util/data.js +7 -3
  53. package/cjs/util/data.js.map +1 -1
  54. package/esm/animation/utils.d.ts +2 -2
  55. package/esm/chart/mosaic/mosaic-transformer.js +1 -1
  56. package/esm/chart/mosaic/mosaic-transformer.js.map +1 -1
  57. package/esm/chart/mosaic/mosaic.js.map +1 -1
  58. package/esm/chart/util.js +1 -2
  59. package/esm/component/data-zoom/util.js +7 -6
  60. package/esm/component/data-zoom/util.js.map +1 -1
  61. package/esm/component/tooltip/tooltip.js +5 -7
  62. package/esm/component/tooltip/tooltip.js.map +1 -1
  63. package/esm/component/util.js +2 -1
  64. package/esm/core/expression-function.js +1 -1
  65. package/esm/core/factory.js +1 -1
  66. package/esm/core/index.d.ts +1 -1
  67. package/esm/core/index.js +2 -2
  68. package/esm/core/index.js.map +1 -1
  69. package/esm/core/instance-manager.js +1 -1
  70. package/esm/core/interface.js +1 -1
  71. package/esm/core/vchart.js +1 -1
  72. package/esm/core/vchart.js.map +1 -1
  73. package/esm/data/initialize.js +1 -1
  74. package/esm/data/register.js +1 -1
  75. package/esm/env/env.js +1 -1
  76. package/esm/env/index.js +1 -1
  77. package/esm/event/bubble.js +1 -1
  78. package/esm/mark/base/base-mark.d.ts +1 -1
  79. package/esm/mark/base/base-mark.js +4 -4
  80. package/esm/mark/base/base-mark.js.map +1 -1
  81. package/esm/mark/component.d.ts +0 -1
  82. package/esm/mark/component.js +0 -6
  83. package/esm/mark/component.js.map +1 -1
  84. package/esm/mark/group.js +1 -3
  85. package/esm/mark/group.js.map +1 -1
  86. package/esm/mark/interface/common.d.ts +1 -0
  87. package/esm/mark/interface/common.js.map +1 -1
  88. package/esm/mark/interface/mark.d.ts +0 -1
  89. package/esm/mark/interface/mark.js.map +1 -1
  90. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -0
  91. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +3 -0
  92. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
  93. package/esm/series/mosaic/interface.d.ts +1 -0
  94. package/esm/series/mosaic/interface.js.map +1 -1
  95. package/esm/series/mosaic/mosaic.d.ts +2 -0
  96. package/esm/series/mosaic/mosaic.js +5 -2
  97. package/esm/series/mosaic/mosaic.js.map +1 -1
  98. package/esm/typings/tooltip/handler.d.ts +1 -0
  99. package/esm/typings/tooltip/handler.js.map +1 -1
  100. package/esm/util/data.js +6 -3
  101. package/esm/util/data.js.map +1 -1
  102. package/package.json +8 -8
package/build/index.js CHANGED
@@ -7624,11 +7624,14 @@
7624
7624
  const ContributionProvider = Symbol("ContributionProvider");
7625
7625
  class ContributionProviderCache {
7626
7626
  constructor(serviceIdentifier, container) {
7627
- this.serviceIdentifier = serviceIdentifier, this.container = container;
7627
+ this.serviceIdentifier = serviceIdentifier, this.container = container, ContributionStore.setStore(this.serviceIdentifier, this);
7628
7628
  }
7629
7629
  getContributions() {
7630
7630
  return this.caches || (this.caches = [], this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier))), this.caches;
7631
7631
  }
7632
+ refresh() {
7633
+ this.caches && (this.caches.length = 0, this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier)));
7634
+ }
7632
7635
  }
7633
7636
  function bindContributionProvider(bind, id) {
7634
7637
  bind(ContributionProvider).toDynamicValue(_ref => {
@@ -7646,6 +7649,20 @@
7646
7649
  return new ContributionProviderCache(id, container);
7647
7650
  }).whenTargetNamed(id);
7648
7651
  }
7652
+ class ContributionStore {
7653
+ static getStore(id) {
7654
+ return this.store.get(id);
7655
+ }
7656
+ static setStore(id, cache) {
7657
+ this.store.set(id, cache);
7658
+ }
7659
+ static refreshAllContributions() {
7660
+ this.store.forEach(cache => {
7661
+ cache.refresh();
7662
+ });
7663
+ }
7664
+ }
7665
+ ContributionStore.store = new Map();
7649
7666
 
7650
7667
  class Hook {
7651
7668
  constructor(args, name) {
@@ -7734,6 +7751,48 @@
7734
7751
  }
7735
7752
  }
7736
7753
 
7754
+ class EventListenerManager {
7755
+ constructor() {
7756
+ this._listenerMap = new Map(), this._eventListenerTransformer = event => event;
7757
+ }
7758
+ setEventListenerTransformer(transformer) {
7759
+ this._eventListenerTransformer = transformer || (event => event);
7760
+ }
7761
+ addEventListener(type, listener, options) {
7762
+ if (!listener) return;
7763
+ const wrappedListener = event => {
7764
+ const transformedEvent = this._eventListenerTransformer(event);
7765
+ "function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
7766
+ };
7767
+ this._listenerMap.has(type) || this._listenerMap.set(type, new Map()), this._listenerMap.get(type).set(listener, wrappedListener), this._nativeAddEventListener(type, wrappedListener, options);
7768
+ }
7769
+ removeEventListener(type, listener, options) {
7770
+ var _a;
7771
+ if (!listener) return;
7772
+ const wrappedListener = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener);
7773
+ wrappedListener && (this._nativeRemoveEventListener(type, wrappedListener, options), this._listenerMap.get(type).delete(listener), 0 === this._listenerMap.get(type).size && this._listenerMap.delete(type));
7774
+ }
7775
+ dispatchEvent(event) {
7776
+ return this._nativeDispatchEvent(event);
7777
+ }
7778
+ clearAllEventListeners() {
7779
+ this._listenerMap.forEach((listenersMap, type) => {
7780
+ listenersMap.forEach((wrappedListener, originalListener) => {
7781
+ this._nativeRemoveEventListener(type, wrappedListener, void 0);
7782
+ });
7783
+ }), this._listenerMap.clear();
7784
+ }
7785
+ _nativeAddEventListener(type, listener, options) {
7786
+ throw new Error("_nativeAddEventListener must be implemented by derived classes");
7787
+ }
7788
+ _nativeRemoveEventListener(type, listener, options) {
7789
+ throw new Error("_nativeRemoveEventListener must be implemented by derived classes");
7790
+ }
7791
+ _nativeDispatchEvent(event) {
7792
+ throw new Error("_nativeDispatchEvent must be implemented by derived classes");
7793
+ }
7794
+ }
7795
+
7737
7796
  var __decorate$1v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7738
7797
  var d,
7739
7798
  c = arguments.length,
@@ -7774,7 +7833,7 @@
7774
7833
  step((generator = generator.apply(thisArg, _arguments || [])).next());
7775
7834
  });
7776
7835
  };
7777
- let DefaultGlobal = class {
7836
+ let DefaultGlobal = class extends EventListenerManager {
7778
7837
  get env() {
7779
7838
  return this._env;
7780
7839
  }
@@ -7818,10 +7877,19 @@
7818
7877
  this._env || this.setEnv("browser"), this.envContribution.applyStyles = support;
7819
7878
  }
7820
7879
  constructor(contributions) {
7821
- this.contributions = contributions, this._isImageAnonymous = !0, this._performanceRAFList = [], this.id = Generator.GenAutoIncrementId(), this.hooks = {
7880
+ super(), this.contributions = contributions, this._isImageAnonymous = !0, this._performanceRAFList = [], this.eventListenerTransformer = event => event, this.id = Generator.GenAutoIncrementId(), this.hooks = {
7822
7881
  onSetEnv: new SyncHook(["lastEnv", "env", "global"])
7823
7882
  }, this.measureTextMethod = "native", this.optimizeVisible = !1;
7824
7883
  }
7884
+ _nativeAddEventListener(type, listener, options) {
7885
+ return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
7886
+ }
7887
+ _nativeRemoveEventListener(type, listener, options) {
7888
+ return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
7889
+ }
7890
+ _nativeDispatchEvent(event) {
7891
+ return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
7892
+ }
7825
7893
  bindContribution(params) {
7826
7894
  const promiseArr = [];
7827
7895
  if (this.contributions.getContributions().forEach(contribution => {
@@ -7862,15 +7930,6 @@
7862
7930
  releaseCanvas(canvas) {
7863
7931
  return this._env || this.setEnv("browser"), this.envContribution.releaseCanvas(canvas);
7864
7932
  }
7865
- addEventListener(type, listener, options) {
7866
- return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
7867
- }
7868
- removeEventListener(type, listener, options) {
7869
- return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
7870
- }
7871
- dispatchEvent(event) {
7872
- return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
7873
- }
7874
7933
  getRequestAnimationFrame() {
7875
7934
  return this._env || this.setEnv("browser"), this.envContribution.getRequestAnimationFrame();
7876
7935
  }
@@ -10920,7 +10979,7 @@
10920
10979
  };
10921
10980
  const VWindow = Symbol.for("VWindow");
10922
10981
  const WindowHandlerContribution = Symbol.for("WindowHandlerContribution");
10923
- let DefaultWindow = class {
10982
+ let DefaultWindow = class extends EventListenerManager {
10924
10983
  get width() {
10925
10984
  if (this._handler) {
10926
10985
  const wh = this._handler.getWH();
@@ -10939,7 +10998,7 @@
10939
10998
  return this._handler.getDpr();
10940
10999
  }
10941
11000
  constructor() {
10942
- this.hooks = {
11001
+ super(), this.hooks = {
10943
11002
  onChange: new SyncHook(["x", "y", "width", "height"])
10944
11003
  }, this.active = () => {
10945
11004
  const global = this.global;
@@ -10947,6 +11006,15 @@
10947
11006
  container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
10948
11007
  }, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
10949
11008
  }
11009
+ _nativeAddEventListener(type, listener, options) {
11010
+ return this._handler.addEventListener(type, listener, options);
11011
+ }
11012
+ _nativeRemoveEventListener(type, listener, options) {
11013
+ return this._handler.removeEventListener(type, listener, options);
11014
+ }
11015
+ _nativeDispatchEvent(event) {
11016
+ return this._handler.dispatchEvent(event);
11017
+ }
10950
11018
  postInit() {
10951
11019
  this.global.hooks.onSetEnv.tap("window", this.active), this.active();
10952
11020
  }
@@ -10986,7 +11054,7 @@
10986
11054
  throw new Error("暂不支持");
10987
11055
  }
10988
11056
  release() {
10989
- return this.global.hooks.onSetEnv.unTap("window", this.active), this._handler.releaseWindow();
11057
+ return this.global.hooks.onSetEnv.unTap("window", this.active), this.clearAllEventListeners(), this._handler.releaseWindow();
10990
11058
  }
10991
11059
  getContext() {
10992
11060
  return this._handler.getContext();
@@ -10997,15 +11065,6 @@
10997
11065
  getImageBuffer(type) {
10998
11066
  return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
10999
11067
  }
11000
- addEventListener(type, listener, options) {
11001
- return this._handler.addEventListener(type, listener, options);
11002
- }
11003
- removeEventListener(type, listener, options) {
11004
- return this._handler.removeEventListener(type, listener, options);
11005
- }
11006
- dispatchEvent(event) {
11007
- return this._handler.dispatchEvent(event);
11008
- }
11009
11068
  getBoundingClientRect() {
11010
11069
  return this._handler.getBoundingClientRect();
11011
11070
  }
@@ -12214,19 +12273,17 @@
12214
12273
  globalObj: globalObj,
12215
12274
  domElement: domElement
12216
12275
  } = this;
12217
- 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, {
12276
+ 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, {
12218
12277
  capture: !0
12219
12278
  }), this.eventsAdded = !0;
12220
12279
  }
12221
12280
  removeEvents() {
12222
- var _a;
12223
12281
  if (!this.eventsAdded || !this.domElement) return;
12224
12282
  const {
12225
- globalObj: globalObj,
12226
- domElement: domElement
12227
- } = this,
12228
- globalDocument = null !== (_a = globalObj.getDocument()) && void 0 !== _a ? _a : domElement;
12229
- 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;
12283
+ globalObj: globalObj,
12284
+ domElement: domElement
12285
+ } = this;
12286
+ 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;
12230
12287
  }
12231
12288
  mapToViewportPoint(event) {
12232
12289
  return this.domElement.pointTransform ? this.domElement.pointTransform(event.x, event.y) : event;
@@ -18793,6 +18850,9 @@
18793
18850
  init(contributions) {
18794
18851
  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));
18795
18852
  }
18853
+ reInit() {
18854
+ this.init(this.graphicRenderContributions);
18855
+ }
18796
18856
  beforeRenderStep(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, params) {
18797
18857
  this._beforeRenderContribitions && this._beforeRenderContribitions.forEach(c => {
18798
18858
  if (c.supportedAppName && graphic.stage && graphic.stage.params && graphic.stage.params.context && graphic.stage.params.context.appName) {
@@ -18962,8 +19022,8 @@
18962
19022
  };
18963
19023
  };
18964
19024
  let DefaultCanvasArcRender = class extends BaseRender {
18965
- constructor(arcRenderContribitions) {
18966
- super(), this.arcRenderContribitions = arcRenderContribitions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(arcRenderContribitions);
19025
+ constructor(graphicRenderContributions) {
19026
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(graphicRenderContributions);
18967
19027
  }
18968
19028
  drawArcTailCapPath(arc, context, cx, cy, outerRadius, innerRadius, _sa, _ea) {
18969
19029
  const capAngle = _ea - _sa,
@@ -19134,8 +19194,8 @@
19134
19194
  };
19135
19195
  };
19136
19196
  let DefaultCanvasCircleRender = class extends BaseRender {
19137
- constructor(circleRenderContribitions) {
19138
- super(), this.circleRenderContribitions = circleRenderContribitions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(circleRenderContribitions);
19197
+ constructor(graphicRenderContributions) {
19198
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(graphicRenderContributions);
19139
19199
  }
19140
19200
  drawShape(circle, context, x, y, drawContext, params, fillCb, strokeCb) {
19141
19201
  const circleAttribute = getTheme$1(circle, null == params ? void 0 : params.theme).circle,
@@ -19521,8 +19581,8 @@
19521
19581
  };
19522
19582
  };
19523
19583
  let DefaultCanvasAreaRender = class extends BaseRender {
19524
- constructor(areaRenderContribitions) {
19525
- super(), this.areaRenderContribitions = areaRenderContribitions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(areaRenderContribitions);
19584
+ constructor(graphicRenderContributions) {
19585
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(graphicRenderContributions);
19526
19586
  }
19527
19587
  drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
19528
19588
  var _a, _b, _c;
@@ -19765,8 +19825,8 @@
19765
19825
  };
19766
19826
  };
19767
19827
  let DefaultCanvasPathRender = class extends BaseRender {
19768
- constructor(pathRenderContribitions) {
19769
- super(), this.pathRenderContribitions = pathRenderContribitions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(pathRenderContribitions);
19828
+ constructor(graphicRenderContributions) {
19829
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(graphicRenderContributions);
19770
19830
  }
19771
19831
  drawShape(path, context, x, y, drawContext, params, fillCb, strokeCb) {
19772
19832
  var _a, _b, _c;
@@ -19821,8 +19881,8 @@
19821
19881
  };
19822
19882
  };
19823
19883
  let DefaultCanvasRectRender = class extends BaseRender {
19824
- constructor(rectRenderContribitions) {
19825
- super(), this.rectRenderContribitions = rectRenderContribitions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(rectRenderContribitions);
19884
+ constructor(graphicRenderContributions) {
19885
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(graphicRenderContributions);
19826
19886
  }
19827
19887
  drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb, rectAttribute) {
19828
19888
  rectAttribute = null != rectAttribute ? rectAttribute : getTheme$1(rect, null == params ? void 0 : params.theme).rect;
@@ -19891,8 +19951,8 @@
19891
19951
  };
19892
19952
  };
19893
19953
  let DefaultCanvasSymbolRender = class extends BaseRender {
19894
- constructor(symbolRenderContribitions) {
19895
- super(), this.symbolRenderContribitions = symbolRenderContribitions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(symbolRenderContribitions);
19954
+ constructor(graphicRenderContributions) {
19955
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
19896
19956
  }
19897
19957
  drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb, symbolAttribute) {
19898
19958
  var _a;
@@ -20062,8 +20122,8 @@
20062
20122
  };
20063
20123
  };
20064
20124
  let DefaultCanvasTextRender = class extends BaseRender {
20065
- constructor(textRenderContribitions) {
20066
- super(), this.textRenderContribitions = textRenderContribitions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(textRenderContribitions);
20125
+ constructor(graphicRenderContributions) {
20126
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(graphicRenderContributions);
20067
20127
  }
20068
20128
  drawShape(text, context, x, y, drawContext, params, fillCb, strokeCb) {
20069
20129
  var _a, _b, _c;
@@ -20267,8 +20327,8 @@
20267
20327
  };
20268
20328
  };
20269
20329
  let DefaultCanvasPolygonRender = class extends BaseRender {
20270
- constructor(polygonRenderContribitions) {
20271
- super(), this.polygonRenderContribitions = polygonRenderContribitions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(polygonRenderContribitions);
20330
+ constructor(graphicRenderContributions) {
20331
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
20272
20332
  }
20273
20333
  drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
20274
20334
  const polygonAttribute = getTheme$1(polygon, null == params ? void 0 : params.theme).polygon,
@@ -20323,6 +20383,9 @@
20323
20383
  constructor(groupRenderContribitions) {
20324
20384
  this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
20325
20385
  }
20386
+ reInit() {
20387
+ this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution);
20388
+ }
20326
20389
  drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb, groupAttribute) {
20327
20390
  const {
20328
20391
  clip: clip,
@@ -20465,8 +20528,8 @@
20465
20528
  };
20466
20529
  const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
20467
20530
  let DefaultCanvasImageRender = class extends BaseRender {
20468
- constructor(imageRenderContribitions) {
20469
- super(), this.imageRenderContribitions = imageRenderContribitions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(imageRenderContribitions);
20531
+ constructor(graphicRenderContributions) {
20532
+ super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(graphicRenderContributions);
20470
20533
  }
20471
20534
  drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
20472
20535
  const imageAttribute = getTheme$1(image).image,
@@ -20791,6 +20854,9 @@
20791
20854
  afterDraw(params) {
20792
20855
  this.drawContribution.afterDraw && this.drawContribution.afterDraw(this, Object.assign({}, this.drawParams));
20793
20856
  }
20857
+ reInit() {
20858
+ this.drawContribution.reInit();
20859
+ }
20794
20860
  render(groups, params) {
20795
20861
  this.renderTreeRoots = groups, this.drawParams = params;
20796
20862
  const updateBounds = params.updateBounds;
@@ -21199,6 +21265,11 @@
21199
21265
  }, !1, !!(null === (_a = drawContext.context) || void 0 === _a ? void 0 : _a.camera));
21200
21266
  }, 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();
21201
21267
  }
21268
+ reInit() {
21269
+ this.init(), this.contributions.forEach(item => {
21270
+ item.reInit();
21271
+ });
21272
+ }
21202
21273
  init() {
21203
21274
  this.contributions.forEach(item => {
21204
21275
  if (item.style) {
@@ -22334,6 +22405,9 @@
22334
22405
  getPickerService() {
22335
22406
  return this.pickerService || (this.pickerService = container.get(PickerService)), this.pickerService;
22336
22407
  }
22408
+ reInit() {
22409
+ this.renderService.reInit(), this.pickerService.reInit();
22410
+ }
22337
22411
  }
22338
22412
 
22339
22413
  var __decorate$11 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
@@ -22519,6 +22593,9 @@
22519
22593
  constructor(pickItemInterceptorContributions, pickServiceInterceptorContributions) {
22520
22594
  this.pickItemInterceptorContributions = pickItemInterceptorContributions, this.pickServiceInterceptorContributions = pickServiceInterceptorContributions, this.type = "default", this.global = application.global;
22521
22595
  }
22596
+ reInit() {
22597
+ this._init();
22598
+ }
22522
22599
  _init() {
22523
22600
  this.InterceptorContributions = this.pickItemInterceptorContributions.getContributions().sort((a, b) => a.order - b.order), this.pickerServiceInterceptorContributions = this.pickServiceInterceptorContributions.getContributions().sort((a, b) => a.order - b.order);
22524
22601
  }
@@ -23199,6 +23276,7 @@
23199
23276
  constructor() {
23200
23277
  this.numberType = GLYPH_NUMBER_TYPE;
23201
23278
  }
23279
+ reInit() {}
23202
23280
  drawShape(glyph, context, x, y, drawContext, params, fillCb, strokeCb) {
23203
23281
  drawContext.drawContribution && glyph.getSubGraphic().forEach(item => {
23204
23282
  const renderer = drawContext.drawContribution.getRenderContribution(item);
@@ -28829,7 +28907,9 @@
28829
28907
  loadScrollbarComponent();
28830
28908
  let ScrollBar$1 = class ScrollBar extends AbstractComponent {
28831
28909
  constructor(attributes, options) {
28832
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, ScrollBar.defaultAttributes, attributes)), this.name = "scrollbar", this._onRailPointerDown = e => {
28910
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, ScrollBar.defaultAttributes, attributes)), this.name = "scrollbar", this._handleTouchMove = e => {
28911
+ isValid$1(this._prePos) && e.preventDefault();
28912
+ }, this._onRailPointerDown = e => {
28833
28913
  const {
28834
28914
  viewX: viewX,
28835
28915
  viewY: viewY
@@ -28873,8 +28953,7 @@
28873
28953
  const triggers = getEndTriggersOfDrag(),
28874
28954
  obj = "browser" === vglobal.env ? vglobal : this.stage;
28875
28955
  obj.addEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
28876
- capture: !0,
28877
- passive: !0
28956
+ capture: !0
28878
28957
  }), triggers.forEach(trigger => {
28879
28958
  obj.addEventListener(trigger, this._onSliderPointerUp);
28880
28959
  });
@@ -28895,7 +28974,6 @@
28895
28974
  } = this.getSliderRenderBounds();
28896
28975
  return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos, currentScrollValue = delta / height) : (currentPos = x, delta = currentPos - this._prePos, currentScrollValue = delta / width), [currentPos, currentScrollValue];
28897
28976
  }, this._onSliderPointerMove = e => {
28898
- e.preventDefault();
28899
28977
  const {
28900
28978
  stopSliderMovePropagation = !0
28901
28979
  } = this.attribute;
@@ -28911,7 +28989,7 @@
28911
28989
  preScrollRange = this.getScrollRange(),
28912
28990
  [currentPos, currentScrollValue] = this._computeScrollValue(e),
28913
28991
  range = [preScrollRange[0] + currentScrollValue, preScrollRange[1] + currentScrollValue];
28914
- this._dispatchEvent(SCROLLBAR_END_EVENT$1, {
28992
+ this._prePos = null, this._dispatchEvent(SCROLLBAR_END_EVENT$1, {
28915
28993
  pre: preRange,
28916
28994
  value: clampRange$1(range, limitRange[0], limitRange[1])
28917
28995
  }), this._clearDragEvents();
@@ -28953,7 +29031,9 @@
28953
29031
  delayType = "throttle",
28954
29032
  delayTime = 0
28955
29033
  } = this.attribute;
28956
- this._rail && this._rail.addEventListener("pointerdown", delayMap$3[delayType](this._onRailPointerDown, delayTime)), this._slider && this._slider.addEventListener("pointerdown", this._onSliderPointerDown);
29034
+ this._rail && this._rail.addEventListener("pointerdown", delayMap$3[delayType](this._onRailPointerDown, delayTime)), this._slider && this._slider.addEventListener("pointerdown", this._onSliderPointerDown), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
29035
+ passive: !1
29036
+ });
28957
29037
  }
28958
29038
  render() {
28959
29039
  this._reset();
@@ -29067,8 +29147,7 @@
29067
29147
  const triggers = getEndTriggersOfDrag(),
29068
29148
  obj = "browser" === vglobal.env ? vglobal : this.stage;
29069
29149
  obj.removeEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
29070
- capture: !0,
29071
- passive: !1
29150
+ capture: !0
29072
29151
  }), triggers.forEach(trigger => {
29073
29152
  obj.removeEventListener(trigger, this._onSliderPointerUp);
29074
29153
  });
@@ -29076,6 +29155,11 @@
29076
29155
  _reset() {
29077
29156
  this._sliderRenderBounds = null, this._sliderLimitRange = null;
29078
29157
  }
29158
+ release(all) {
29159
+ super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
29160
+ passive: !1
29161
+ }), this._clearDragEvents();
29162
+ }
29079
29163
  };
29080
29164
  ScrollBar$1.defaultAttributes = {
29081
29165
  direction: "horizontal",
@@ -33703,6 +33787,9 @@
33703
33787
  isValidNumber$1(lastClipRange * this.clipRange) && (this.clipRange *= lastClipRange);
33704
33788
  }
33705
33789
  onUpdate(end, ratio, out) {
33790
+ if (end) return Object.keys(this.to).forEach(k => {
33791
+ this.target.attribute[k] = this.to[k];
33792
+ }), this.target.addUpdatePositionTag(), void this.target.addUpdateShapeAndBoundsTag();
33706
33793
  if (this.points = this.points.map((point, index) => {
33707
33794
  const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
33708
33795
  return newPoint.context = point.context, newPoint;
@@ -41356,7 +41443,6 @@
41356
41443
  evtTarget.addEventListener(trigger, this._onHandlerPointerUp);
41357
41444
  });
41358
41445
  }, this._pointerMove = e => {
41359
- e.preventDefault();
41360
41446
  const {
41361
41447
  start: startAttr,
41362
41448
  end: endAttr,
@@ -44925,14 +45011,13 @@
44925
45011
  const triggers = getEndTriggersOfDrag(),
44926
45012
  obj = "browser" === vglobal.env ? vglobal : this.stage;
44927
45013
  obj.addEventListener("pointermove", this._onHandlerPointerMove, {
44928
- capture: !0,
44929
- passive: !1
45014
+ capture: !0
44930
45015
  }), triggers.forEach(trigger => {
44931
45016
  obj.addEventListener(trigger, this._onHandlerPointerUp);
44932
45017
  });
44933
45018
  }, this._onHandlerPointerMove = e => {
44934
45019
  var _a, _b;
44935
- e.preventDefault(), this._isChanging = !0;
45020
+ this._isChanging = !0;
44936
45021
  const {
44937
45022
  railWidth: railWidth,
44938
45023
  railHeight: railHeight,
@@ -44966,13 +45051,12 @@
44966
45051
  const triggers = getEndTriggersOfDrag(),
44967
45052
  obj = "browser" === vglobal.env ? vglobal : this.stage;
44968
45053
  obj.addEventListener("pointermove", this._onTrackPointerMove, {
44969
- capture: !0,
44970
- passive: !1
45054
+ capture: !0
44971
45055
  }), triggers.forEach(trigger => {
44972
45056
  obj.addEventListener(trigger, this._onTrackPointerUp);
44973
45057
  });
44974
45058
  }, this._onTrackPointerMove = e => {
44975
- e.preventDefault(), this._isChanging = !0;
45059
+ this._isChanging = !0;
44976
45060
  const {
44977
45061
  railWidth: railWidth,
44978
45062
  railHeight: railHeight,
@@ -45347,13 +45431,11 @@
45347
45431
  const triggers = getEndTriggersOfDrag(),
45348
45432
  obj = "browser" === vglobal.env ? vglobal : this.stage;
45349
45433
  obj.removeEventListener("pointermove", this._onHandlerPointerMove, {
45350
- capture: !0,
45351
- passive: !1
45434
+ capture: !0
45352
45435
  }), triggers.forEach(trigger => {
45353
45436
  obj.removeEventListener(trigger, this._onHandlerPointerUp);
45354
45437
  }), obj.removeEventListener("pointermove", this._onTrackPointerMove, {
45355
- capture: !0,
45356
- passive: !1
45438
+ capture: !0
45357
45439
  }), triggers.forEach(trigger => {
45358
45440
  obj.removeEventListener(trigger, this._onTrackPointerUp);
45359
45441
  });
@@ -49122,11 +49204,20 @@
49122
49204
  const mosaicStackData = {
49123
49205
  key: `${stackCache.groupField}`,
49124
49206
  values: groupValues.map(group => {
49207
+ var _a, _b;
49125
49208
  const groupValues = stackCache.nodes[group];
49209
+ let value;
49210
+ if (s.bandWidthField) {
49211
+ value =
49212
+ (_b = (_a = groupValues.values.find(v => isValid$1(v[s.bandWidthField]))) === null || _a === void 0 ? void 0 : _a[s.bandWidthField]) !== null && _b !== void 0 ? _b : groupValues.total;
49213
+ }
49214
+ else {
49215
+ value = groupValues.total;
49216
+ }
49126
49217
  return {
49127
49218
  groupValue: group,
49128
- value: groupValues.total,
49129
- end: groupValues.total
49219
+ value,
49220
+ end: value
49130
49221
  };
49131
49222
  })
49132
49223
  };
@@ -54574,12 +54665,9 @@
54574
54665
  });
54575
54666
  return this.runTransforms(transforms, data);
54576
54667
  }
54577
- _runMainTasks() {
54668
+ renderInner() {
54578
54669
  var _a, _b, _c;
54579
- if (!this.getVisible() ||
54580
- (this._skipBeforeLayouted && this.getCompiler().getLayoutState() === LayoutState.before)) {
54581
- return;
54582
- }
54670
+ this._updateEncoderByState();
54583
54671
  const data = (_b = (_a = this._data) === null || _a === void 0 ? void 0 : _a.getProduct()) !== null && _b !== void 0 ? _b : [{}];
54584
54672
  const transformData = this._runBeforeTransform(data);
54585
54673
  let markData;
@@ -54613,10 +54701,12 @@
54613
54701
  this._updateAttrsOfGroup();
54614
54702
  }
54615
54703
  render() {
54616
- if (this._isCommited) {
54617
- this._updateEncoderByState();
54618
- log(`render mark: ${this.getProductId()}, type is ${this.type}`);
54619
- this._runMainTasks();
54704
+ if (this.isCommited()) {
54705
+ if (this.getVisible() &&
54706
+ (!this._skipBeforeLayouted || this.getCompiler().getLayoutState() !== LayoutState.before)) {
54707
+ log(`render mark: ${this.getProductId()}, type is ${this.type}`);
54708
+ this.renderInner();
54709
+ }
54620
54710
  this.uncommit();
54621
54711
  }
54622
54712
  }
@@ -54902,9 +54992,6 @@
54902
54992
  const style = (_a = this._simpleStyle) !== null && _a !== void 0 ? _a : this.getAttributesOfState({});
54903
54993
  this._product.context = Object.assign(Object.assign({}, this._product.context), this._getCommonContext());
54904
54994
  this._product.setAttributes(this._getAttrsFromConfig(style));
54905
- if (this.getCompiler().getLayoutState() !== LayoutState.before) {
54906
- this._runStateAnimation(this.getGraphics());
54907
- }
54908
54995
  }
54909
54996
  render() {
54910
54997
  if (this._isCommited) {
@@ -55927,7 +56014,7 @@
55927
56014
  this._updateCurrentTheme();
55928
56015
  this._currentSize = this.getCurrentSize();
55929
56016
  const pluginList = [];
55930
- if (!poptip !== false) {
56017
+ if (poptip !== false) {
55931
56018
  pluginList.push('poptipForText');
55932
56019
  }
55933
56020
  if (spec.type === "sankey") {
@@ -57132,7 +57219,7 @@
57132
57219
  });
57133
57220
  };
57134
57221
 
57135
- const version = "2.0.0-alpha.2";
57222
+ const version = "2.0.0-alpha.3";
57136
57223
 
57137
57224
  const addVChartProperty = (data, op) => {
57138
57225
  const context = op.beforeCall();
@@ -61403,14 +61490,6 @@
61403
61490
  model: this.model
61404
61491
  });
61405
61492
  }
61406
- render() {
61407
- if (!this._isCommited) {
61408
- return;
61409
- }
61410
- log(`render mark: ${this.getProductId()}, type is ${this.type}`);
61411
- this.renderInner();
61412
- this.uncommit();
61413
- }
61414
61493
  release() {
61415
61494
  super.release();
61416
61495
  this.removeProduct();
@@ -86599,11 +86678,14 @@
86599
86678
  this.type = exports.SeriesTypeEnum.mosaic;
86600
86679
  this.transformerConstructor = BarSeriesSpecTransformer;
86601
86680
  }
86681
+ get bandWidthField() {
86682
+ return this._bandWidthField;
86683
+ }
86602
86684
  getStack() {
86603
86685
  return true;
86604
86686
  }
86605
86687
  getPercent() {
86606
- return !!this.getSeriesField();
86688
+ return this._spec.percent;
86607
86689
  }
86608
86690
  getGroupFields() {
86609
86691
  return this.direction === 'vertical' ? this._specXField : this._specYField;
@@ -86627,6 +86709,9 @@
86627
86709
  this.setFieldX(MOSAIC_CAT_END_PERCENT);
86628
86710
  this.setFieldX2(MOSAIC_CAT_START_PERCENT);
86629
86711
  }
86712
+ if (this._spec.bandWidthField) {
86713
+ this._bandWidthField = this._spec.bandWidthField;
86714
+ }
86630
86715
  }
86631
86716
  parseLabelStyle(labelStyle, labelSpec) {
86632
86717
  if ((labelSpec === null || labelSpec === void 0 ? void 0 : labelSpec.filterByGroup) && isNil$1(labelStyle.dataFilter)) {
@@ -90217,18 +90302,17 @@
90217
90302
  if (!this._needInitEventOfTooltip) {
90218
90303
  return;
90219
90304
  }
90220
- const container = (_b = (_a = this.tooltipHandler).getTooltipContainer) === null || _b === void 0 ? void 0 : _b.call(_a);
90221
- const element = container === null || container === void 0 ? void 0 : container.firstChild;
90222
- if (element) {
90223
- element.addEventListener('pointerenter', () => {
90305
+ const container = (_b = (_a = this.tooltipHandler).getRootDom) === null || _b === void 0 ? void 0 : _b.call(_a);
90306
+ if (container) {
90307
+ container.addEventListener('pointerenter', () => {
90224
90308
  var _a;
90225
90309
  if (!this._enterable) {
90226
90310
  return;
90227
90311
  }
90228
90312
  this._isEnterTooltip = true;
90229
- const rect = (_a = element.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(element);
90313
+ const rect = (_a = container.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(container);
90230
90314
  if (rect) {
90231
- this._cacheEnterableRect = { x: rect.x, y: rect.y, width: rect.width, height: rect.height };
90315
+ this._cacheEnterableRect = { width: rect.width, height: rect.height };
90232
90316
  }
90233
90317
  if (this._outTimer) {
90234
90318
  clearTimeout(this._outTimer);
@@ -90239,14 +90323,14 @@
90239
90323
  this._showTimer = null;
90240
90324
  }
90241
90325
  });
90242
- element.addEventListener('pointerleave', () => {
90326
+ container.addEventListener('pointerleave', () => {
90243
90327
  var _a, _b, _c;
90244
90328
  if (!this._enterable) {
90245
90329
  return;
90246
90330
  }
90247
90331
  this._isEnterTooltip = false;
90248
90332
  if (this._cacheEnterableRect) {
90249
- const newRect = (_a = element.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(element);
90333
+ const newRect = (_a = container.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(container);
90250
90334
  if (newRect &&
90251
90335
  Object.keys(this._cacheEnterableRect).every(k => this._cacheEnterableRect[k] === newRect[k])) {
90252
90336
  this._cacheEnterableRect = null;
@@ -91579,6 +91663,7 @@
91579
91663
  const { stateField, valueField } = op.output;
91580
91664
  const resultObj = {};
91581
91665
  const resultData = [];
91666
+ const stateValues = [];
91582
91667
  dataCollection.forEach((dv, i) => {
91583
91668
  var _a;
91584
91669
  if (isNil$1(stateFields[i])) {
@@ -91587,13 +91672,17 @@
91587
91672
  const stateFieldInfo = (_a = dv.getFields()) === null || _a === void 0 ? void 0 : _a[stateFields[i]];
91588
91673
  if (stateFieldInfo && stateFieldInfo.lockStatisticsByDomain) {
91589
91674
  stateFieldInfo.domain.forEach((d) => {
91590
- resultObj[d] = 0;
91675
+ if (isNil$1(resultObj[d])) {
91676
+ stateValues.push(d);
91677
+ resultObj[d] = 0;
91678
+ }
91591
91679
  });
91592
91680
  }
91593
91681
  dv.latestData.forEach((d) => {
91594
91682
  array(stateFields[i]).forEach(state => {
91595
91683
  if (!isNil$1(d[state])) {
91596
91684
  if (isNil$1(resultObj[d[state]])) {
91685
+ stateValues.push(d[state]);
91597
91686
  resultObj[d[state]] = 0;
91598
91687
  }
91599
91688
  if (!isNil$1(valueFields[i])) {
@@ -91603,10 +91692,10 @@
91603
91692
  });
91604
91693
  });
91605
91694
  });
91606
- Object.keys(resultObj).forEach((d, i) => {
91607
- const res = { [stateField]: d };
91695
+ stateValues.forEach(state => {
91696
+ const res = { [stateField]: state };
91608
91697
  if (valueField) {
91609
- res[valueField] = resultObj[d];
91698
+ res[valueField] = resultObj[state];
91610
91699
  }
91611
91700
  resultData.push(res);
91612
91701
  });
@@ -98281,6 +98370,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98281
98370
  this._rootDom.style.visibility = _value ? 'visible' : 'hidden';
98282
98371
  }
98283
98372
  }
98373
+ getRootDom() {
98374
+ return this._rootDom;
98375
+ }
98284
98376
  constructor() {
98285
98377
  super(DomTooltipHandler.type);
98286
98378
  this.type = TooltipHandlerType.dom;
@@ -99620,7 +99712,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
99620
99712
  'barBackground',
99621
99713
  'barMinHeight',
99622
99714
  'stackCornerRadius',
99623
- 'bar'
99715
+ 'bar',
99716
+ 'bandWidthField'
99624
99717
  ]);
99625
99718
  }
99626
99719
  transformSpec(spec) {