@visactor/vchart 1.12.1 → 1.12.2-alpha.1

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 (133) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +648 -200
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/compile/compilable-base.js +1 -2
  6. package/cjs/compile/util.js +2 -1
  7. package/cjs/component/axis/base-axis.d.ts +1 -1
  8. package/cjs/component/axis/base-axis.js +5 -3
  9. package/cjs/component/axis/base-axis.js.map +1 -1
  10. package/cjs/component/axis/cartesian/axis.d.ts +4 -2
  11. package/cjs/component/axis/cartesian/axis.js +26 -10
  12. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  13. package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
  14. package/cjs/component/axis/cartesian/linear-axis.d.ts +5 -1
  15. package/cjs/component/axis/cartesian/linear-axis.js +34 -1
  16. package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
  17. package/cjs/component/axis/interface/common.js.map +1 -1
  18. package/cjs/component/axis/interface/spec.d.ts +5 -1
  19. package/cjs/component/axis/interface/spec.js.map +1 -1
  20. package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +5 -0
  21. package/cjs/component/axis/mixin/linear-axis-mixin.js +47 -13
  22. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  23. package/cjs/component/axis/mixin/util/break-data.d.ts +4 -0
  24. package/cjs/component/axis/mixin/util/break-data.js +39 -0
  25. package/cjs/component/axis/mixin/util/break-data.js.map +1 -0
  26. package/cjs/component/brush/brush.js +4 -1
  27. package/cjs/component/brush/brush.js.map +1 -1
  28. package/cjs/component/data-zoom/data-filter-base-component.js +9 -7
  29. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  30. package/cjs/component/data-zoom/data-zoom/data-zoom.js +1 -1
  31. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  32. package/cjs/component/data-zoom/util.js +3 -2
  33. package/cjs/component/data-zoom/util.js.map +1 -1
  34. package/cjs/core/index.d.ts +1 -1
  35. package/cjs/core/index.js +1 -1
  36. package/cjs/core/index.js.map +1 -1
  37. package/cjs/data/transforms/legend-data/continuous/continuous.js +1 -1
  38. package/cjs/data/transforms/legend-data/continuous/continuous.js.map +1 -1
  39. package/cjs/event/events/dimension/util/cartesian.js +2 -4
  40. package/cjs/event/events/dimension/util/cartesian.js.map +1 -1
  41. package/cjs/mark/base/base-mark.js +5 -1
  42. package/cjs/mark/base/base-mark.js.map +1 -1
  43. package/cjs/plugin/components/axis-sync/tick-align-transform.js +3 -3
  44. package/cjs/plugin/components/axis-sync/tick-align-transform.js.map +1 -1
  45. package/cjs/plugin/components/axis-sync/zero-align-transform.js +5 -3
  46. package/cjs/plugin/components/axis-sync/zero-align-transform.js.map +1 -1
  47. package/cjs/series/circle-packing/circle-packing.d.ts +1 -0
  48. package/cjs/series/circle-packing/circle-packing.js +3 -0
  49. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  50. package/cjs/series/interface/series.d.ts +1 -0
  51. package/cjs/series/interface/series.js.map +1 -1
  52. package/cjs/series/sankey/sankey.d.ts +1 -0
  53. package/cjs/series/sankey/sankey.js +3 -0
  54. package/cjs/series/sankey/sankey.js.map +1 -1
  55. package/cjs/series/sunburst/sunburst.d.ts +1 -0
  56. package/cjs/series/sunburst/sunburst.js +3 -0
  57. package/cjs/series/sunburst/sunburst.js.map +1 -1
  58. package/cjs/series/treemap/tooltip-helper.d.ts +6 -1
  59. package/cjs/series/treemap/tooltip-helper.js +12 -1
  60. package/cjs/series/treemap/tooltip-helper.js.map +1 -1
  61. package/cjs/series/treemap/treemap.d.ts +7 -1
  62. package/cjs/series/treemap/treemap.js +17 -9
  63. package/cjs/series/treemap/treemap.js.map +1 -1
  64. package/cjs/series/word-cloud/base.js +3 -3
  65. package/cjs/series/word-cloud/base.js.map +1 -1
  66. package/cjs/util/array.d.ts +1 -0
  67. package/cjs/util/array.js +11 -2
  68. package/cjs/util/array.js.map +1 -1
  69. package/esm/compile/compilable-base.js +1 -2
  70. package/esm/compile/util.js +2 -1
  71. package/esm/component/axis/base-axis.d.ts +1 -1
  72. package/esm/component/axis/base-axis.js +6 -2
  73. package/esm/component/axis/base-axis.js.map +1 -1
  74. package/esm/component/axis/cartesian/axis.d.ts +4 -2
  75. package/esm/component/axis/cartesian/axis.js +25 -10
  76. package/esm/component/axis/cartesian/axis.js.map +1 -1
  77. package/esm/component/axis/cartesian/interface/common.js.map +1 -1
  78. package/esm/component/axis/cartesian/linear-axis.d.ts +5 -1
  79. package/esm/component/axis/cartesian/linear-axis.js +37 -1
  80. package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
  81. package/esm/component/axis/interface/common.js.map +1 -1
  82. package/esm/component/axis/interface/spec.d.ts +5 -1
  83. package/esm/component/axis/interface/spec.js.map +1 -1
  84. package/esm/component/axis/mixin/linear-axis-mixin.d.ts +5 -0
  85. package/esm/component/axis/mixin/linear-axis-mixin.js +48 -14
  86. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  87. package/esm/component/axis/mixin/util/break-data.d.ts +4 -0
  88. package/esm/component/axis/mixin/util/break-data.js +31 -0
  89. package/esm/component/axis/mixin/util/break-data.js.map +1 -0
  90. package/esm/component/brush/brush.js +2 -2
  91. package/esm/component/brush/brush.js.map +1 -1
  92. package/esm/component/data-zoom/data-filter-base-component.js +6 -6
  93. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  94. package/esm/component/data-zoom/data-zoom/data-zoom.js +2 -2
  95. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  96. package/esm/component/data-zoom/util.js +3 -1
  97. package/esm/component/data-zoom/util.js.map +1 -1
  98. package/esm/core/index.d.ts +1 -1
  99. package/esm/core/index.js +1 -1
  100. package/esm/core/index.js.map +1 -1
  101. package/esm/data/transforms/legend-data/continuous/continuous.js +1 -1
  102. package/esm/data/transforms/legend-data/continuous/continuous.js.map +1 -1
  103. package/esm/event/events/dimension/util/cartesian.js +2 -4
  104. package/esm/event/events/dimension/util/cartesian.js.map +1 -1
  105. package/esm/mark/base/base-mark.js +5 -1
  106. package/esm/mark/base/base-mark.js.map +1 -1
  107. package/esm/plugin/components/axis-sync/tick-align-transform.js +4 -2
  108. package/esm/plugin/components/axis-sync/tick-align-transform.js.map +1 -1
  109. package/esm/plugin/components/axis-sync/zero-align-transform.js +4 -4
  110. package/esm/plugin/components/axis-sync/zero-align-transform.js.map +1 -1
  111. package/esm/series/circle-packing/circle-packing.d.ts +1 -0
  112. package/esm/series/circle-packing/circle-packing.js +3 -0
  113. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  114. package/esm/series/interface/series.d.ts +1 -0
  115. package/esm/series/interface/series.js.map +1 -1
  116. package/esm/series/sankey/sankey.d.ts +1 -0
  117. package/esm/series/sankey/sankey.js +4 -1
  118. package/esm/series/sankey/sankey.js.map +1 -1
  119. package/esm/series/sunburst/sunburst.d.ts +1 -0
  120. package/esm/series/sunburst/sunburst.js +3 -0
  121. package/esm/series/sunburst/sunburst.js.map +1 -1
  122. package/esm/series/treemap/tooltip-helper.d.ts +6 -1
  123. package/esm/series/treemap/tooltip-helper.js +12 -1
  124. package/esm/series/treemap/tooltip-helper.js.map +1 -1
  125. package/esm/series/treemap/treemap.d.ts +7 -1
  126. package/esm/series/treemap/treemap.js +18 -10
  127. package/esm/series/treemap/treemap.js.map +1 -1
  128. package/esm/series/word-cloud/base.js +3 -3
  129. package/esm/series/word-cloud/base.js.map +1 -1
  130. package/esm/util/array.d.ts +1 -0
  131. package/esm/util/array.js +9 -0
  132. package/esm/util/array.js.map +1 -1
  133. package/package.json +6 -6
package/build/index.js CHANGED
@@ -18,7 +18,7 @@
18
18
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
- function __rest$7(s, e) {
21
+ function __rest$d(s, e) {
22
22
  var t = {};
23
23
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
24
24
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
@@ -11333,7 +11333,7 @@
11333
11333
  federatedEvent = this.bootstrapEvent(this.rootPointerEvent, nativeEvent);
11334
11334
  this.manager.mapEvent(federatedEvent);
11335
11335
  }
11336
- this.setCursor(this.manager.cursor, this.manager.cursorTarget);
11336
+ this.setCursor(this.manager.cursor, this.manager.cursorTarget), this.rootPointerEvent.nativeEvent = null;
11337
11337
  }, this.onPointerMove = nativeEvent => {
11338
11338
  if (this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
11339
11339
  if (this.isEventOutsideOfTargetElement(nativeEvent)) return;
@@ -11342,7 +11342,7 @@
11342
11342
  const event = this.bootstrapEvent(this.rootPointerEvent, normalizedEvents[i]);
11343
11343
  this.manager.mapEvent(event);
11344
11344
  }
11345
- this.setCursor(this.manager.cursor, this.manager.cursorTarget);
11345
+ this.setCursor(this.manager.cursor, this.manager.cursorTarget), this.rootPointerEvent.nativeEvent = null;
11346
11346
  }, this.onPointerUp = nativeEvent => {
11347
11347
  if (this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
11348
11348
  const outside = this.isEventOutsideOfTargetViewPort(nativeEvent) ? "outside" : "",
@@ -11351,7 +11351,7 @@
11351
11351
  const event = this.bootstrapEvent(this.rootPointerEvent, normalizedEvents[i]);
11352
11352
  event.type += outside, this.manager.mapEvent(event);
11353
11353
  }
11354
- this.setCursor(this.manager.cursor, this.manager.cursorTarget);
11354
+ this.setCursor(this.manager.cursor, this.manager.cursorTarget), this.rootPointerEvent.nativeEvent = null;
11355
11355
  }, this.onPointerOverOut = nativeEvent => {
11356
11356
  if (this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
11357
11357
  const normalizedEvents = this.normalizeToPointerData(nativeEvent);
@@ -11359,7 +11359,7 @@
11359
11359
  const event = this.bootstrapEvent(this.rootPointerEvent, normalizedEvents[i]);
11360
11360
  this.manager.mapEvent(event);
11361
11361
  }
11362
- this.setCursor(this.manager.cursor, this.manager.cursorTarget);
11362
+ this.setCursor(this.manager.cursor, this.manager.cursorTarget), this.rootPointerEvent.nativeEvent = null;
11363
11363
  }, this.onWheel = nativeEvent => {
11364
11364
  const wheelEvent = this.normalizeWheelEvent(nativeEvent);
11365
11365
  this.manager.mapEvent(wheelEvent);
@@ -12322,10 +12322,21 @@
12322
12322
  var _a, _b;
12323
12323
  super(from, to, duration, easing, params), this.newPointAnimateType = null !== (_a = null == params ? void 0 : params.newPointAnimateType) && void 0 !== _a ? _a : "grow", this.clipRangeByDimension = null !== (_b = null == params ? void 0 : params.clipRangeByDimension) && void 0 !== _b ? _b : "x";
12324
12324
  }
12325
+ getPoints(attribute) {
12326
+ let cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
12327
+ if (attribute.points) return attribute.points;
12328
+ if (attribute.segments) {
12329
+ const points = [];
12330
+ return this.segmentsCache || (this.segmentsCache = []), attribute.segments.map(segment => {
12331
+ var _a, _b;
12332
+ segment.points && points.push(...segment.points), cache && this.segmentsCache.push(null !== (_b = null === (_a = segment.points) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0);
12333
+ }), points;
12334
+ }
12335
+ return [];
12336
+ }
12325
12337
  onBind() {
12326
- var _a, _b;
12327
- const originFromPoints = null === (_a = this.from) || void 0 === _a ? void 0 : _a.points,
12328
- originToPoints = null === (_b = this.to) || void 0 === _b ? void 0 : _b.points;
12338
+ const originFromPoints = this.getPoints(this.from),
12339
+ originToPoints = this.getPoints(this.to, !0);
12329
12340
  this.fromPoints = originFromPoints ? Array.isArray(originFromPoints) ? originFromPoints : [originFromPoints] : [], this.toPoints = originToPoints ? Array.isArray(originToPoints) ? originToPoints : [originToPoints] : [];
12330
12341
  const tagMap = new Map();
12331
12342
  this.fromPoints.forEach(point => {
@@ -12356,10 +12367,18 @@
12356
12367
  });
12357
12368
  }
12358
12369
  onUpdate(end, ratio, out) {
12359
- this.points = this.points.map((point, index) => {
12370
+ if (this.points = this.points.map((point, index) => {
12360
12371
  const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
12361
12372
  return newPoint.context = point.context, newPoint;
12362
- }), this.clipRange && (out.clipRange = this.clipRange + (1 - this.clipRange) * ratio), out.points = this.points;
12373
+ }), this.clipRange && (out.clipRange = this.clipRange + (1 - this.clipRange) * ratio), this.segmentsCache && this.to.segments) {
12374
+ let start = 0;
12375
+ out.segments = this.to.segments.map((segment, index) => {
12376
+ const points = this.points.slice(start, this.segmentsCache[start]);
12377
+ return start += this.segmentsCache[start], Object.assign(Object.assign({}, segment), {
12378
+ points: points
12379
+ });
12380
+ });
12381
+ } else out.points = this.points;
12363
12382
  }
12364
12383
  }
12365
12384
  class ClipGraphicAnimate extends ACustomAnimate {
@@ -24587,6 +24606,18 @@
24587
24606
  Factory$2.registerPlugin("ViewTransform3dPlugin", ViewTransform3dPlugin);
24588
24607
  };
24589
24608
 
24609
+ function combineArray(arr) {
24610
+ const result = [];
24611
+ for (let index = 0; index < arr.length; index++) {
24612
+ const element = arr[index];
24613
+ if (index === 0) {
24614
+ result.push(element[0]);
24615
+ }
24616
+ result.push(element[1]);
24617
+ }
24618
+ return result;
24619
+ }
24620
+
24590
24621
  const warn = (msg, detail) => {
24591
24622
  if (isFunction$1(config.warnHandler)) {
24592
24623
  config.warnHandler.call(null, msg, detail);
@@ -30404,7 +30435,7 @@
30404
30435
  registerGroup(), registerRect(), registerSymbol(), registerRichtext(), registerText();
30405
30436
  }
30406
30437
 
30407
- var __rest$6 = undefined && undefined.__rest || function (s, e) {
30438
+ var __rest$c = undefined && undefined.__rest || function (s, e) {
30408
30439
  var t = {};
30409
30440
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
30410
30441
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -30455,7 +30486,7 @@
30455
30486
  const {
30456
30487
  visible: shapeVisible
30457
30488
  } = shape,
30458
- shapeStyle = __rest$6(shape, ["visible"]);
30489
+ shapeStyle = __rest$c(shape, ["visible"]);
30459
30490
  if (isBoolean$1(shapeVisible)) {
30460
30491
  const size = (null == shapeStyle ? void 0 : shapeStyle.size) || 10,
30461
30492
  maxSize = isNumber$1(size) ? size : Math.max(size[0], size[1]);
@@ -30486,7 +30517,7 @@
30486
30517
  const {
30487
30518
  visible: bgVisible
30488
30519
  } = panel,
30489
- backgroundStyle = __rest$6(panel, ["visible"]);
30520
+ backgroundStyle = __rest$c(panel, ["visible"]);
30490
30521
  if (visible && isBoolean$1(bgVisible)) {
30491
30522
  const bgRect = this.createOrUpdateChild("tag-panel", Object.assign(Object.assign({}, backgroundStyle), {
30492
30523
  visible: bgVisible && !!text,
@@ -30574,7 +30605,7 @@
30574
30605
  const {
30575
30606
  visible: bgVisible
30576
30607
  } = panel,
30577
- backgroundStyle = __rest$6(panel, ["visible"]);
30608
+ backgroundStyle = __rest$c(panel, ["visible"]);
30578
30609
  if (visible && isBoolean$1(bgVisible)) {
30579
30610
  const bgRect = this.createOrUpdateChild("tag-panel", Object.assign(Object.assign({}, backgroundStyle), {
30580
30611
  visible: bgVisible && !!text,
@@ -30640,7 +30671,7 @@
30640
30671
  merge$2(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);
30641
30672
  }
30642
30673
 
30643
- var __rest$5 = undefined && undefined.__rest || function (s, e) {
30674
+ var __rest$b = undefined && undefined.__rest || function (s, e) {
30644
30675
  var t = {};
30645
30676
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
30646
30677
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -30727,7 +30758,7 @@
30727
30758
  const {
30728
30759
  visible: bgVisible
30729
30760
  } = panel,
30730
- backgroundStyle = __rest$5(panel, ["visible"]),
30761
+ backgroundStyle = __rest$b(panel, ["visible"]),
30731
30762
  symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12,
30732
30763
  spaceSize = isArray$1(symbolSize) ? [symbolSize[0] + (null !== (_b = backgroundStyle.space) && void 0 !== _b ? _b : 0), symbolSize[1] + (null !== (_c = backgroundStyle.space) && void 0 !== _c ? _c : 0)] : symbolSize + (null !== (_d = backgroundStyle.space) && void 0 !== _d ? _d : 0),
30733
30764
  lineWidth = null !== (_e = backgroundStyle.lineWidth) && void 0 !== _e ? _e : 1,
@@ -30910,7 +30941,7 @@
30910
30941
  }
30911
30942
  let PopTipRenderContribution = class {
30912
30943
  render(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
30913
- var _a;
30944
+ var _a, _b;
30914
30945
  if (1 === graphic._showPoptip) {
30915
30946
  const {
30916
30947
  visible: visible,
@@ -30935,9 +30966,9 @@
30935
30966
  })), drawContext.stage.tryInitInteractiveLayer();
30936
30967
  const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
30937
30968
  interactiveLayer && interactiveLayer.add(this.poptipComponent);
30938
- } else 2 === graphic._showPoptip && (graphic._showPoptip = 0, this.poptipComponent && this.poptipComponent.setAttributes({
30969
+ } else 2 === graphic._showPoptip && (graphic._showPoptip = 0, this.poptipComponent && (this.poptipComponent.setAttributes({
30939
30970
  visibleAll: !1
30940
- }));
30971
+ }), null === (_b = this.poptipComponent.parent) || void 0 === _b || _b.removeChild(this.poptipComponent)));
30941
30972
  }
30942
30973
  };
30943
30974
  PopTipRenderContribution = __decorate$1([injectable()], PopTipRenderContribution);
@@ -31738,6 +31769,15 @@
31738
31769
  registerGroup(), registerText(), registerRichtext(), registerLine();
31739
31770
  }
31740
31771
 
31772
+ var __rest$a = undefined && undefined.__rest || function (s, e) {
31773
+ var t = {};
31774
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
31775
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
31776
+ var i = 0;
31777
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
31778
+ }
31779
+ return t;
31780
+ };
31741
31781
  loadLabelComponent();
31742
31782
  class LabelBase extends AbstractComponent {
31743
31783
  setBitmap(bitmap) {
@@ -31747,7 +31787,13 @@
31747
31787
  this._bmpTool = bmpTool;
31748
31788
  }
31749
31789
  constructor(attributes, options) {
31750
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, LabelBase.defaultAttributes, attributes)), this.name = "label", this._onHover = e => {
31790
+ const {
31791
+ data: data
31792
+ } = attributes,
31793
+ restAttributes = __rest$a(attributes, ["data"]);
31794
+ super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
31795
+ data: data
31796
+ }, merge$2({}, LabelBase.defaultAttributes, restAttributes))), this.name = "label", this._onHover = e => {
31751
31797
  const target = e.target;
31752
31798
  target === this._lastHover || isEmpty(target.states) || (target.addState(StateValue.hover, !0), traverseGroup(this, node => {
31753
31799
  node === target || isEmpty(node.states) || node.addState(StateValue.hoverReverse, !0);
@@ -32273,9 +32319,24 @@
32273
32319
  };
32274
32320
  const getLabelComponent = type => labelComponentMap[type];
32275
32321
 
32322
+ var __rest$9 = undefined && undefined.__rest || function (s, e) {
32323
+ var t = {};
32324
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
32325
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
32326
+ var i = 0;
32327
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
32328
+ }
32329
+ return t;
32330
+ };
32276
32331
  class SymbolLabel extends LabelBase {
32277
32332
  constructor(attributes, options) {
32278
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, SymbolLabel.defaultAttributes, attributes)), this.name = "symbol-label";
32333
+ const {
32334
+ data: data
32335
+ } = attributes,
32336
+ restAttributes = __rest$9(attributes, ["data"]);
32337
+ super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
32338
+ data: data
32339
+ }, merge$2({}, SymbolLabel.defaultAttributes, restAttributes))), this.name = "symbol-label";
32279
32340
  }
32280
32341
  labeling(textBounds, graphicBounds) {
32281
32342
  let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "top";
@@ -32294,9 +32355,24 @@
32294
32355
  registerLabelComponent("symbol", SymbolLabel), registerLabelComponent("line-data", SymbolLabel);
32295
32356
  };
32296
32357
 
32358
+ var __rest$8 = undefined && undefined.__rest || function (s, e) {
32359
+ var t = {};
32360
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
32361
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
32362
+ var i = 0;
32363
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
32364
+ }
32365
+ return t;
32366
+ };
32297
32367
  class RectLabel extends LabelBase {
32298
32368
  constructor(attributes, options) {
32299
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, RectLabel.defaultAttributes, attributes));
32369
+ const {
32370
+ data: data
32371
+ } = attributes,
32372
+ restAttributes = __rest$8(attributes, ["data"]);
32373
+ super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
32374
+ data: data
32375
+ }, merge$2({}, RectLabel.defaultAttributes, restAttributes)));
32300
32376
  }
32301
32377
  labeling(textBounds, graphicBounds) {
32302
32378
  let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "top";
@@ -32343,16 +32419,36 @@
32343
32419
  registerLabelComponent("rect", RectLabel);
32344
32420
  };
32345
32421
 
32422
+ var __rest$7 = undefined && undefined.__rest || function (s, e) {
32423
+ var t = {};
32424
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
32425
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
32426
+ var i = 0;
32427
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
32428
+ }
32429
+ return t;
32430
+ };
32346
32431
  let LineLabel$1 = class LineLabel extends LabelBase {
32347
32432
  constructor(attributes, options) {
32348
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, LineLabel.defaultAttributes, attributes)), this.name = "line-label";
32433
+ const {
32434
+ data: data
32435
+ } = attributes,
32436
+ restAttributes = __rest$7(attributes, ["data"]);
32437
+ super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
32438
+ data: data
32439
+ }, merge$2({}, LineLabel.defaultAttributes, restAttributes))), this.name = "line-label";
32349
32440
  }
32350
32441
  getGraphicBounds(graphic) {
32351
32442
  let point = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
32352
32443
  let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
32353
32444
  if (!graphic || "line" !== graphic.type && "area" !== graphic.type) return super.getGraphicBounds(graphic, point);
32354
- const points = graphic.attribute.points || [point],
32355
- index = "start" === position ? 0 : points.length - 1;
32445
+ let points = graphic.attribute.points;
32446
+ const segments = graphic.attribute.segments;
32447
+ !points && segments && segments.length && (points = segments.reduce((res, seg) => {
32448
+ var _a;
32449
+ return res.concat(null !== (_a = seg.points) && void 0 !== _a ? _a : []);
32450
+ }, [])), points && 0 !== points.length || (points = [point]);
32451
+ const index = "start" === position ? 0 : points.length - 1;
32356
32452
  return points[index] ? {
32357
32453
  x1: points[index].x,
32358
32454
  x2: points[index].x,
@@ -32377,6 +32473,15 @@
32377
32473
  registerLabelComponent("line", LineLabel$1), registerLabelComponent("area", LineLabel$1);
32378
32474
  };
32379
32475
 
32476
+ var __rest$6 = undefined && undefined.__rest || function (s, e) {
32477
+ var t = {};
32478
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
32479
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
32480
+ var i = 0;
32481
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
32482
+ }
32483
+ return t;
32484
+ };
32380
32485
  class ArcInfo {
32381
32486
  constructor(refDatum, center, outerCenter, quadrant, radian, middleAngle, innerRadius, outerRadius, circleCenter) {
32382
32487
  this.refDatum = refDatum, this.center = center, this.outerCenter = outerCenter, this.quadrant = quadrant, this.radian = radian, this.middleAngle = middleAngle, this.innerRadius = innerRadius, this.outerRadius = outerRadius, this.circleCenter = circleCenter, this.labelVisible = !0, this.labelLimit = 0;
@@ -32397,7 +32502,13 @@
32397
32502
  }
32398
32503
  class ArcLabel extends LabelBase {
32399
32504
  constructor(attributes, options) {
32400
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, ArcLabel.defaultAttributes, attributes)), this.name = "arc-label", this._ellipsisWidth = 0, this._arcLeft = new Map(), this._arcRight = new Map();
32505
+ const {
32506
+ data: data
32507
+ } = attributes,
32508
+ restAttributes = __rest$6(attributes, ["data"]);
32509
+ super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
32510
+ data: data
32511
+ }, merge$2({}, ArcLabel.defaultAttributes, restAttributes))), this.name = "arc-label", this._ellipsisWidth = 0, this._arcLeft = new Map(), this._arcRight = new Map();
32401
32512
  }
32402
32513
  _overlapping(labels) {
32403
32514
  return labels;
@@ -32924,9 +33035,24 @@
32924
33035
  registerLabelComponent("arc", ArcLabel);
32925
33036
  };
32926
33037
 
33038
+ var __rest$5 = undefined && undefined.__rest || function (s, e) {
33039
+ var t = {};
33040
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
33041
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
33042
+ var i = 0;
33043
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
33044
+ }
33045
+ return t;
33046
+ };
32927
33047
  class DataLabel extends AbstractComponent {
32928
33048
  constructor(attributes, options) {
32929
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, DataLabel.defaultAttributes, attributes)), this.name = "data-label";
33049
+ const {
33050
+ dataLabels: dataLabels
33051
+ } = attributes,
33052
+ restAttributes = __rest$5(attributes, ["dataLabels"]);
33053
+ super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
33054
+ dataLabels: dataLabels
33055
+ }, merge$2({}, DataLabel.defaultAttributes, restAttributes))), this.name = "data-label";
32930
33056
  }
32931
33057
  render() {
32932
33058
  var _a;
@@ -33236,7 +33362,7 @@
33236
33362
 
33237
33363
  var AXIS_ELEMENT_NAME;
33238
33364
  !function (AXIS_ELEMENT_NAME) {
33239
- AXIS_ELEMENT_NAME.innerView = "inner-view", AXIS_ELEMENT_NAME.axisContainer = "axis-container", AXIS_ELEMENT_NAME.labelContainer = "axis-label-container", AXIS_ELEMENT_NAME.tickContainer = "axis-tick-container", AXIS_ELEMENT_NAME.tick = "axis-tick", AXIS_ELEMENT_NAME.subTick = "axis-sub-tick", AXIS_ELEMENT_NAME.label = "axis-label", AXIS_ELEMENT_NAME.title = "axis-title", AXIS_ELEMENT_NAME.gridContainer = "axis-grid-container", AXIS_ELEMENT_NAME.grid = "axis-grid", AXIS_ELEMENT_NAME.gridRegion = "axis-grid-region", AXIS_ELEMENT_NAME.line = "axis-line", AXIS_ELEMENT_NAME.background = "axis-background", AXIS_ELEMENT_NAME.axisLabelBackground = "axis-label-background";
33365
+ AXIS_ELEMENT_NAME.innerView = "inner-view", AXIS_ELEMENT_NAME.axisContainer = "axis-container", AXIS_ELEMENT_NAME.labelContainer = "axis-label-container", AXIS_ELEMENT_NAME.tickContainer = "axis-tick-container", AXIS_ELEMENT_NAME.tick = "axis-tick", AXIS_ELEMENT_NAME.subTick = "axis-sub-tick", AXIS_ELEMENT_NAME.label = "axis-label", AXIS_ELEMENT_NAME.title = "axis-title", AXIS_ELEMENT_NAME.gridContainer = "axis-grid-container", AXIS_ELEMENT_NAME.grid = "axis-grid", AXIS_ELEMENT_NAME.gridRegion = "axis-grid-region", AXIS_ELEMENT_NAME.line = "axis-line", AXIS_ELEMENT_NAME.background = "axis-background", AXIS_ELEMENT_NAME.axisLabelBackground = "axis-label-background", AXIS_ELEMENT_NAME.axisBreak = "axis-break", AXIS_ELEMENT_NAME.axisBreakSymbol = "axis-break-symbol";
33240
33366
  }(AXIS_ELEMENT_NAME || (AXIS_ELEMENT_NAME = {}));
33241
33367
  var AxisStateValue;
33242
33368
  !function (AxisStateValue) {
@@ -33303,6 +33429,12 @@
33303
33429
  }
33304
33430
  }
33305
33431
  };
33432
+ const DEFAULT_AXIS_BREAK_SYMBOL_STYLE = {
33433
+ size: 8,
33434
+ stroke: "#000",
33435
+ lineWidth: 1,
33436
+ zIndex: 1
33437
+ };
33306
33438
 
33307
33439
  const clampRadian = function () {
33308
33440
  let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
@@ -33334,6 +33466,19 @@
33334
33466
  y: baseY - dy
33335
33467
  };
33336
33468
  }
33469
+ function getAxisBreakSymbolAttrs() {
33470
+ let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
33471
+ var _a, _b;
33472
+ const {
33473
+ style = {}
33474
+ } = props,
33475
+ symbolStyle = merge$2({}, DEFAULT_AXIS_BREAK_SYMBOL_STYLE, style),
33476
+ symbolSize = null !== (_a = symbolStyle.size) && void 0 !== _a ? _a : DEFAULT_AXIS_BREAK_SYMBOL_STYLE.size;
33477
+ return Object.assign(Object.assign({}, symbolStyle), {
33478
+ symbolType: null !== (_b = symbolStyle.symbolType) && void 0 !== _b ? _b : `M ${-symbolSize / 2} ${symbolSize / 6} L ${symbolSize / 2} ${-symbolSize / 6}`,
33479
+ symbolSize: symbolSize
33480
+ });
33481
+ }
33337
33482
  function getElMap(g) {
33338
33483
  const elMap = {};
33339
33484
  return traverseGroup(g, el => {
@@ -33469,18 +33614,20 @@
33469
33614
  let maxTextWidth = 0,
33470
33615
  maxTextHeight = 0,
33471
33616
  textAlign = "center",
33472
- textBaseline = "middle";
33473
- labels.forEach(label => {
33617
+ textBaseline = "middle",
33618
+ labelPos = 0;
33619
+ labels.forEach((label, index) => {
33474
33620
  var _a;
33475
33621
  const labelStyle = label.attribute,
33476
33622
  angle = null !== (_a = labelStyle.angle) && void 0 !== _a ? _a : 0,
33477
33623
  textBounds = label.AABBBounds;
33478
33624
  let textWidth = textBounds.width(),
33479
33625
  textHeight = textBounds.height();
33480
- angle && (textWidth = Math.abs(textWidth * Math.cos(angle)), textHeight = Math.abs(textHeight * Math.sin(angle))), maxTextWidth = Math.max(maxTextWidth, textWidth), maxTextHeight = Math.max(maxTextHeight, textHeight), textAlign = labelStyle.textAlign, textBaseline = labelStyle.textBaseline;
33626
+ angle && (textWidth = Math.abs(textWidth * Math.cos(angle)), textHeight = Math.abs(textHeight * Math.sin(angle))), maxTextWidth = Math.max(maxTextWidth, textWidth), maxTextHeight = Math.max(maxTextHeight, textHeight), textAlign = labelStyle.textAlign, textBaseline = labelStyle.textBaseline, 0 === index && (labelPos = labelStyle.x);
33481
33627
  }), this.axisLabelLayerSize[layer] = {
33482
33628
  width: maxTextWidth,
33483
33629
  height: maxTextHeight,
33630
+ labelPos: labelPos,
33484
33631
  textAlign: textAlign,
33485
33632
  textBaseline: textBaseline
33486
33633
  };
@@ -33847,9 +33994,9 @@
33847
33994
  }
33848
33995
  function getYAxisLabelAlign(orient) {
33849
33996
  let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
33850
- let align = ["right", "right", "center", "left", "center", "left", "center", "right", "right"],
33997
+ let align = ["right", "right", "center", "left", "left", "left", "center", "right", "right"],
33851
33998
  baseline = ["middle", "middle", "top", "top", "middle", "middle", "bottom", "bottom", "middle"];
33852
- "right" === orient && (align = ["left", "right", "right", "right", "left", "left", "left", "left", "right"], baseline = ["middle", "bottom", "middle", "top", "top", "top", "middle", "bottom", "bottom"]);
33999
+ "right" === orient && (align = ["left", "left", "center", "right", "right", "right", "center", "left", "left"], baseline = ["middle", "middle", "bottom", "bottom", "middle", "middle", "top", "middle", "middle"]);
33853
34000
  const step = (angle = clampAngle(angle)) / (.5 * Math.PI);
33854
34001
  let index;
33855
34002
  return index = step === Math.floor(step) ? 2 * Math.floor(step) : 2 * Math.floor(step) + 1, {
@@ -33906,57 +34053,37 @@
33906
34053
  }
33907
34054
 
33908
34055
  function alignAxisLabels(labels, start, containerSize, orient, align) {
33909
- if ("right" === orient || "left" === orient) {
33910
- if ("left" === align) {
33911
- const flag = "right" === orient ? 0 : -1;
33912
- labels.forEach(label => {
33913
- label.setAttributes({
33914
- x: start + containerSize * flag,
33915
- textAlign: "left"
33916
- });
33917
- });
33918
- } else if ("right" === align) {
33919
- const flag = "right" === orient ? 1 : 0;
33920
- labels.forEach(label => {
33921
- label.setAttributes({
33922
- x: start + containerSize * flag,
33923
- textAlign: "right"
33924
- });
33925
- });
33926
- } else if ("center" === align) {
33927
- const flag = "right" === orient ? 1 : -1;
33928
- labels.forEach(label => {
33929
- label.setAttributes({
33930
- x: start + .5 * containerSize * flag,
33931
- textAlign: "center"
33932
- });
33933
- });
33934
- }
33935
- } else if ("bottom" === orient || "top" === orient) if ("top" === align) {
33936
- const flag = "bottom" === orient ? 0 : -1;
33937
- labels.forEach(label => {
33938
- label.setAttributes({
33939
- y: start + containerSize * flag,
33940
- textBaseline: "top"
33941
- });
34056
+ "left" === orient || "right" === orient ? "left" === align ? labels.forEach(label => {
34057
+ var _a;
34058
+ label.setAttributes({
34059
+ dx: (null !== (_a = label.attribute.dx) && void 0 !== _a ? _a : 0) + start - label.AABBBounds.x1
33942
34060
  });
33943
- } else if ("bottom" === align) {
33944
- const flag = "bottom" === orient ? 1 : 0;
33945
- labels.forEach(label => {
33946
- label.setAttributes({
33947
- y: start + containerSize * flag,
33948
- textBaseline: "bottom"
33949
- });
34061
+ }) : "right" === align ? labels.forEach(label => {
34062
+ var _a;
34063
+ label.setAttributes({
34064
+ dx: (null !== (_a = label.attribute.dx) && void 0 !== _a ? _a : 0) + start + containerSize - label.AABBBounds.x2
33950
34065
  });
33951
- } else if ("middle" === align) {
33952
- const flag = "bottom" === orient ? 1 : -1;
33953
- labels.forEach(label => {
33954
- label.setAttributes({
33955
- y: start + .5 * containerSize * flag,
33956
- textBaseline: "middle"
33957
- });
34066
+ }) : "center" === align && labels.forEach(label => {
34067
+ var _a;
34068
+ label.setAttributes({
34069
+ dx: (null !== (_a = label.attribute.dx) && void 0 !== _a ? _a : 0) + start + containerSize / 2 - (label.AABBBounds.x1 + label.AABBBounds.x2) / 2
33958
34070
  });
33959
- }
34071
+ }) : "bottom" !== orient && "top" !== orient || ("top" === align ? labels.forEach(label => {
34072
+ var _a;
34073
+ label.setAttributes({
34074
+ dy: (null !== (_a = label.attribute.dy) && void 0 !== _a ? _a : 0) + start - label.AABBBounds.y1
34075
+ });
34076
+ }) : "bottom" === align ? labels.forEach(label => {
34077
+ var _a;
34078
+ label.setAttributes({
34079
+ dy: (null !== (_a = label.attribute.dy) && void 0 !== _a ? _a : 0) + start + containerSize - label.AABBBounds.y2
34080
+ });
34081
+ }) : "middle" === align && labels.forEach(label => {
34082
+ var _a;
34083
+ label.setAttributes({
34084
+ dy: (null !== (_a = label.attribute.dy) && void 0 !== _a ? _a : 0) + start + containerSize / 2 - (label.AABBBounds.y1 + label.AABBBounds.y2) / 2
34085
+ });
34086
+ }));
33960
34087
  }
33961
34088
 
33962
34089
  class LineAxisMixin {
@@ -34024,7 +34151,50 @@
34024
34151
  }
34025
34152
  _renderInner(container) {
34026
34153
  var _a;
34027
- super._renderInner(container);
34154
+ if (this.attribute.breaks && this.attribute.breaks.length) {
34155
+ const transformedBreaks = [];
34156
+ for (let index = 0; index < this.attribute.breaks.length; index++) {
34157
+ const aBreak = this.attribute.breaks[index],
34158
+ {
34159
+ range: range,
34160
+ breakSymbol: breakSymbol,
34161
+ rawRange: rawRange
34162
+ } = aBreak;
34163
+ transformedBreaks.push({
34164
+ startPoint: this.getTickCoord(range[0]),
34165
+ endPoint: this.getTickCoord(range[1]),
34166
+ range: range,
34167
+ breakSymbol: breakSymbol,
34168
+ rawRange: rawRange
34169
+ });
34170
+ }
34171
+ this._breaks = transformedBreaks;
34172
+ }
34173
+ super._renderInner(container), this._breaks && this._breaks.length && this._breaks.forEach((b, index) => {
34174
+ const {
34175
+ startPoint: startPoint,
34176
+ endPoint: endPoint,
34177
+ breakSymbol: breakSymbol,
34178
+ rawRange: rawRange
34179
+ } = b;
34180
+ if (!1 !== (null == breakSymbol ? void 0 : breakSymbol.visible)) {
34181
+ const axisBreakGroup = graphicCreator.group({
34182
+ zIndex: 99
34183
+ });
34184
+ axisBreakGroup.name = AXIS_ELEMENT_NAME.axisBreak, axisBreakGroup.id = this._getNodeId(`${AXIS_ELEMENT_NAME.axisBreak}-${index}`), axisBreakGroup.data = rawRange;
34185
+ const symbolStyle = getAxisBreakSymbolAttrs(breakSymbol),
34186
+ shape1 = graphicCreator.symbol(Object.assign({
34187
+ x: startPoint.x,
34188
+ y: startPoint.y
34189
+ }, symbolStyle));
34190
+ shape1.name = AXIS_ELEMENT_NAME.axisBreakSymbol;
34191
+ const shape2 = graphicCreator.symbol(Object.assign({
34192
+ x: endPoint.x,
34193
+ y: endPoint.y
34194
+ }, symbolStyle));
34195
+ shape2.name = AXIS_ELEMENT_NAME.axisBreakSymbol, axisBreakGroup.add(shape1), axisBreakGroup.add(shape2), container.add(axisBreakGroup);
34196
+ }
34197
+ });
34028
34198
  const {
34029
34199
  panel: panel
34030
34200
  } = this.attribute;
@@ -34051,18 +34221,25 @@
34051
34221
  startSymbol: startSymbol,
34052
34222
  endSymbol: endSymbol,
34053
34223
  style: style,
34054
- breakRange: breakRange,
34055
- breakShape: breakShape,
34056
- breakShapeStyle: breakShapeStyle,
34057
34224
  state: state
34058
34225
  } = _a,
34059
- restLineAttrs = __rest$4(_a, ["startSymbol", "endSymbol", "style", "breakRange", "breakShape", "breakShapeStyle", "state"]),
34226
+ restLineAttrs = __rest$4(_a, ["startSymbol", "endSymbol", "style", "state"]),
34060
34227
  lineAttrs = Object.assign({
34061
- points: [start, end],
34062
34228
  startSymbol: startSymbol,
34063
34229
  endSymbol: endSymbol,
34064
34230
  lineStyle: style
34065
34231
  }, restLineAttrs);
34232
+ if (this._breaks && this._breaks.length) {
34233
+ const linePoints = [];
34234
+ let lastStartPoint = start;
34235
+ this._breaks.forEach(b => {
34236
+ const {
34237
+ startPoint: startPoint,
34238
+ endPoint: endPoint
34239
+ } = b;
34240
+ linePoints.push([lastStartPoint, startPoint]), lastStartPoint = endPoint;
34241
+ }), linePoints.push([lastStartPoint, end]), lineAttrs.points = linePoints, lineAttrs.multiSegment = !0;
34242
+ } else lineAttrs.points = [start, end];
34066
34243
  isEmpty(state) || (lineAttrs.state = {
34067
34244
  line: merge$2({}, DEFAULT_STATES$1, state),
34068
34245
  symbol: merge$2({}, DEFAULT_STATES$1, state)
@@ -34100,19 +34277,15 @@
34100
34277
  if (0 === axisVector[1]) {
34101
34278
  const labelBoundsHeight = this.axisLabelsContainer ? this.axisLabelsContainer.AABBBounds.height() : 0;
34102
34279
  isFinite(labelBoundsHeight) ? labelLength += labelBoundsHeight + (layerCount - 1) * space : labelLength = 0;
34103
- } else {
34104
- if (0 === axisVector[0]) {
34105
- const boundsWidth = this.axisLabelsContainer ? this.axisLabelsContainer.AABBBounds.width() : 0;
34106
- isFinite(boundsWidth) ? labelLength += boundsWidth + (layerCount - 1) * space : labelLength = 0;
34107
- } else Object.keys(this.axisLabelLayerSize).forEach((layer, index) => {
34108
- labelLength += this.axisLabelLayerSize[layer].width + (index > 0 ? space : 0);
34109
- });
34110
- const textAlign = this.axisLabelLayerSize[0].textAlign,
34111
- isTextAlignStart = "start" === textAlign || "left" === textAlign,
34112
- isTextCenter = "center" === textAlign,
34113
- isReverse = axisVector[1] > 0;
34114
- labelLength = 1 === factor ? isReverse ? isTextAlignStart ? labelLength : isTextCenter ? labelLength / 2 : space : isTextAlignStart ? space : isTextCenter ? labelLength / 2 : labelLength : isReverse ? isTextAlignStart ? space : isTextCenter ? labelLength / 2 : labelLength : isTextAlignStart ? labelLength : isTextCenter ? labelLength / 2 : space;
34115
- }
34280
+ } else if (0 === axisVector[0]) {
34281
+ if (this.axisLabelsContainer && this.axisLabelsContainer.AABBBounds && !this.axisLabelsContainer.AABBBounds.empty()) {
34282
+ const baseX = this.axisLabelLayerSize[0].labelPos,
34283
+ bounds = this.axisLabelsContainer.AABBBounds;
34284
+ labelLength += (1 === factor ? bounds.x2 > baseX ? Math.min(bounds.x2 - baseX, bounds.width()) : 0 : bounds.x1 < baseX ? Math.min(baseX - bounds.x1, bounds.width()) : 0) + (layerCount - 1) * space;
34285
+ } else labelLength = 0;
34286
+ } else Object.keys(this.axisLabelLayerSize).forEach((layer, index) => {
34287
+ labelLength += this.axisLabelLayerSize[layer].width + (index > 0 ? space : 0);
34288
+ });
34116
34289
  }
34117
34290
  let tickLength = 0;
34118
34291
  (null === (_b = this.attribute.tick) || void 0 === _b ? void 0 : _b.visible) && !1 === this.attribute.tick.inside && (tickLength = this.attribute.tick.length || 4), (null === (_c = this.attribute.subTick) || void 0 === _c ? void 0 : _c.visible) && !1 === this.attribute.subTick.inside && (tickLength = Math.max(tickLength, this.attribute.subTick.length || 2));
@@ -34324,7 +34497,7 @@
34324
34497
  }
34325
34498
  if (isValid$1(this.attribute.label.containerAlign)) {
34326
34499
  let start;
34327
- "left" === orient ? start = axisLabelContainerBounds.x2 : "right" === orient ? start = axisLabelContainerBounds.x1 : "top" === orient ? start = axisLabelContainerBounds.y2 : "bottom" === orient && (start = axisLabelContainerBounds.y1), alignAxisLabels(labelShapes, start, axisLabelContainerSize, orient, this.attribute.label.containerAlign);
34500
+ "left" === orient ? start = axisLabelContainerBounds.x2 - axisLabelContainerSize : "right" === orient ? start = axisLabelContainerBounds.x1 : "top" === orient ? start = axisLabelContainerBounds.y2 - axisLabelContainerSize : "bottom" === orient && (start = axisLabelContainerBounds.y1), alignAxisLabels(labelShapes, start, axisLabelContainerSize, orient, this.attribute.label.containerAlign);
34328
34501
  }
34329
34502
  }
34330
34503
  _getAxisLabelLimitLength(limitSize, layerCount) {
@@ -35669,7 +35842,28 @@
35669
35842
  }
35670
35843
  }
35671
35844
 
35845
+ function getScaleTicks(op, scale, count, getTicks) {
35846
+ let scaleTicks;
35847
+ const {
35848
+ breakData: breakData
35849
+ } = op;
35850
+ if (breakData) {
35851
+ const {
35852
+ range: breakRanges
35853
+ } = breakData(),
35854
+ domain = scale.domain();
35855
+ scaleTicks = [];
35856
+ for (let i = 0; i < domain.length; i++) if (i < domain.length - 1) {
35857
+ getTicks(count, [domain[i], domain[i + 1]]).forEach(tick => {
35858
+ breakRanges.some(breakRange => tick >= breakRange[0] && tick <= breakRange[1]) || scaleTicks.push(tick);
35859
+ });
35860
+ }
35861
+ scale.domain(domain);
35862
+ } else scaleTicks = getTicks(count);
35863
+ return scaleTicks;
35864
+ }
35672
35865
  const continuousTicks = (scale, op) => {
35866
+ var _a, _b;
35673
35867
  if (!isContinuous(scale.type)) return convertDomainToTickData(scale.domain());
35674
35868
  const range = scale.range(),
35675
35869
  rangeSize = Math.abs(range[range.length - 1] - range[0]);
@@ -35679,27 +35873,33 @@
35679
35873
  forceTickCount: forceTickCount,
35680
35874
  tickStep: tickStep,
35681
35875
  noDecimals = !1,
35682
- labelStyle: labelStyle
35876
+ labelStyle: labelStyle,
35877
+ breakData: breakData
35683
35878
  } = op;
35684
35879
  let scaleTicks;
35685
- if (isValid$1(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$1(forceTickCount)) scaleTicks = scale.forceTicks(forceTickCount);else if ("d3" === op.tickMode) {
35686
- const count = isFunction$1(tickCount) ? tickCount({
35880
+ if (isValid$1(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$1(forceTickCount)) scaleTicks = getScaleTicks(op, scale, forceTickCount, (count, range) => range && range.length ? scale.domain(range).forceTicks(count) : scale.forceTicks(count));else if ("d3" === op.tickMode) {
35881
+ const count = null !== (_a = isFunction$1(tickCount) ? tickCount({
35687
35882
  axisLength: rangeSize,
35688
35883
  labelStyle: labelStyle
35689
- }) : tickCount;
35690
- scaleTicks = scale.d3Ticks(null != count ? count : 5, {
35884
+ }) : tickCount) && void 0 !== _a ? _a : 5;
35885
+ scaleTicks = getScaleTicks(op, scale, count, (count, range) => range && range.length ? scale.domain(range).d3Ticks(count, {
35691
35886
  noDecimals: noDecimals
35692
- });
35887
+ }) : scale.d3Ticks(count, {
35888
+ noDecimals: noDecimals
35889
+ }));
35693
35890
  } else {
35694
- const count = isFunction$1(tickCount) ? tickCount({
35891
+ const count = null !== (_b = isFunction$1(tickCount) ? tickCount({
35695
35892
  axisLength: rangeSize,
35696
35893
  labelStyle: labelStyle
35697
- }) : tickCount,
35894
+ }) : tickCount) && void 0 !== _b ? _b : 5,
35698
35895
  customTicks = isFunction$1(op.tickMode) ? op.tickMode : void 0;
35699
- scaleTicks = scale.ticks(null != count ? count : 5, {
35896
+ scaleTicks = getScaleTicks(op, scale, count, (count, range) => range && range.length ? scale.domain(range).ticks(count, {
35700
35897
  noDecimals: noDecimals,
35701
35898
  customTicks: customTicks
35702
- });
35899
+ }) : scale.ticks(count, {
35900
+ noDecimals: noDecimals,
35901
+ customTicks: customTicks
35902
+ }));
35703
35903
  }
35704
35904
  if (op.sampling && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
35705
35905
  const {
@@ -35710,7 +35910,8 @@
35710
35910
  AABBBounds: bounds,
35711
35911
  value: scaleTicks[i]
35712
35912
  }));
35713
- for (; items.length >= 3 && hasOverlap$1(items, labelGap);) items = methods$1.parity(items);
35913
+ const samplingMethod = breakData ? methods$1.greedy : methods$1.parity;
35914
+ for (; items.length >= 3 && hasOverlap$1(items, labelGap);) items = samplingMethod(items, labelGap);
35714
35915
  const ticks = items.map(item => item.value);
35715
35916
  ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last(ticks) !== last(scaleTicks) && ticks.push(last(scaleTicks))), scaleTicks = ticks;
35716
35917
  }
@@ -41001,7 +41202,7 @@
41001
41202
  }
41002
41203
  }
41003
41204
  render() {
41004
- var _a;
41205
+ var _a, _b;
41005
41206
  if (this.removeAllChild(!0), !0 !== this.attribute.visible) return;
41006
41207
  const {
41007
41208
  title = {},
@@ -41013,7 +41214,8 @@
41013
41214
  group = this.createOrUpdateChild("indicator-container", {
41014
41215
  x: 0,
41015
41216
  y: 0,
41016
- zIndex: 1
41217
+ zIndex: 1,
41218
+ pickable: null === (_a = this.attribute.pickable) || void 0 === _a || _a
41017
41219
  }, "group");
41018
41220
  if (isValid$1(title) && (this._title = this._renderText(group, title, limit, limitRatio, "title.style", "indicator-title")), isValid$1(content)) {
41019
41221
  const contents = array(content),
@@ -41023,7 +41225,7 @@
41023
41225
  }), this._content = contentComponents;
41024
41226
  }
41025
41227
  this._setGlobalAutoFit(limit), this._setYPosition();
41026
- const totalHeight = null !== (_a = null == group ? void 0 : group.AABBBounds.height()) && void 0 !== _a ? _a : 0;
41228
+ const totalHeight = null !== (_b = null == group ? void 0 : group.AABBBounds.height()) && void 0 !== _b ? _b : 0;
41027
41229
  group.setAttribute("y", size.height / 2 - totalHeight / 2), group.setAttribute("x", size.width / 2);
41028
41230
  }
41029
41231
  _setLocalAutoFit(limit, indicatorItem, indicatorItemSpec) {
@@ -41285,6 +41487,15 @@
41285
41487
  const forwardStep = (direction, currentIndex, min, max) => "default" === direction ? Math.min(currentIndex + 1, max) : Math.max(currentIndex - 1, min);
41286
41488
 
41287
41489
  class BasePlayer extends AbstractComponent {
41490
+ getMinIndex() {
41491
+ return this._minIndex;
41492
+ }
41493
+ getMaxIndex() {
41494
+ return this._maxIndex;
41495
+ }
41496
+ getDataIndex() {
41497
+ return this._dataIndex;
41498
+ }
41288
41499
  constructor(attributes, options) {
41289
41500
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, BasePlayer.defaultAttributes, attributes)), this._data = [], this._dataIndex = 0, this._layoutInfo = {}, this._updateSliderAttrs = () => {
41290
41501
  var _a, _b;
@@ -54382,13 +54593,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
54382
54593
  return targetAxisInfo;
54383
54594
  };
54384
54595
  const getDimensionInfoByPosition = (axis, posValue, posKey, getDimensionField) => {
54385
- const scale = axis.getScale();
54386
- const scalePos = posValue - axis.getLayoutStartPoint()[posKey];
54387
- if ((scalePos - scale.range()[0]) * (scalePos - scale.range()[1]) > 0) {
54388
- return null;
54389
- }
54390
- const value = scale.invert(scalePos);
54391
- return getDimensionInfoByValue(axis, value, getDimensionField);
54596
+ const value = axis.positionToData(posValue, true);
54597
+ return isNil$1(value) ? null : getDimensionInfoByValue(axis, value, getDimensionField);
54392
54598
  };
54393
54599
  const getDimensionInfoByValue = (axis, value, getDimensionField) => {
54394
54600
  const scale = axis.getScale();
@@ -58667,7 +58873,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
58667
58873
  this._product.encode(updateStyles, true);
58668
58874
  }
58669
58875
  _separateStyle() {
58670
- const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL, normalStyle = _a[_b]; __rest$7(_a, [typeof _b === "symbol" ? _b : _b + ""]);
58876
+ const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL, normalStyle = _a[_b]; __rest$d(_a, [typeof _b === "symbol" ? _b : _b + ""]);
58671
58877
  const enterStyles = this._option.noSeparateStyle ? null : {};
58672
58878
  const updateStyles = {};
58673
58879
  Object.keys(normalStyle).forEach(key => {
@@ -58687,7 +58893,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
58687
58893
  return { enterStyles, updateStyles };
58688
58894
  }
58689
58895
  compileEncode() {
58690
- const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL; _a[_b]; const temp = __rest$7(_a, [typeof _b === "symbol" ? _b : _b + ""]);
58896
+ const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL; _a[_b]; const temp = __rest$d(_a, [typeof _b === "symbol" ? _b : _b + ""]);
58691
58897
  const { enterStyles, updateStyles } = this._separateStyle();
58692
58898
  this._product.encode(updateStyles, true);
58693
58899
  this._product.encodeState('group', enterStyles, true);
@@ -59083,7 +59289,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59083
59289
  return this._computeBorderAttr(stateStyle.style);
59084
59290
  }
59085
59291
  if (isValidScaleType((_a = stateStyle.style.scale) === null || _a === void 0 ? void 0 : _a.type)) {
59086
- return (datum, opt) => stateStyle.style.scale.scale(datum[stateStyle.style.field]);
59292
+ return (datum, opt) => {
59293
+ let data = datum;
59294
+ if (this.model.modelType === 'series' && this.model.getMarkData) {
59295
+ data = this.model.getMarkData(datum);
59296
+ }
59297
+ return stateStyle.style.scale.scale(data[stateStyle.style.field]);
59298
+ };
59087
59299
  }
59088
59300
  return (datum, opt) => {
59089
59301
  return stateStyle.style;
@@ -59126,7 +59338,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59126
59338
  }
59127
59339
  _computeGradientAttr(gradientStyle) {
59128
59340
  var _a, _b;
59129
- const { gradient, scale, field } = gradientStyle, rest = __rest$7(gradientStyle, ["gradient", "scale", "field"]);
59341
+ const { gradient, scale, field } = gradientStyle, rest = __rest$d(gradientStyle, ["gradient", "scale", "field"]);
59130
59342
  let colorScale = scale;
59131
59343
  let colorField = field;
59132
59344
  if ((!scale || !field) && this.model.modelType === 'series') {
@@ -59173,7 +59385,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59173
59385
  };
59174
59386
  }
59175
59387
  _computeBorderAttr(borderStyle) {
59176
- const { scale, field } = borderStyle, mergedStyle = __rest$7(borderStyle, ["scale", "field"]);
59388
+ const { scale, field } = borderStyle, mergedStyle = __rest$d(borderStyle, ["scale", "field"]);
59177
59389
  return (data, opt) => {
59178
59390
  var _a, _b, _c;
59179
59391
  const computeStyle = {};
@@ -59580,7 +59792,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59580
59792
  };
59581
59793
  this._option = merge$2(this._option, { animation: spec.animation !== false }, options);
59582
59794
  this._onError = (_a = this._option) === null || _a === void 0 ? void 0 : _a.onError;
59583
- const _g = this._option, { dom, renderCanvas, mode, stage, poptip } = _g, restOptions = __rest$7(_g, ["dom", "renderCanvas", "mode", "stage", "poptip"]);
59795
+ const _g = this._option, { dom, renderCanvas, mode, stage, poptip } = _g, restOptions = __rest$d(_g, ["dom", "renderCanvas", "mode", "stage", "poptip"]);
59584
59796
  const isTrueBrowseEnv = isTrueBrowser(mode);
59585
59797
  if (isTrueBrowseEnv) {
59586
59798
  registerBrowserEnv();
@@ -60732,7 +60944,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
60732
60944
  };
60733
60945
  registerVChartCore();
60734
60946
 
60735
- const version = "1.12.1";
60947
+ const version = "1.12.2-alpha.1";
60736
60948
 
60737
60949
  const addVChartProperty = (data, op) => {
60738
60950
  const context = op.beforeCall();
@@ -63645,13 +63857,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
63645
63857
  }
63646
63858
 
63647
63859
  function isValidAlignDomain(domain) {
63648
- return domain.length === 2 && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
63860
+ return domain.length === 2 && isValidNumber$1(domain[0]) && isValidNumber$1(last(domain)) && last(domain) >= domain[0];
63649
63861
  }
63650
63862
  function getScaleInfo(axis, domain) {
63651
- const total = domain[1] - domain[0];
63652
- const includeZero = domain[1] * domain[0] < 0;
63863
+ const total = last(domain) - domain[0];
63864
+ const includeZero = last(domain) * domain[0] < 0;
63653
63865
  let negative = domain[0] <= 0 ? 0 - domain[0] : 0;
63654
- let positive = domain[1] > 0 ? domain[1] - 0 : 0;
63866
+ let positive = last(domain) > 0 ? last(domain) - 0 : 0;
63655
63867
  if (total === 0) {
63656
63868
  if (domain[0] < 0) {
63657
63869
  negative = 1;
@@ -63886,12 +64098,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
63886
64098
  return data;
63887
64099
  }
63888
64100
  const targetDomain = targetScale.domain();
63889
- const targetRange = targetDomain[1] - targetDomain[0];
64101
+ const targetRange = last(targetDomain) - targetDomain[0];
63890
64102
  if (targetRange === 0) {
63891
64103
  return data;
63892
64104
  }
63893
64105
  const currentDomain = currentScale.domain();
63894
- const currentRange = currentDomain[1] - currentDomain[0];
64106
+ const currentRange = last(currentDomain) - currentDomain[0];
63895
64107
  if (targetRange === 0) {
63896
64108
  return data;
63897
64109
  }
@@ -64230,7 +64442,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64230
64442
 
64231
64443
  class BaseComponent extends LayoutModel {
64232
64444
  static createComponent(specInfo, options) {
64233
- const { spec } = specInfo, others = __rest$7(specInfo, ["spec"]);
64445
+ const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
64234
64446
  return new this(spec, Object.assign(Object.assign({}, options), others));
64235
64447
  }
64236
64448
  getRegions() {
@@ -64511,10 +64723,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64511
64723
  }
64512
64724
  else if (viewData && viewData.latestData && viewData.latestData.length) {
64513
64725
  const seriesData = (_a = s.getViewDataStatistics) === null || _a === void 0 ? void 0 : _a.call(s);
64726
+ const userSetBreaks = this.type === ComponentTypeEnum.cartesianLinearAxis && this._spec.breaks && this._spec.breaks.length;
64514
64727
  field.forEach(f => {
64515
64728
  var _a;
64516
64729
  if ((_a = seriesData === null || seriesData === void 0 ? void 0 : seriesData.latestData) === null || _a === void 0 ? void 0 : _a[f]) {
64517
- data.push(seriesData.latestData[f]);
64730
+ if (userSetBreaks) {
64731
+ data.push(Object.assign(Object.assign({}, seriesData.latestData[f]), { values: viewData.latestData.map((obj) => obj[f]) }));
64732
+ }
64733
+ else {
64734
+ data.push(seriesData.latestData[f]);
64735
+ }
64518
64736
  }
64519
64737
  });
64520
64738
  }
@@ -64725,7 +64943,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64725
64943
  };
64726
64944
  }
64727
64945
  if (spec.title && spec.title.visible) {
64728
- const _a = spec.title, { autoRotate, angle, style: titleStyle = {}, background: titleBackgroundSpec, state: titleState, shape: titleShapeSpec } = _a, restTitleAttrs = __rest$7(_a, ["autoRotate", "angle", "style", "background", "state", "shape"]);
64946
+ const _a = spec.title, { autoRotate, angle, style: titleStyle = {}, background: titleBackgroundSpec, state: titleState, shape: titleShapeSpec } = _a, restTitleAttrs = __rest$d(_a, ["autoRotate", "angle", "style", "background", "state", "shape"]);
64729
64947
  let titleAngle = angle;
64730
64948
  let titleTextStyle;
64731
64949
  if (spec.orient === 'left' || spec.orient === 'right') {
@@ -64962,7 +65180,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64962
65180
  };
64963
65181
  this._updateAxisLayout = () => {
64964
65182
  const startPoint = this.getLayoutStartPoint();
64965
- const _a = this._getUpdateAttribute(false), { grid: updateGridAttrs } = _a, updateAxisAttrs = __rest$7(_a, ["grid"]);
65183
+ const _a = this._getUpdateAttribute(false), { grid: updateGridAttrs } = _a, updateAxisAttrs = __rest$d(_a, ["grid"]);
64966
65184
  const axisProduct = this._axisMark.getProduct();
64967
65185
  const axisAttrs = mergeSpec({ x: startPoint.x, y: startPoint.y }, this._axisStyle, updateAxisAttrs);
64968
65186
  axisProduct.encode(axisAttrs);
@@ -64985,7 +65203,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64985
65203
  ? (_a = item
64986
65204
  .getTickData()
64987
65205
  .getLatestData()) === null || _a === void 0 ? void 0 : _a.find((d) => d.value === 0)
64988
- : item.getScale().domain()[0] <= 0 && item.getScale().domain()[1] >= 0));
65206
+ : item.getScale().domain()[0] <= 0 && last(item.getScale().domain()) >= 0));
64989
65207
  };
64990
65208
  const relativeAxes = axesComponents.filter(item => isValidAxis(item));
64991
65209
  if (relativeAxes.length) {
@@ -65075,7 +65293,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65075
65293
  return specInfos;
65076
65294
  }
65077
65295
  static createComponent(specInfo, options) {
65078
- const { spec } = specInfo, others = __rest$7(specInfo, ["spec"]);
65296
+ const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
65079
65297
  const C = Factory$1.getComponentInKey(others.type);
65080
65298
  if (C) {
65081
65299
  return new C(spec, Object.assign(Object.assign({}, options), others));
@@ -65091,8 +65309,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65091
65309
  setLayout3dBox(box3d) {
65092
65310
  this.layout3dBox = box3d;
65093
65311
  }
65094
- updateScaleRange() {
65095
- let isScaleChange = false;
65312
+ getNewScaleRange() {
65096
65313
  const { width, height } = this.getLayoutRect();
65097
65314
  const { left, right, top, bottom } = this._innerOffset;
65098
65315
  let newRange = [];
@@ -65112,8 +65329,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65112
65329
  newRange = this._inverse ? [top, height - bottom] : [height - bottom, top];
65113
65330
  }
65114
65331
  }
65115
- const [start, end] = this._scale.range();
65116
- if (newRange[0] !== start || newRange[1] !== end) {
65332
+ return newRange;
65333
+ }
65334
+ updateScaleRange() {
65335
+ let isScaleChange = false;
65336
+ const newRange = this.getNewScaleRange();
65337
+ const range = this._scale.range();
65338
+ if (newRange.length === range.length && newRange.every((value, index) => value === range[index])) {
65339
+ isScaleChange = false;
65340
+ }
65341
+ else {
65117
65342
  isScaleChange = true;
65118
65343
  this._scale.range(newRange);
65119
65344
  }
@@ -65338,6 +65563,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65338
65563
  }
65339
65564
  return result;
65340
65565
  }
65566
+ positionToData(pos, isViewPos) {
65567
+ const isX = isXAxis(this.getOrient());
65568
+ if (isViewPos) {
65569
+ pos -= isX ? this.getLayoutStartPoint().x : this.getLayoutStartPoint().y;
65570
+ }
65571
+ if (this._innerOffset) {
65572
+ pos = isX
65573
+ ? clamp$1(pos, this._innerOffset.left, this.getLayoutRect().width - this._innerOffset.right)
65574
+ : clamp$1(pos, this._innerOffset.top, this.getLayoutRect().height - this._innerOffset.bottom);
65575
+ }
65576
+ const range = this._scale.range();
65577
+ if ((pos - range[0]) * (pos - last(range)) > 0) {
65578
+ return null;
65579
+ }
65580
+ return this._scale.invert(pos);
65581
+ }
65341
65582
  _getTitleLimit(isX) {
65342
65583
  var _a, _b, _c, _d, _e;
65343
65584
  if (this._spec.title.visible && isNil$1((_a = this._spec.title.style) === null || _a === void 0 ? void 0 : _a.maxLineWidth)) {
@@ -65472,7 +65713,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65472
65713
  const normalizedValue = this._getNormalizedValue([obj.value], length);
65473
65714
  return getAxisItem(obj.value, normalizedValue);
65474
65715
  })
65475
- .filter((entry) => entry.value >= 0 && entry.value <= 1)
65716
+ .filter((entry) => {
65717
+ const { value, rawValue } = entry;
65718
+ const domain = this._scale.domain();
65719
+ if (isContinuous(this._scale.type)) {
65720
+ return rawValue >= domain[0] && rawValue <= last(domain);
65721
+ }
65722
+ return domain.includes(rawValue);
65723
+ })
65476
65724
  ];
65477
65725
  }
65478
65726
  return [];
@@ -65501,17 +65749,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65501
65749
  });
65502
65750
  if (this._autoIndentOnce && this._hasAutoIndent) {
65503
65751
  ['x1', 'x2', 'y1', 'y2'].forEach(key => {
65504
- this.layout.getLastComputeOutBounds()[key] = this._layoutCache._lastComputeOutBounds[key];
65752
+ this.layout.getLastComputeOutBounds()[key] =
65753
+ this._layoutCache._lastComputeOutBounds[key];
65505
65754
  });
65506
65755
  }
65507
65756
  else {
65508
65757
  this._hasAutoIndent = true;
65509
65758
  ['x1', 'x2', 'y1', 'y2'].forEach(key => {
65510
- if (this.layout.getLastComputeOutBounds()[key] < this._layoutCache._lastComputeOutBounds[key]) {
65511
- this.layout.getLastComputeOutBounds()[key] = this._layoutCache._lastComputeOutBounds[key];
65759
+ if (this.layout.getLastComputeOutBounds()[key] <
65760
+ this._layoutCache._lastComputeOutBounds[key]) {
65761
+ this.layout.getLastComputeOutBounds()[key] =
65762
+ this._layoutCache._lastComputeOutBounds[key];
65512
65763
  }
65513
65764
  else {
65514
- this._layoutCache._lastComputeOutBounds[key] = this.layout.getLastComputeOutBounds()[key];
65765
+ this._layoutCache._lastComputeOutBounds[key] =
65766
+ this.layout.getLastComputeOutBounds()[key];
65515
65767
  }
65516
65768
  });
65517
65769
  }
@@ -65581,6 +65833,57 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65581
65833
  CartesianAxis.type = ComponentTypeEnum.cartesianAxis;
65582
65834
  CartesianAxis.specKey = 'axes';
65583
65835
 
65836
+ const setDomain = (min, max, breaks) => breaks.reduce((r, b, i) => {
65837
+ r.push([b, breaks.length === i + 1 ? max : breaks[i + 1]]);
65838
+ return r;
65839
+ }, [[min, breaks[0]]]);
65840
+ function breakDomain(data, points) {
65841
+ const min = data[0];
65842
+ const max = data[data.length - 1];
65843
+ const breaks = points.filter(point => point > min && point < max);
65844
+ return setDomain(min, max, breaks);
65845
+ }
65846
+ const sorter = (a, b) => a - b;
65847
+ const fillBins = (data, points) => {
65848
+ const bins = [0];
65849
+ let i = 0;
65850
+ let j = 0;
65851
+ while (i < points.length) {
65852
+ if (data[j] <= points[i]) {
65853
+ bins[i] += 1;
65854
+ j += 1;
65855
+ }
65856
+ else {
65857
+ i += 1;
65858
+ bins[i] = 0;
65859
+ }
65860
+ }
65861
+ bins[i] = data.slice(j).length;
65862
+ return bins;
65863
+ };
65864
+ function breakScope(data, points) {
65865
+ const bins = fillBins(data, points);
65866
+ const count = data.length;
65867
+ return bins
65868
+ .reduce((res, bin, i) => {
65869
+ const last = res[i - 1] ? res[i - 1][1] : 0;
65870
+ const next = (last * 100 + +(bin / count).toFixed(2) * 100) / 100;
65871
+ res.push([last, next > 1 ? 1 : next > 0.95 ? 1 : next]);
65872
+ return res;
65873
+ }, [])
65874
+ .filter(s => {
65875
+ return !(s[0] === 0 && s[1] === 0) && !(s[0] === 1 && s[1] === 1);
65876
+ });
65877
+ }
65878
+ function breakData(data, points) {
65879
+ data.sort(sorter);
65880
+ points.sort(sorter);
65881
+ return {
65882
+ domain: breakDomain(data, points),
65883
+ scope: breakScope(data, points)
65884
+ };
65885
+ }
65886
+
65584
65887
  const e10 = Math.sqrt(50);
65585
65888
  const e5 = Math.sqrt(10);
65586
65889
  const e2 = Math.sqrt(2);
@@ -65672,13 +65975,73 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65672
65975
  return this._scale.scale(value);
65673
65976
  }
65674
65977
  computeLinearDomain(data) {
65675
- const domain = [];
65978
+ let domain = [];
65676
65979
  if (data.length) {
65980
+ const userSetBreaks = this._spec.breaks && this._spec.breaks.length;
65981
+ let values = [];
65982
+ let minDomain;
65983
+ let maxDomain;
65677
65984
  data.forEach(d => {
65678
65985
  const { min, max } = d;
65679
- domain[0] = domain[0] === undefined ? min : Math.min(domain[0], min);
65680
- domain[1] = domain[1] === undefined ? max : Math.max(domain[1], max);
65986
+ minDomain = minDomain === undefined ? min : Math.min(minDomain, min);
65987
+ maxDomain = maxDomain === undefined ? max : Math.max(maxDomain, max);
65988
+ if (userSetBreaks) {
65989
+ values = values.concat(d.values);
65990
+ }
65681
65991
  });
65992
+ if (userSetBreaks) {
65993
+ let breakDomains = [];
65994
+ let breakScopes = [];
65995
+ let breakRanges;
65996
+ let source = [...values];
65997
+ if (this._spec.breaks.length === 1) {
65998
+ const { domain, scope } = breakData(source, this._spec.breaks[0].range);
65999
+ breakDomains = domain;
66000
+ breakScopes = scope;
66001
+ breakRanges = [this._spec.breaks[0].range];
66002
+ }
66003
+ else {
66004
+ breakRanges = this._spec.breaks
66005
+ .map((breakSpec) => breakSpec.range)
66006
+ .sort((a, b) => a[0] - b[0]);
66007
+ for (let index = 0; index < breakRanges.length; index++) {
66008
+ const breakRange = breakRanges[index];
66009
+ const { domain, scope } = breakData(source, breakRange);
66010
+ let finalScope = scope;
66011
+ const finalDomain = domain;
66012
+ if (index > 0) {
66013
+ const lastRatio = last(breakScopes)[1];
66014
+ const restRarioRange = 1 - lastRatio;
66015
+ finalScope = scope.map(eachScope => {
66016
+ return [lastRatio + eachScope[0] * restRarioRange, lastRatio + eachScope[1] * restRarioRange];
66017
+ });
66018
+ finalDomain[0][0] = last(breakDomains)[1];
66019
+ }
66020
+ breakDomains.push(finalDomain[0]);
66021
+ breakScopes.push(finalScope[0]);
66022
+ if (finalDomain.length > 2) {
66023
+ breakDomains.push(finalDomain[1]);
66024
+ breakScopes.push(finalScope[1]);
66025
+ }
66026
+ if (index === breakRanges.length - 1) {
66027
+ breakDomains.push(last(finalDomain));
66028
+ breakScopes.push(last(finalScope));
66029
+ }
66030
+ else {
66031
+ source = source.filter(val => val >= last(finalDomain)[0]);
66032
+ }
66033
+ }
66034
+ }
66035
+ domain = combineArray(breakDomains);
66036
+ this._break = {
66037
+ domain: breakDomains,
66038
+ scope: breakScopes,
66039
+ range: breakRanges
66040
+ };
66041
+ }
66042
+ else {
66043
+ domain = [minDomain, maxDomain];
66044
+ }
65682
66045
  }
65683
66046
  else {
65684
66047
  domain[0] = 0;
@@ -65725,7 +66088,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65725
66088
  num = Math.abs(num);
65726
66089
  if (num < 1) {
65727
66090
  domain[0] = 0;
65728
- domain[1] = 1;
66091
+ domain[domain.length - 1] = 1;
65729
66092
  }
65730
66093
  else {
65731
66094
  let step = num / DEFAULT_TICK_COUNT;
@@ -65733,12 +66096,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65733
66096
  const err = step / Math.pow(10, power);
65734
66097
  step = (err >= e10 ? 10 : err >= e5 ? 5 : err >= e2 ? 2 : 1) * Math.pow(10, power);
65735
66098
  domain[0] = 0;
65736
- domain[1] = step * 10;
66099
+ domain[domain.length - 1] = step * 10;
65737
66100
  }
65738
66101
  if (flag < 0) {
65739
66102
  domain.reverse();
65740
66103
  domain[0] *= -1;
65741
- domain[1] *= -1;
66104
+ domain[domain.length - 1] *= -1;
65742
66105
  }
65743
66106
  }
65744
66107
  return domain;
@@ -65788,7 +66151,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65788
66151
  }
65789
66152
  const { min, max } = this._domain;
65790
66153
  isValid$1(min) && (domain[0] = min);
65791
- isValid$1(max) && (domain[1] = max);
66154
+ isValid$1(max) && (domain[domain.length - 1] = max);
65792
66155
  }
65793
66156
  setSoftDomainMinMax(domain) {
65794
66157
  const { softMin, softMax } = this._spec;
@@ -65805,10 +66168,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65805
66168
  if (isValid$1(softMax)) {
65806
66169
  let softMaxValue = isFunction$1(softMax) ? softMax(domain) : softMax;
65807
66170
  if (isNil$1(softMaxValue)) {
65808
- softMaxValue = domain[1];
66171
+ softMaxValue = domain[domain.length - 1];
65809
66172
  }
65810
- if (softMaxValue >= domain[1]) {
65811
- domain[1] = softMaxValue;
66173
+ if (softMaxValue >= domain[domain.length - 1]) {
66174
+ domain[domain.length - 1] = softMaxValue;
65812
66175
  }
65813
66176
  this._softMaxValue = softMaxValue;
65814
66177
  }
@@ -65847,7 +66210,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65847
66210
  return this._domainAfterSpec;
65848
66211
  }
65849
66212
  _updateNiceLabelFormatter(domain) {
65850
- const domainSpan = Math.abs(domain[1] - domain[0]);
66213
+ const domainSpan = Math.abs(domain[domain.length - 1] - domain[0]);
65851
66214
  const n = Math.max(-Math.floor(Math.log10(domainSpan)), 0) + 2;
65852
66215
  const unit = Math.pow(10, n);
65853
66216
  this.niceLabelFormatter = (value) => {
@@ -65884,6 +66247,45 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65884
66247
  }
65885
66248
  this._scale.domain(range);
65886
66249
  }
66250
+ _tickTransformOption() {
66251
+ var _a;
66252
+ return Object.assign(Object.assign({}, super._tickTransformOption()), { breakData: ((_a = this._spec.breaks) === null || _a === void 0 ? void 0 : _a.length) ? () => this._break : null });
66253
+ }
66254
+ _getUpdateAttribute(ignoreGrid) {
66255
+ var _a;
66256
+ const attrs = super._getUpdateAttribute(ignoreGrid);
66257
+ if (!isZAxis(this._orient) && ((_a = this._spec.breaks) === null || _a === void 0 ? void 0 : _a.length) && this._break) {
66258
+ const { width, height } = this.getLayoutRect();
66259
+ const isX = isXAxis(this._orient);
66260
+ const axisLength = isX ? width : height;
66261
+ attrs.breaks = this._spec.breaks.map(obj => {
66262
+ const { range, breakSymbol, gap = 6 } = obj;
66263
+ const index = this._break.domain.findIndex(domainRange => range[0] === domainRange[0] && range[1] === domainRange[1]);
66264
+ const ratio = 1 - (this._break.scope[index][0] + this._break.scope[index][1]) / 2;
66265
+ let gapRatio;
66266
+ if (isPercent(gap)) {
66267
+ gapRatio = Number(gap.substring(0, gap.length - 1)) / 100;
66268
+ }
66269
+ else {
66270
+ gapRatio = gap / axisLength;
66271
+ }
66272
+ return {
66273
+ range: [ratio - gapRatio / 2, ratio + gapRatio / 2],
66274
+ breakSymbol: Object.assign({ visible: true }, breakSymbol),
66275
+ rawRange: range
66276
+ };
66277
+ });
66278
+ }
66279
+ return attrs;
66280
+ }
66281
+ getNewScaleRange() {
66282
+ var _a, _b;
66283
+ let newRange = super.getNewScaleRange();
66284
+ if (((_a = this._spec.breaks) === null || _a === void 0 ? void 0 : _a.length) && ((_b = this._break) === null || _b === void 0 ? void 0 : _b.scope)) {
66285
+ newRange = combineArray(this._break.scope).map(val => newRange[0] + (last(newRange) - newRange[0]) * val);
66286
+ }
66287
+ return newRange;
66288
+ }
65887
66289
  computeDomain(data) {
65888
66290
  return this.computeLinearDomain(data);
65889
66291
  }
@@ -67071,7 +67473,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67071
67473
  if (!constructor) {
67072
67474
  return;
67073
67475
  }
67074
- const { spec } = specInfo, others = __rest$7(specInfo, ["spec"]);
67476
+ const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
67075
67477
  const region = new constructor(spec, Object.assign(Object.assign({}, this._modelOption), others));
67076
67478
  if (region) {
67077
67479
  region.created();
@@ -67082,7 +67484,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67082
67484
  if (!constructor) {
67083
67485
  return;
67084
67486
  }
67085
- const { spec } = specInfo, others = __rest$7(specInfo, ["spec"]);
67487
+ const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
67086
67488
  let region;
67087
67489
  if (isValid$1(spec.regionId)) {
67088
67490
  region = this.getRegionsInUserId(spec.regionId);
@@ -74489,7 +74891,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
74489
74891
  return specInfos;
74490
74892
  }
74491
74893
  static createComponent(specInfo, options) {
74492
- const { spec } = specInfo, others = __rest$7(specInfo, ["spec"]);
74894
+ const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
74493
74895
  const C = Factory$1.getComponentInKey(others.type);
74494
74896
  if (C) {
74495
74897
  return new C(spec, Object.assign(Object.assign({}, options), others));
@@ -74802,7 +75204,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
74802
75204
  return { outerRadius, innerRadius };
74803
75205
  }
74804
75206
  _update(attrs) {
74805
- const { grid: gridAttrs } = attrs, axisAttrs = __rest$7(attrs, ["grid"]);
75207
+ const { grid: gridAttrs } = attrs, axisAttrs = __rest$d(attrs, ["grid"]);
74806
75208
  const axisProduct = this._axisMark.getProduct();
74807
75209
  axisProduct.encode(mergeSpec({}, this._axisStyle, axisAttrs));
74808
75210
  if (this._gridMark) {
@@ -77016,12 +77418,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
77016
77418
  }
77017
77419
  }
77018
77420
  initMarkStyleOfWord(wordMark, wordSpec, colorHexField, seriesField, isFillingWord) {
77019
- var _a, _b;
77421
+ var _a, _b, _c, _d;
77020
77422
  if (!wordMark) {
77021
77423
  return;
77022
77424
  }
77023
77425
  this.setMarkStyle(wordMark, {
77024
- fill: this.getWordColor,
77025
77426
  text: (wordSpec === null || wordSpec === void 0 ? void 0 : wordSpec.formatMethod)
77026
77427
  ? (datum) => {
77027
77428
  return wordSpec.formatMethod(datum);
@@ -77037,7 +77438,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
77037
77438
  visible: datum => datum.visible
77038
77439
  }, 'normal', AttributeLevel.Series);
77039
77440
  this.setMarkStyle(wordMark, {
77040
- fontFamily: (_b = (_a = wordSpec === null || wordSpec === void 0 ? void 0 : wordSpec.style) === null || _a === void 0 ? void 0 : _a.fontFamily) !== null && _b !== void 0 ? _b : this._defaultFontFamily
77441
+ fontFamily: (_b = (_a = wordSpec === null || wordSpec === void 0 ? void 0 : wordSpec.style) === null || _a === void 0 ? void 0 : _a.fontFamily) !== null && _b !== void 0 ? _b : this._defaultFontFamily,
77442
+ fill: (_d = (_c = wordSpec === null || wordSpec === void 0 ? void 0 : wordSpec.style) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this.getWordColor
77041
77443
  }, 'normal', AttributeLevel.User_Mark);
77042
77444
  }
77043
77445
  initTooltip() {
@@ -81349,6 +81751,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81349
81751
  getActiveMarks() {
81350
81752
  return [this._sunburstMark];
81351
81753
  }
81754
+ getMarkData(datum) {
81755
+ return (datum === null || datum === void 0 ? void 0 : datum.datum) ? datum.datum[datum.datum.length - 1] : datum;
81756
+ }
81352
81757
  }
81353
81758
  SunburstSeries.type = exports.SeriesTypeEnum.sunburst;
81354
81759
  SunburstSeries.mark = sunburstSeriesMark;
@@ -81613,6 +82018,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81613
82018
  getActiveMarks() {
81614
82019
  return [this._circlePackingMark];
81615
82020
  }
82021
+ getMarkData(datum) {
82022
+ return (datum === null || datum === void 0 ? void 0 : datum.datum) ? datum.datum[datum.datum.length - 1] : datum;
82023
+ }
81616
82024
  }
81617
82025
  CirclePackingSeries.type = exports.SeriesTypeEnum.circlePacking;
81618
82026
  CirclePackingSeries.mark = circlePackingSeriesMark;
@@ -83308,6 +83716,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
83308
83716
  getActiveMarks() {
83309
83717
  return [this._nodeMark, this._linkMark];
83310
83718
  }
83719
+ getMarkData(datum) {
83720
+ if (datum.datum) {
83721
+ if (isArray$1(datum.datum)) {
83722
+ return datum.datum[datum.datum.length - 1];
83723
+ }
83724
+ return datum.datum;
83725
+ }
83726
+ return datum;
83727
+ }
83311
83728
  }
83312
83729
  SankeySeries.type = exports.SeriesTypeEnum.sankey;
83313
83730
  SankeySeries.transformerConstructor = SankeySeriesSpecTransformer;
@@ -83344,7 +83761,26 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
83344
83761
  constructor() {
83345
83762
  super(...arguments);
83346
83763
  this.markTooltipKeyCallback = (datum) => {
83347
- return datum === null || datum === void 0 ? void 0 : datum[this.series.getDimensionField()[0]];
83764
+ var _a, _b;
83765
+ return (_b = (_a = this.series) === null || _a === void 0 ? void 0 : _a.getMarkData(datum)) === null || _b === void 0 ? void 0 : _b[this.series.getDimensionField()[0]];
83766
+ };
83767
+ this.markTooltipValueCallback = (datum) => {
83768
+ var _a, _b;
83769
+ const { measureFields } = this._seriesCacheInfo;
83770
+ const data = (_a = this.series) === null || _a === void 0 ? void 0 : _a.getMarkData(datum);
83771
+ if (measureFields[0] && data) {
83772
+ return (_b = data[measureFields[0]]) !== null && _b !== void 0 ? _b : datum.value;
83773
+ }
83774
+ return undefined;
83775
+ };
83776
+ this.dimensionTooltipTitleCallback = (datum) => {
83777
+ var _a;
83778
+ const { dimensionFields } = this._seriesCacheInfo;
83779
+ const data = (_a = this.series) === null || _a === void 0 ? void 0 : _a.getMarkData(datum);
83780
+ if (dimensionFields[0] && data) {
83781
+ return data[dimensionFields[0]];
83782
+ }
83783
+ return undefined;
83348
83784
  };
83349
83785
  }
83350
83786
  get defaultShapeType() {
@@ -83396,6 +83832,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
83396
83832
  super(...arguments);
83397
83833
  this.type = exports.SeriesTypeEnum.treemap;
83398
83834
  this.transformerConstructor = TreemapSeriesSpecTransformer;
83835
+ this._categoryField = 'name';
83836
+ this._valueField = 'value';
83399
83837
  this._viewBox = new Bounds();
83400
83838
  this._enableAnimationHook = this.enableMarkAnimation.bind(this);
83401
83839
  this.isHierarchyData = () => {
@@ -83457,6 +83895,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
83457
83895
  viewDataProduct.transform([
83458
83896
  {
83459
83897
  type: 'treemap',
83898
+ nameField: this._categoryField,
83899
+ valueField: this._valueField,
83460
83900
  x0: this._viewBox.x1,
83461
83901
  x1: this._viewBox.x2,
83462
83902
  y0: this._viewBox.y1,
@@ -83478,7 +83918,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
83478
83918
  callback: (datum) => {
83479
83919
  if (datum) {
83480
83920
  [DEFAULT_HIERARCHY_ROOT, 'name'].forEach(key => {
83481
- datum[key] = datum.datum[datum.depth][key];
83921
+ datum[key] = datum.datum[datum.depth][this._categoryField];
83482
83922
  });
83483
83923
  }
83484
83924
  return datum;
@@ -83505,13 +83945,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
83505
83945
  }
83506
83946
  getRawDataStatisticsByField(field, isNumeric) {
83507
83947
  var _a;
83508
- if (!this._rawDataStatistics) {
83509
- const rawDataName = `${this.type}_${this.id}_rawDataStatic`;
83510
- this._rawDataStatistics = this._createHierarchyDataStatistics(rawDataName, [this._rawData]);
83511
- this._rawData.target.removeListener('change', this._rawDataStatistics.reRunAllTransform);
83512
- this._rawDataStatistics.reRunAllTransform();
83948
+ if (!this._rawStatisticsCache) {
83949
+ this._rawStatisticsCache = {};
83513
83950
  }
83514
- return (_a = this._rawDataStatistics.latestData) === null || _a === void 0 ? void 0 : _a[field];
83951
+ if (!this._rawStatisticsCache[field]) {
83952
+ if (this._rawData) {
83953
+ const result = hierarchyDimensionStatistics([this._rawData], {
83954
+ fields: [{ key: field, operations: isNumeric ? ['min', 'max'] : ['values'] }]
83955
+ })[field];
83956
+ this._rawStatisticsCache[field] = merge$2((_a = this._rawStatisticsCache[field]) !== null && _a !== void 0 ? _a : {}, result);
83957
+ }
83958
+ }
83959
+ return this._rawStatisticsCache[field];
83515
83960
  }
83516
83961
  _createHierarchyDataStatistics(dataName, rawData) {
83517
83962
  registerDataSetInstanceTransform(this._dataSet, 'hierarchyDimensionStatistics', hierarchyDimensionStatistics);
@@ -83784,6 +84229,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
83784
84229
  getActiveMarks() {
83785
84230
  return [this._nonLeafMark, this._leafMark];
83786
84231
  }
84232
+ getMarkData(datum) {
84233
+ return (datum === null || datum === void 0 ? void 0 : datum.datum) ? datum.datum[datum.datum.length - 1] : datum;
84234
+ }
83787
84235
  }
83788
84236
  TreemapSeries.type = exports.SeriesTypeEnum.treemap;
83789
84237
  TreemapSeries.mark = treemapSeriesMark;
@@ -86987,7 +87435,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86987
87435
  if (!constructor) {
86988
87436
  return;
86989
87437
  }
86990
- const { spec } = specInfo, others = __rest$7(specInfo, ["spec"]);
87438
+ const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
86991
87439
  if (spec.type === exports.SeriesTypeEnum.link) {
86992
87440
  spec.dotSeriesSpec = this._spec.series[spec.dotSeriesIndex];
86993
87441
  }
@@ -87921,7 +88369,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87921
88369
  }
87922
88370
 
87923
88371
  function getLegendAttributes(spec, rect) {
87924
- const { title = {}, item = {}, pager = {}, background = {}, type, id, visible, orient, position, data, filter, regionId, regionIndex, seriesIndex, seriesId, padding } = spec, restSpec = __rest$7(spec, ["title", "item", "pager", "background", "type", "id", "visible", "orient", "position", "data", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding"]);
88372
+ const { title = {}, item = {}, pager = {}, background = {}, type, id, visible, orient, position, data, filter, regionId, regionIndex, seriesIndex, seriesId, padding } = spec, restSpec = __rest$d(spec, ["title", "item", "pager", "background", "type", "id", "visible", "orient", "position", "data", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding"]);
87925
88373
  const attrs = restSpec;
87926
88374
  if (title.visible) {
87927
88375
  attrs.title = transformLegendTitleAttributes(title);
@@ -88525,7 +88973,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88525
88973
  if (datumField && !isEmpty(selectedRange)) {
88526
88974
  const [min, max] = selectedRange;
88527
88975
  if (isHierarchy(data)) {
88528
- return filterHierarchyDataByRange(data, +min, +max);
88976
+ return filterHierarchyDataByRange(data, +min, +max, datumField);
88529
88977
  }
88530
88978
  else {
88531
88979
  return data.filter(datum => {
@@ -88537,7 +88985,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88537
88985
  };
88538
88986
 
88539
88987
  function getContinuousLegendAttributes(spec) {
88540
- const _a = mergeSpec({}, spec), { title = {}, handler = {}, rail = {}, track = {}, startText, endText, handlerText, sizeBackground, background = {}, type, id, visible, orient, position, data, defaultSelected, field, filter, regionId, regionIndex, seriesIndex, seriesId, padding } = _a, restSpec = __rest$7(_a, ["title", "handler", "rail", "track", "startText", "endText", "handlerText", "sizeBackground", "background", "type", "id", "visible", "orient", "position", "data", "defaultSelected", "field", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding"]);
88988
+ const _a = mergeSpec({}, spec), { title = {}, handler = {}, rail = {}, track = {}, startText, endText, handlerText, sizeBackground, background = {}, type, id, visible, orient, position, data, defaultSelected, field, filter, regionId, regionIndex, seriesIndex, seriesId, padding } = _a, restSpec = __rest$d(_a, ["title", "handler", "rail", "track", "startText", "endText", "handlerText", "sizeBackground", "background", "type", "id", "visible", "orient", "position", "data", "defaultSelected", "field", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding"]);
88541
88989
  const attrs = restSpec;
88542
88990
  if (title.visible) {
88543
88991
  attrs.title = transformLegendTitleAttributes(title);
@@ -90608,7 +91056,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
90608
91056
  else {
90609
91057
  const style = line.style || {};
90610
91058
  const { stroke, fill, lineWidth } = style;
90611
- const _d = style, { strokeOpacity, fillOpacity, opacity } = _d, restStyle = __rest$7(_d, ["strokeOpacity", "fillOpacity", "opacity"]);
91059
+ const _d = style, { strokeOpacity, fillOpacity, opacity } = _d, restStyle = __rest$d(_d, ["strokeOpacity", "fillOpacity", "opacity"]);
90612
91060
  const isLineType = hair.type === 'line';
90613
91061
  let finalOpacity = isLineType ? strokeOpacity : fillOpacity;
90614
91062
  if (isNumber$1(opacity)) {
@@ -90637,7 +91085,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
90637
91085
  if (!!label.visible) {
90638
91086
  const labelBackground = label.labelBackground || {};
90639
91087
  const labelStyle = label.style || {};
90640
- const _e = labelBackground.style || {}, { fill: rectFill = 'rgba(47, 59, 82, 0.9)', stroke: rectStroke, outerBorder } = _e, rectStyle = __rest$7(_e, ["fill", "stroke", "outerBorder"]);
91088
+ const _e = labelBackground.style || {}, { fill: rectFill = 'rgba(47, 59, 82, 0.9)', stroke: rectStroke, outerBorder } = _e, rectStyle = __rest$d(_e, ["fill", "stroke", "outerBorder"]);
90641
91089
  hair.label = {
90642
91090
  visible: true,
90643
91091
  formatMethod: label.formatMethod,
@@ -91330,7 +91778,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91330
91778
  const bandWidth = series.angleAxisHelper.getBandwidth(0);
91331
91779
  currValueAngle.forEach((_a) => {
91332
91780
  var _b;
91333
- var { axis, value, coord } = _a, rest = __rest$7(_a, ["axis", "value", "coord"]);
91781
+ var { axis, value, coord } = _a, rest = __rest$d(_a, ["axis", "value", "coord"]);
91334
91782
  value = value !== null && value !== void 0 ? value : '';
91335
91783
  mergeSpec(angleCrossHairInfo, rest);
91336
91784
  const angle = series.angleAxisHelper.dataToPosition([value]);
@@ -91350,7 +91798,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91350
91798
  radiusCrossHairInfo.visible = !!currValueRadius.size;
91351
91799
  currValueRadius.forEach((_a) => {
91352
91800
  var _b;
91353
- var { axis, value, coord } = _a, rest = __rest$7(_a, ["axis", "value", "coord"]);
91801
+ var { axis, value, coord } = _a, rest = __rest$d(_a, ["axis", "value", "coord"]);
91354
91802
  value = value !== null && value !== void 0 ? value : '';
91355
91803
  const niceLabelFormatter = axis.niceLabelFormatter;
91356
91804
  if ((_b = radiusHair.label) === null || _b === void 0 ? void 0 : _b.visible) {
@@ -91788,7 +92236,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91788
92236
  });
91789
92237
  let filter = null;
91790
92238
  if (isContinuous()) {
91791
- filter = (d) => d[datumField] >= newDomain[0] && d[datumField] <= newDomain[1];
92239
+ filter = (d) => d[datumField] >= newDomain[0] && d[datumField] <= last(newDomain);
91792
92240
  }
91793
92241
  else {
91794
92242
  filter = (d) => {
@@ -92286,15 +92734,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92286
92734
  const domain = scale.domain();
92287
92735
  if (isContinuous(scale.type)) {
92288
92736
  if (this._isReverse()) {
92289
- return domain[0] + (domain[1] - domain[0]) * (1 - state);
92737
+ return domain[0] + (last(domain) - domain[0]) * (1 - state);
92290
92738
  }
92291
- return domain[0] + (domain[1] - domain[0]) * state;
92739
+ return domain[0] + (last(domain) - domain[0]) * state;
92292
92740
  }
92293
92741
  let range = scale.range();
92294
92742
  if (this._isReverse()) {
92295
92743
  range = range.slice().reverse();
92296
92744
  }
92297
- const posInRange = range[0] + (range[1] - range[0]) * state;
92745
+ const posInRange = range[0] + (last(range) - range[0]) * state;
92298
92746
  return scale.invert(posInRange);
92299
92747
  }
92300
92748
  dataToStatePoint(data) {
@@ -92304,7 +92752,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92304
92752
  if (!this._isHorizontal && isContinuous(scale.type)) {
92305
92753
  range = range.slice().reverse();
92306
92754
  }
92307
- return (pos - range[0]) / (range[1] - range[0]);
92755
+ return (pos - range[0]) / (last(range) - range[0]);
92308
92756
  }
92309
92757
  _modeCheck(statePoint, mode) {
92310
92758
  if (statePoint === 'start') {
@@ -92338,12 +92786,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92338
92786
  this._end = end;
92339
92787
  this._minSpan = (_a = this._spec.minSpan) !== null && _a !== void 0 ? _a : 0;
92340
92788
  this._maxSpan = (_b = this._spec.maxSpan) !== null && _b !== void 0 ? _b : 1;
92341
- if (isContinuous(this._stateScale.type) && this._stateScale.domain()[0] !== this._stateScale.domain()[1]) {
92789
+ if (isContinuous(this._stateScale.type) && this._stateScale.domain()[0] !== last(this._stateScale.domain())) {
92342
92790
  if (this._spec.minValueSpan) {
92343
- this._minSpan = this._spec.minValueSpan / (this._stateScale.domain()[1] - this._stateScale.domain()[0]);
92791
+ this._minSpan = this._spec.minValueSpan / (last(this._stateScale.domain()) - this._stateScale.domain()[0]);
92344
92792
  }
92345
92793
  if (this._spec.maxValueSpan) {
92346
- this._maxSpan = this._spec.maxValueSpan / (this._stateScale.domain()[1] - this._stateScale.domain()[0]);
92794
+ this._maxSpan = this._spec.maxValueSpan / (last(this._stateScale.domain()) - this._stateScale.domain()[0]);
92347
92795
  }
92348
92796
  }
92349
92797
  this._minSpan = Math.max(0, this._minSpan);
@@ -92815,7 +93263,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92815
93263
  return false;
92816
93264
  }
92817
93265
  const domain = scale.domain();
92818
- if (isContinuous(scale.type) && domain[0] === domain[1]) {
93266
+ if (isContinuous(scale.type) && domain[0] === last(domain)) {
92819
93267
  return false;
92820
93268
  }
92821
93269
  if (isDiscrete(scale.type) && uniqArray(domain).length === 1) {
@@ -93708,7 +94156,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93708
94156
  return { minX, maxX, minY, maxY };
93709
94157
  }
93710
94158
  function transformLabelAttributes(label, markerData) {
93711
- const { labelBackground = {}, style, shape } = label, restLabel = __rest$7(label, ["labelBackground", "style", "shape"]);
94159
+ const { labelBackground = {}, style, shape } = label, restLabel = __rest$d(label, ["labelBackground", "style", "shape"]);
93712
94160
  if (label.visible !== false) {
93713
94161
  const labelAttrs = restLabel;
93714
94162
  if (shape === null || shape === void 0 ? void 0 : shape.visible) {
@@ -93945,7 +94393,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93945
94393
  function markerAggregation(_data, options) {
93946
94394
  let markerSource;
93947
94395
  if (options.coordinates) {
93948
- const _a = options, { coordinates: coordinatesInOptions, coordinateType, getSeriesByIdOrIndex } = _a, rest = __rest$7(_a, ["coordinates", "coordinateType", "getSeriesByIdOrIndex"]);
94396
+ const _a = options, { coordinates: coordinatesInOptions, coordinateType, getSeriesByIdOrIndex } = _a, rest = __rest$d(_a, ["coordinates", "coordinateType", "getSeriesByIdOrIndex"]);
93949
94397
  let coordinates;
93950
94398
  if (isFunction$1(coordinatesInOptions)) {
93951
94399
  const relativeSeries = options.getRelativeSeries();
@@ -96149,7 +96597,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96149
96597
  _createMarkerComponent() {
96150
96598
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
96151
96599
  const { itemContent = {}, itemLine = {}, targetSymbol = {} } = this._spec;
96152
- const { text: label = {}, symbol, image, richText } = itemContent, restItemContent = __rest$7(itemContent, ["text", "symbol", "image", "richText"]);
96600
+ const { text: label = {}, symbol, image, richText } = itemContent, restItemContent = __rest$d(itemContent, ["text", "symbol", "image", "richText"]);
96153
96601
  const markPointAttrs = {
96154
96602
  zIndex: this.layoutZIndex,
96155
96603
  interactive: (_a = this._spec.interactive) !== null && _a !== void 0 ? _a : true,
@@ -96193,7 +96641,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96193
96641
  if (richText === null || richText === void 0 ? void 0 : richText.style) {
96194
96642
  markPointAttrs.itemContent.richTextStyle = transformStyle(richText.style, this._markerData);
96195
96643
  }
96196
- const { visible, line = {} } = itemLine, restItemLine = __rest$7(itemLine, ["visible", "line"]);
96644
+ const { visible, line = {} } = itemLine, restItemLine = __rest$d(itemLine, ["visible", "line"]);
96197
96645
  if (visible !== false) {
96198
96646
  markPointAttrs.itemLine = Object.assign(Object.assign({}, restItemLine), { visible: true, lineStyle: transformToGraphic(line.style) });
96199
96647
  }
@@ -96765,13 +97213,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96765
97213
  else {
96766
97214
  const range = axis.getScale().range();
96767
97215
  const rangeFactor = (_b = axis.getScale().rangeFactor()) !== null && _b !== void 0 ? _b : [0, 1];
96768
- const isAxisReverse = range[1] < range[0];
97216
+ const isAxisReverse = last(range) < range[0];
96769
97217
  const startPosTemp = boundsStart - region.getLayoutStartPoint()[regionStartAttr];
96770
97218
  const endPosTemp = boundsEnd - region.getLayoutStartPoint()[regionStartAttr];
96771
97219
  const endPos = isAxisReverse ? Math.min(startPosTemp, endPosTemp) : Math.max(startPosTemp, endPosTemp);
96772
97220
  const startPos = isAxisReverse ? Math.max(startPosTemp, endPosTemp) : Math.min(startPosTemp, endPosTemp);
96773
- const start = ((startPos - range[0]) / (range[1] - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
96774
- const end = ((endPos - range[0]) / (range[1] - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
97221
+ const start = ((startPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
97222
+ const end = ((endPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
96775
97223
  const newStart = this._stateClamp(start - axisRangeExpand);
96776
97224
  const newEnd = this._stateClamp(end + axisRangeExpand);
96777
97225
  axis.getScale().rangeFactor([newStart, newEnd]);