@visactor/vchart 1.12.2-alpha.1 → 1.12.2-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/build/es5/index.js +2 -2
  2. package/build/index.js +283 -206
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/animation/config.js +2 -2
  6. package/cjs/animation/config.js.map +1 -1
  7. package/cjs/animation/utils.js +5 -4
  8. package/cjs/animation/utils.js.map +1 -1
  9. package/cjs/chart/base/base-chart.js +1 -1
  10. package/cjs/chart/base/base-chart.js.map +1 -1
  11. package/cjs/chart/sankey/sankey-transformer.js +2 -1
  12. package/cjs/chart/sankey/sankey-transformer.js.map +1 -1
  13. package/cjs/compile/compilable-base.js +2 -1
  14. package/cjs/compile/util.js +1 -2
  15. package/cjs/component/axis/cartesian/linear-axis.js +12 -9
  16. package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
  17. package/cjs/component/axis/interface/spec.d.ts +1 -1
  18. package/cjs/component/axis/interface/spec.js.map +1 -1
  19. package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +2 -1
  20. package/cjs/component/axis/mixin/linear-axis-mixin.js +15 -25
  21. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  22. package/cjs/component/axis/mixin/util/break-data.js +1 -1
  23. package/cjs/component/axis/mixin/util/break-data.js.map +1 -1
  24. package/cjs/component/brush/brush.js +6 -2
  25. package/cjs/component/brush/brush.js.map +1 -1
  26. package/cjs/component/brush/interface.d.ts +1 -0
  27. package/cjs/component/brush/interface.js.map +1 -1
  28. package/cjs/component/data-zoom/data-filter-base-component.js +3 -1
  29. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  30. package/cjs/component/indicator/indicator.js +29 -16
  31. package/cjs/component/indicator/indicator.js.map +1 -1
  32. package/cjs/core/index.d.ts +1 -1
  33. package/cjs/core/index.js +1 -1
  34. package/cjs/core/index.js.map +1 -1
  35. package/cjs/scale/global-scale.js +2 -0
  36. package/cjs/scale/global-scale.js.map +1 -1
  37. package/cjs/series/bar/bar.js +3 -1
  38. package/cjs/series/bar/bar.js.map +1 -1
  39. package/cjs/series/sankey/interface.d.ts +1 -0
  40. package/cjs/series/sankey/interface.js.map +1 -1
  41. package/cjs/series/sankey/sankey.js +2 -1
  42. package/cjs/series/sankey/sankey.js.map +1 -1
  43. package/esm/animation/config.js +2 -2
  44. package/esm/animation/config.js.map +1 -1
  45. package/esm/animation/utils.js +1 -1
  46. package/esm/animation/utils.js.map +1 -1
  47. package/esm/chart/base/base-chart.js +1 -1
  48. package/esm/chart/base/base-chart.js.map +1 -1
  49. package/esm/chart/sankey/sankey-transformer.js +2 -1
  50. package/esm/chart/sankey/sankey-transformer.js.map +1 -1
  51. package/esm/compile/compilable-base.js +2 -1
  52. package/esm/compile/util.js +1 -2
  53. package/esm/component/axis/cartesian/linear-axis.js +13 -10
  54. package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
  55. package/esm/component/axis/interface/spec.d.ts +1 -1
  56. package/esm/component/axis/interface/spec.js.map +1 -1
  57. package/esm/component/axis/mixin/linear-axis-mixin.d.ts +2 -1
  58. package/esm/component/axis/mixin/linear-axis-mixin.js +15 -25
  59. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  60. package/esm/component/axis/mixin/util/break-data.js +1 -1
  61. package/esm/component/axis/mixin/util/break-data.js.map +1 -1
  62. package/esm/component/brush/brush.js +6 -2
  63. package/esm/component/brush/brush.js.map +1 -1
  64. package/esm/component/brush/interface.d.ts +1 -0
  65. package/esm/component/brush/interface.js.map +1 -1
  66. package/esm/component/data-zoom/data-filter-base-component.js +1 -1
  67. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  68. package/esm/component/indicator/indicator.js +29 -16
  69. package/esm/component/indicator/indicator.js.map +1 -1
  70. package/esm/core/index.d.ts +1 -1
  71. package/esm/core/index.js +1 -1
  72. package/esm/core/index.js.map +1 -1
  73. package/esm/scale/global-scale.js +1 -0
  74. package/esm/scale/global-scale.js.map +1 -1
  75. package/esm/series/bar/bar.js +1 -1
  76. package/esm/series/bar/bar.js.map +1 -1
  77. package/esm/series/sankey/interface.d.ts +1 -0
  78. package/esm/series/sankey/interface.js.map +1 -1
  79. package/esm/series/sankey/sankey.js +2 -1
  80. package/esm/series/sankey/sankey.js.map +1 -1
  81. package/package.json +13 -13
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$d(s, e) {
21
+ function __rest$e(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++) {
@@ -11979,7 +11979,7 @@
11979
11979
  delta = this._duringTime + delta * this.timeScale - this._startTime, this._duringTime = this._startTime;
11980
11980
  }
11981
11981
  this.status === AnimateStatus.INITIAL && (this.status = AnimateStatus.RUNNING, this._onStart && this._onStart.forEach(cb => cb()));
11982
- this.setPosition(this.rawPosition + delta * this.timeScale) && this.status === AnimateStatus.RUNNING && (this.status = AnimateStatus.END, this._onEnd && this._onEnd.forEach(cb => cb()));
11982
+ this.setPosition(Math.max(this.rawPosition, 0) + delta * this.timeScale) && this.status === AnimateStatus.RUNNING && (this.status = AnimateStatus.END, this._onEnd && this._onEnd.forEach(cb => cb()));
11983
11983
  }
11984
11984
  setPosition(rawPosition) {
11985
11985
  let sa,
@@ -12102,7 +12102,7 @@
12102
12102
  end = !1;
12103
12103
  const startAt = null !== (_a = this._startAt) && void 0 !== _a ? _a : 0;
12104
12104
  if (rawPosition < 0 && (rawPosition = 0), rawPosition < startAt) return this.rawPosition = rawPosition, !1;
12105
- if (rawPosition -= startAt, d <= 0) return end = !0, end;
12105
+ if (rawPosition -= startAt, d <= 0 && (end = !0, d < 0)) return end;
12106
12106
  if (loop = Math.floor(rawPosition / d), position = rawPosition - loop * d, end = rawPosition >= loopCount * d + d, end && (position = d, loop = loopCount, rawPosition = position * loop + d), rawPosition === prevRawPos) return end;
12107
12107
  const rev = !this.reversed != !(this.bounce && loop % 2);
12108
12108
  return rev && (position = d - position), this._deltaPosition = position - this.position, this.position = position, this.rawPosition = rawPosition + startAt, this.updatePosition(end, rev), end;
@@ -13682,7 +13682,7 @@
13682
13682
  var _a;
13683
13683
  data.loadState = (null == res ? void 0 : res.data) ? "success" : "fail", data.data = null == res ? void 0 : res.data, null === (_a = data.waitingMark) || void 0 === _a || _a.map((mark, index) => {
13684
13684
  (null == res ? void 0 : res.data) ? (data.loadState = "success", data.data = res.data, mark.imageLoadSuccess(svgStr, res.data)) : (data.loadState = "fail", mark.imageLoadFail(svgStr));
13685
- });
13685
+ }), data.waitingMark && (data.waitingMark = []);
13686
13686
  })) : (data.loadState = "fail", mark.imageLoadFail(svgStr)));
13687
13687
  }
13688
13688
  static GetFile(url, type) {
@@ -13713,7 +13713,7 @@
13713
13713
  var _a;
13714
13714
  data.loadState = (null == res ? void 0 : res.data) ? "success" : "fail", data.data = null == res ? void 0 : res.data, null === (_a = data.waitingMark) || void 0 === _a || _a.map((mark, index) => {
13715
13715
  (null == res ? void 0 : res.data) ? (data.loadState = "success", data.data = res.data, mark.imageLoadSuccess(url, res.data)) : (data.loadState = "fail", mark.imageLoadFail(url));
13716
- });
13716
+ }), data.waitingMark && (data.waitingMark = []);
13717
13717
  });
13718
13718
  promises.push(end);
13719
13719
  } else data.loadState = "fail", marks.forEach(mark => mark.imageLoadFail(url));
@@ -23036,7 +23036,7 @@
23036
23036
  release() {
23037
23037
  super.release(), this.hooks.beforeRender.unTap("constructor", this.beforeRender), this.hooks.afterRender.unTap("constructor", this.afterRender), this.eventSystem && this.eventSystem.release(), this.layerService.releaseStage(this), this.pluginService.release(), this.forEach(layer => {
23038
23038
  layer.release();
23039
- }), this.interactiveLayer && this.interactiveLayer.release(), this.window.release(), this.ticker.remTimeline(this.timeline), this.renderService.renderTreeRoots = [];
23039
+ }), this.interactiveLayer && (this.interactiveLayer.release(), this.interactiveLayer.removeAllChild()), this.window.release(), this.ticker.remTimeline(this.timeline), this.renderService.renderTreeRoots = [];
23040
23040
  }
23041
23041
  setStage(stage) {}
23042
23042
  dirty(b, matrix) {
@@ -24894,7 +24894,9 @@
24894
24894
  const bctx = vglobal.createCanvas({
24895
24895
  width: 1,
24896
24896
  height: 1
24897
- }).getContext("2d");
24897
+ }).getContext("2d", {
24898
+ willReadFrequently: !0
24899
+ });
24898
24900
  bctx.fillStyle = backgroundColor, bctx.fillRect(0, 0, 1, 1);
24899
24901
  const bgPixel = bctx.getImageData(0, 0, 1, 1).data;
24900
24902
  return (imageData, y, x) => {
@@ -24911,7 +24913,9 @@
24911
24913
  height: height,
24912
24914
  dpr: 1
24913
24915
  }),
24914
- tempContext = maskCanvas.getContext("2d");
24916
+ tempContext = maskCanvas.getContext("2d", {
24917
+ willReadFrequently: !0
24918
+ });
24915
24919
  if (cacheCanvas) {
24916
24920
  const prevWidth = cacheCanvas.width,
24917
24921
  prevHeight = cacheCanvas.height;
@@ -30435,7 +30439,7 @@
30435
30439
  registerGroup(), registerRect(), registerSymbol(), registerRichtext(), registerText();
30436
30440
  }
30437
30441
 
30438
- var __rest$c = undefined && undefined.__rest || function (s, e) {
30442
+ var __rest$d = undefined && undefined.__rest || function (s, e) {
30439
30443
  var t = {};
30440
30444
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
30441
30445
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -30453,10 +30457,11 @@
30453
30457
  return this._textShape;
30454
30458
  }
30455
30459
  constructor(attributes, options) {
30456
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Tag.defaultAttributes, attributes)), this.name = "tag";
30460
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Tag.defaultAttributes, attributes)), this.name = "tag", this._tagStates = [], this._rectStates = [], this._symbolStates = [], this._textStates = [];
30457
30461
  }
30458
30462
  render() {
30459
30463
  var _a, _b, _c;
30464
+ this.cacheStates();
30460
30465
  const {
30461
30466
  text = "",
30462
30467
  textStyle = {},
@@ -30486,7 +30491,7 @@
30486
30491
  const {
30487
30492
  visible: shapeVisible
30488
30493
  } = shape,
30489
- shapeStyle = __rest$c(shape, ["visible"]);
30494
+ shapeStyle = __rest$d(shape, ["visible"]);
30490
30495
  if (isBoolean$1(shapeVisible)) {
30491
30496
  const size = (null == shapeStyle ? void 0 : shapeStyle.size) || 10,
30492
30497
  maxSize = isNumber$1(size) ? size : Math.max(size[0], size[1]);
@@ -30517,7 +30522,7 @@
30517
30522
  const {
30518
30523
  visible: bgVisible
30519
30524
  } = panel,
30520
- backgroundStyle = __rest$c(panel, ["visible"]);
30525
+ backgroundStyle = __rest$d(panel, ["visible"]);
30521
30526
  if (visible && isBoolean$1(bgVisible)) {
30522
30527
  const bgRect = this.createOrUpdateChild("tag-panel", Object.assign(Object.assign({}, backgroundStyle), {
30523
30528
  visible: bgVisible && !!text,
@@ -30605,7 +30610,7 @@
30605
30610
  const {
30606
30611
  visible: bgVisible
30607
30612
  } = panel,
30608
- backgroundStyle = __rest$c(panel, ["visible"]);
30613
+ backgroundStyle = __rest$d(panel, ["visible"]);
30609
30614
  if (visible && isBoolean$1(bgVisible)) {
30610
30615
  const bgRect = this.createOrUpdateChild("tag-panel", Object.assign(Object.assign({}, backgroundStyle), {
30611
30616
  visible: bgVisible && !!text,
@@ -30621,7 +30626,24 @@
30621
30626
  this._bgRect = bgRect;
30622
30627
  }
30623
30628
  }
30624
- this._textShape = textShape;
30629
+ this._textShape = textShape, this._symbol = symbol, this.resetStates();
30630
+ }
30631
+ initAttributes(params, options) {
30632
+ params = (null == options ? void 0 : options.skipDefault) ? params : merge$2({}, Tag.defaultAttributes, params), super.initAttributes(params), this.render();
30633
+ }
30634
+ addState(stateName, keepCurrentStates, hasAnimation) {
30635
+ super.addState(stateName, keepCurrentStates, hasAnimation), this._textShape && this._textShape.addState(stateName, keepCurrentStates, hasAnimation), this._bgRect && this._bgRect.addState(stateName, keepCurrentStates, hasAnimation), this._symbol && this._symbol.addState(stateName, keepCurrentStates, hasAnimation);
30636
+ }
30637
+ removeState(stateName, hasAnimation) {
30638
+ super.removeState(stateName, hasAnimation), this._textShape && this._textShape.removeState(stateName, hasAnimation), this._bgRect && this._bgRect.removeState(stateName, hasAnimation), this._symbol && this._symbol.removeState(stateName, hasAnimation);
30639
+ }
30640
+ cacheStates() {
30641
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
30642
+ this._tagStates = null !== (_b = null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.slice()) && void 0 !== _b ? _b : [], this._rectStates = null !== (_e = null === (_d = null === (_c = this._bgRect) || void 0 === _c ? void 0 : _c.currentStates) || void 0 === _d ? void 0 : _d.slice()) && void 0 !== _e ? _e : [], this._symbolStates = null !== (_h = null === (_g = null === (_f = this._symbol) || void 0 === _f ? void 0 : _f.currentStates) || void 0 === _g ? void 0 : _g.slice()) && void 0 !== _h ? _h : [], this._textStates = null !== (_l = null === (_k = null === (_j = this._textShape) || void 0 === _j ? void 0 : _j.currentStates) || void 0 === _k ? void 0 : _k.slice()) && void 0 !== _l ? _l : [], this.clearStates(), null === (_m = this._bgRect) || void 0 === _m || _m.clearStates(), null === (_o = this._symbol) || void 0 === _o || _o.clearStates(), null === (_p = this._textShape) || void 0 === _p || _p.clearStates();
30643
+ }
30644
+ resetStates() {
30645
+ var _a, _b, _c;
30646
+ this._tagStates.length && this.useStates(this._tagStates), this._rectStates.length && (null === (_a = this._bgRect) || void 0 === _a || _a.useStates(this._rectStates)), this._symbolStates.length && (null === (_b = this._symbol) || void 0 === _b || _b.useStates(this._symbolStates)), this._textStates.length && (null === (_c = this._textShape) || void 0 === _c || _c.useStates(this._textStates));
30625
30647
  }
30626
30648
  }
30627
30649
  Tag.defaultAttributes = {
@@ -30671,7 +30693,7 @@
30671
30693
  merge$2(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);
30672
30694
  }
30673
30695
 
30674
- var __rest$b = undefined && undefined.__rest || function (s, e) {
30696
+ var __rest$c = undefined && undefined.__rest || function (s, e) {
30675
30697
  var t = {};
30676
30698
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
30677
30699
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -30758,7 +30780,7 @@
30758
30780
  const {
30759
30781
  visible: bgVisible
30760
30782
  } = panel,
30761
- backgroundStyle = __rest$b(panel, ["visible"]),
30783
+ backgroundStyle = __rest$c(panel, ["visible"]),
30762
30784
  symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12,
30763
30785
  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),
30764
30786
  lineWidth = null !== (_e = backgroundStyle.lineWidth) && void 0 !== _e ? _e : 1,
@@ -31769,7 +31791,7 @@
31769
31791
  registerGroup(), registerText(), registerRichtext(), registerLine();
31770
31792
  }
31771
31793
 
31772
- var __rest$a = undefined && undefined.__rest || function (s, e) {
31794
+ var __rest$b = undefined && undefined.__rest || function (s, e) {
31773
31795
  var t = {};
31774
31796
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
31775
31797
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -31790,7 +31812,7 @@
31790
31812
  const {
31791
31813
  data: data
31792
31814
  } = attributes,
31793
- restAttributes = __rest$a(attributes, ["data"]);
31815
+ restAttributes = __rest$b(attributes, ["data"]);
31794
31816
  super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
31795
31817
  data: data
31796
31818
  }, merge$2({}, LabelBase.defaultAttributes, restAttributes))), this.name = "label", this._onHover = e => {
@@ -32319,7 +32341,7 @@
32319
32341
  };
32320
32342
  const getLabelComponent = type => labelComponentMap[type];
32321
32343
 
32322
- var __rest$9 = undefined && undefined.__rest || function (s, e) {
32344
+ var __rest$a = undefined && undefined.__rest || function (s, e) {
32323
32345
  var t = {};
32324
32346
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
32325
32347
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -32333,7 +32355,7 @@
32333
32355
  const {
32334
32356
  data: data
32335
32357
  } = attributes,
32336
- restAttributes = __rest$9(attributes, ["data"]);
32358
+ restAttributes = __rest$a(attributes, ["data"]);
32337
32359
  super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
32338
32360
  data: data
32339
32361
  }, merge$2({}, SymbolLabel.defaultAttributes, restAttributes))), this.name = "symbol-label";
@@ -32355,7 +32377,7 @@
32355
32377
  registerLabelComponent("symbol", SymbolLabel), registerLabelComponent("line-data", SymbolLabel);
32356
32378
  };
32357
32379
 
32358
- var __rest$8 = undefined && undefined.__rest || function (s, e) {
32380
+ var __rest$9 = undefined && undefined.__rest || function (s, e) {
32359
32381
  var t = {};
32360
32382
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
32361
32383
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -32369,7 +32391,7 @@
32369
32391
  const {
32370
32392
  data: data
32371
32393
  } = attributes,
32372
- restAttributes = __rest$8(attributes, ["data"]);
32394
+ restAttributes = __rest$9(attributes, ["data"]);
32373
32395
  super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
32374
32396
  data: data
32375
32397
  }, merge$2({}, RectLabel.defaultAttributes, restAttributes)));
@@ -32419,7 +32441,7 @@
32419
32441
  registerLabelComponent("rect", RectLabel);
32420
32442
  };
32421
32443
 
32422
- var __rest$7 = undefined && undefined.__rest || function (s, e) {
32444
+ var __rest$8 = undefined && undefined.__rest || function (s, e) {
32423
32445
  var t = {};
32424
32446
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
32425
32447
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -32433,7 +32455,7 @@
32433
32455
  const {
32434
32456
  data: data
32435
32457
  } = attributes,
32436
- restAttributes = __rest$7(attributes, ["data"]);
32458
+ restAttributes = __rest$8(attributes, ["data"]);
32437
32459
  super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
32438
32460
  data: data
32439
32461
  }, merge$2({}, LineLabel.defaultAttributes, restAttributes))), this.name = "line-label";
@@ -32473,7 +32495,7 @@
32473
32495
  registerLabelComponent("line", LineLabel$1), registerLabelComponent("area", LineLabel$1);
32474
32496
  };
32475
32497
 
32476
- var __rest$6 = undefined && undefined.__rest || function (s, e) {
32498
+ var __rest$7 = undefined && undefined.__rest || function (s, e) {
32477
32499
  var t = {};
32478
32500
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
32479
32501
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -32505,7 +32527,7 @@
32505
32527
  const {
32506
32528
  data: data
32507
32529
  } = attributes,
32508
- restAttributes = __rest$6(attributes, ["data"]);
32530
+ restAttributes = __rest$7(attributes, ["data"]);
32509
32531
  super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
32510
32532
  data: data
32511
32533
  }, merge$2({}, ArcLabel.defaultAttributes, restAttributes))), this.name = "arc-label", this._ellipsisWidth = 0, this._arcLeft = new Map(), this._arcRight = new Map();
@@ -32594,6 +32616,7 @@
32594
32616
  case "inside":
32595
32617
  case "inside-inner":
32596
32618
  case "inside-outer":
32619
+ case "inside-center":
32597
32620
  arcs.push(...this._layoutInsideLabels(rightArcs, attribute, currentMarks)), arcs.push(...this._layoutInsideLabels(leftArcs, attribute, currentMarks));
32598
32621
  break;
32599
32622
  default:
@@ -32627,7 +32650,7 @@
32627
32650
  align = this._computeAlign(arc, attribute);
32628
32651
  let labelRadius,
32629
32652
  alignOffset = 0;
32630
- if ("inside" === position && (alignOffset = "left" === align ? labelWidth : "right" === align ? 0 : labelWidth / 2), labelRadius = "inside-inner" === position ? innerRadius - offsetRadius + alignOffset : outerRadius + offsetRadius - alignOffset, arc.labelPosition = polarToCartesian(arc.circleCenter, labelRadius, arc.middleAngle), arc.labelLimit = labelWidth, isGreater(labelWidth, 0) || (arc.labelVisible = !1), !1 !== labelConfig.rotate) {
32653
+ if ("inside" === position && (alignOffset = "left" === align ? labelWidth : "right" === align ? 0 : labelWidth / 2), labelRadius = "inside-inner" === position ? innerRadius - offsetRadius + alignOffset : "inside-center" === position ? innerRadius + (outerRadius - innerRadius) / 2 : outerRadius + offsetRadius - alignOffset, arc.labelPosition = polarToCartesian(arc.circleCenter, labelRadius, arc.middleAngle), arc.labelLimit = labelWidth, isGreater(labelWidth, 0) || (arc.labelVisible = !1), !1 !== labelConfig.rotate) {
32631
32654
  arc.angle = null !== (_b = null === (_a = attribute.textStyle) || void 0 === _a ? void 0 : _a.angle) && void 0 !== _b ? _b : arc.middleAngle;
32632
32655
  let offsetAngle = null !== (_c = labelConfig.offsetAngle) && void 0 !== _c ? _c : 0;
32633
32656
  ["inside-inner", "inside-outer"].includes(position) && (offsetAngle += Math.PI / 2), arc.angle += offsetAngle;
@@ -32997,7 +33020,7 @@
32997
33020
  return Math.min(width / 2, height / 2);
32998
33021
  }
32999
33022
  _canPlaceInside(textBound, shapeBound) {
33000
- return "inside" === this.attribute.position;
33023
+ return "inside" === this.attribute.position || "inside-center" === this.attribute.position;
33001
33024
  }
33002
33025
  computeLayoutOuterRadius(r, width, height) {
33003
33026
  return r / (Math.min(width, height) / 2);
@@ -33035,7 +33058,7 @@
33035
33058
  registerLabelComponent("arc", ArcLabel);
33036
33059
  };
33037
33060
 
33038
- var __rest$5 = undefined && undefined.__rest || function (s, e) {
33061
+ var __rest$6 = undefined && undefined.__rest || function (s, e) {
33039
33062
  var t = {};
33040
33063
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
33041
33064
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -33049,7 +33072,7 @@
33049
33072
  const {
33050
33073
  dataLabels: dataLabels
33051
33074
  } = attributes,
33052
- restAttributes = __rest$5(attributes, ["dataLabels"]);
33075
+ restAttributes = __rest$6(attributes, ["dataLabels"]);
33053
33076
  super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
33054
33077
  dataLabels: dataLabels
33055
33078
  }, merge$2({}, DataLabel.defaultAttributes, restAttributes))), this.name = "data-label";
@@ -33470,12 +33493,13 @@
33470
33493
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
33471
33494
  var _a, _b;
33472
33495
  const {
33473
- style = {}
33496
+ style = {},
33497
+ angle = .5 * Math.PI
33474
33498
  } = props,
33475
33499
  symbolStyle = merge$2({}, DEFAULT_AXIS_BREAK_SYMBOL_STYLE, style),
33476
33500
  symbolSize = null !== (_a = symbolStyle.size) && void 0 !== _a ? _a : DEFAULT_AXIS_BREAK_SYMBOL_STYLE.size;
33477
33501
  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}`,
33502
+ symbolType: null !== (_b = symbolStyle.symbolType) && void 0 !== _b ? _b : `M ${-symbolSize / 2} ${symbolSize * Math.sin(angle)} L ${symbolSize / 2} ${-symbolSize * Math.sin(angle)}`,
33479
33503
  symbolSize: symbolSize
33480
33504
  });
33481
33505
  }
@@ -34135,7 +34159,7 @@
34135
34159
  registerGroup(), registerPath();
34136
34160
  }
34137
34161
 
34138
- var __rest$4 = undefined && undefined.__rest || function (s, e) {
34162
+ var __rest$5 = undefined && undefined.__rest || function (s, e) {
34139
34163
  var t = {};
34140
34164
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
34141
34165
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -34223,7 +34247,7 @@
34223
34247
  style: style,
34224
34248
  state: state
34225
34249
  } = _a,
34226
- restLineAttrs = __rest$4(_a, ["startSymbol", "endSymbol", "style", "state"]),
34250
+ restLineAttrs = __rest$5(_a, ["startSymbol", "endSymbol", "style", "state"]),
34227
34251
  lineAttrs = Object.assign({
34228
34252
  startSymbol: startSymbol,
34229
34253
  endSymbol: endSymbol,
@@ -34260,7 +34284,7 @@
34260
34284
  state = {},
34261
34285
  maxWidth: maxWidth
34262
34286
  } = _d,
34263
- restAttrs = __rest$4(_d, ["position", "space", "textStyle", "autoRotate", "shape", "background", "state", "maxWidth"]);
34287
+ restAttrs = __rest$5(_d, ["position", "space", "textStyle", "autoRotate", "shape", "background", "state", "maxWidth"]);
34264
34288
  let percent = .5;
34265
34289
  "start" === position ? percent = 0 : "end" === position && (percent = 1);
34266
34290
  const {
@@ -34556,7 +34580,7 @@
34556
34580
  }
34557
34581
  }
34558
34582
 
34559
- var __rest$3 = undefined && undefined.__rest || function (s, e) {
34583
+ var __rest$4 = undefined && undefined.__rest || function (s, e) {
34560
34584
  var t = {};
34561
34585
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
34562
34586
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -34615,7 +34639,7 @@
34615
34639
  background: background,
34616
34640
  state = {}
34617
34641
  } = _d,
34618
- restAttrs = __rest$3(_d, ["space", "textStyle", "shape", "background", "state"]);
34642
+ restAttrs = __rest$4(_d, ["space", "textStyle", "shape", "background", "state"]);
34619
34643
  let titlePoint = center,
34620
34644
  labelHeight = 0;
34621
34645
  (null === (_a = this.attribute.label) || void 0 === _a ? void 0 : _a.visible) && !1 === this.attribute.label.inside && (labelHeight = get$1(this.attribute.label, "style.fontSize", 12) + get$1(this.attribute.label, "space", 4));
@@ -35847,9 +35871,10 @@
35847
35871
  const {
35848
35872
  breakData: breakData
35849
35873
  } = op;
35850
- if (breakData) {
35874
+ if (breakData && breakData()) {
35851
35875
  const {
35852
- range: breakRanges
35876
+ range: breakRanges,
35877
+ scope: scope
35853
35878
  } = breakData(),
35854
35879
  domain = scale.domain();
35855
35880
  scaleTicks = [];
@@ -36409,7 +36434,7 @@
36409
36434
  }
36410
36435
  mixin(LineAxisGrid, LineAxisMixin);
36411
36436
 
36412
- var __rest$2 = undefined && undefined.__rest || function (s, e) {
36437
+ var __rest$3 = undefined && undefined.__rest || function (s, e) {
36413
36438
  var t = {};
36414
36439
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
36415
36440
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -36435,7 +36460,7 @@
36435
36460
  center: center,
36436
36461
  subGrid: subGrid
36437
36462
  } = _a,
36438
- grid = __rest$2(_a, ["radius", "innerRadius", "startAngle", "endAngle", "center", "subGrid"]),
36463
+ grid = __rest$3(_a, ["radius", "innerRadius", "startAngle", "endAngle", "center", "subGrid"]),
36439
36464
  {
36440
36465
  alignWithLabel = !0
36441
36466
  } = grid || {},
@@ -36628,7 +36653,7 @@
36628
36653
  loadTagComponent(), registerRect(), registerSymbol(), registerArea(), registerLine();
36629
36654
  }
36630
36655
 
36631
- var __rest$1 = undefined && undefined.__rest || function (s, e) {
36656
+ var __rest$2 = undefined && undefined.__rest || function (s, e) {
36632
36657
  var t = {};
36633
36658
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
36634
36659
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -36837,11 +36862,11 @@
36837
36862
  {
36838
36863
  formatMethod: startTextFormat
36839
36864
  } = startTextStyle,
36840
- restStartTextStyle = __rest$1(startTextStyle, ["formatMethod"]),
36865
+ restStartTextStyle = __rest$2(startTextStyle, ["formatMethod"]),
36841
36866
  {
36842
36867
  formatMethod: endTextFormat
36843
36868
  } = endTextStyle,
36844
- restEndTextStyle = __rest$1(endTextStyle, ["formatMethod"]),
36869
+ restEndTextStyle = __rest$2(endTextStyle, ["formatMethod"]),
36845
36870
  {
36846
36871
  start: start,
36847
36872
  end: end
@@ -39347,7 +39372,7 @@
39347
39372
  loadBaseLegend(), loadSliderComponent(), registerPath();
39348
39373
  }
39349
39374
 
39350
- var __rest = undefined && undefined.__rest || function (s, e) {
39375
+ var __rest$1 = undefined && undefined.__rest || function (s, e) {
39351
39376
  var t = {};
39352
39377
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
39353
39378
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -39797,7 +39822,7 @@
39797
39822
  space: pagerSpace = DEFAULT_PAGER_SPACE,
39798
39823
  defaultCurrent = 1
39799
39824
  } = pager,
39800
- compStyle = __rest(pager, ["space", "defaultCurrent"]),
39825
+ compStyle = __rest$1(pager, ["space", "defaultCurrent"]),
39801
39826
  {
39802
39827
  isHorizontal: isHorizontal
39803
39828
  } = this._itemContext;
@@ -39865,7 +39890,7 @@
39865
39890
  space: pagerSpace = DEFAULT_PAGER_SPACE,
39866
39891
  defaultCurrent = 1
39867
39892
  } = pager,
39868
- compStyle = __rest(pager, ["space", "defaultCurrent"]),
39893
+ compStyle = __rest$1(pager, ["space", "defaultCurrent"]),
39869
39894
  {
39870
39895
  isHorizontal: isHorizontal
39871
39896
  } = this._itemContext;
@@ -50466,10 +50491,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
50466
50491
  var _b;
50467
50492
  const matched = 1 === diff.prev.length && 1 === diff.next.length && diff.prev[0].markType === diff.next[0].markType,
50468
50493
  enableMarkMorphConfig = diff.prev.every(mark => mark.getMorphConfig().morph) && diff.next.every(mark => mark.getMorphConfig().morph);
50469
- matched && runningConfig.reuse ? (diff.next[0].reuse(diff.prev[0]), diff.prev[0].detachAll(), diff.prev[0].clear(), this._cachedGrammars.unrecord(diff.prev[0])) : (runningConfig.morph && enableMarkMorphConfig || runningConfig.morphAll) && (null === (_b = this.addMorphMarks) || void 0 === _b || _b.call(this, {
50494
+ runningConfig.morph && enableMarkMorphConfig || runningConfig.morphAll ? null === (_b = this.addMorphMarks) || void 0 === _b || _b.call(this, {
50470
50495
  prev: diff.prev,
50471
50496
  next: diff.next
50472
- }));
50497
+ }) : matched && runningConfig.reuse && (diff.next[0].reuse(diff.prev[0]), diff.prev[0].detachAll(), diff.prev[0].clear(), this._cachedGrammars.unrecord(diff.prev[0]));
50473
50498
  });
50474
50499
  }
50475
50500
  detachCachedGrammar() {
@@ -51884,6 +51909,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
51884
51909
  Factory.registerGraphicComponent(AxisEnum.circleAxis, attrs => new CircleAxis(attrs)), Factory.registerComponent(ComponentEnum.axis, Axis);
51885
51910
  };
51886
51911
 
51912
+ var __rest = undefined && undefined.__rest || function (s, e) {
51913
+ var t = {};
51914
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
51915
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
51916
+ var i = 0;
51917
+ 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]]);
51918
+ }
51919
+ return t;
51920
+ };
51887
51921
  const generateLabelAttributes = function (marks, groupSize, encoder, labelStyle, parameters) {
51888
51922
  let theme = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
51889
51923
  var _a;
@@ -51924,34 +51958,44 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
51924
51958
  }
51925
51959
  const data = null !== (_b = addition.data) && void 0 !== _b ? _b : [],
51926
51960
  themeDatum = null !== (_d = null === (_c = null == currentTheme ? void 0 : currentTheme.data) || void 0 === _c ? void 0 : _c[0]) && void 0 !== _d ? _d : {};
51927
- data && data.length > 0 ? data.forEach((d, index) => {
51961
+ if (data && data.length > 0) data.forEach((d, index) => {
51928
51962
  if (mark.elements[index]) {
51929
51963
  const attributes = invokeEncoder(encoder, d, mark.elements[index], labelParameters);
51930
51964
  merge$2(d, themeDatum, attributes);
51931
51965
  }
51932
- }) : mark.elements.forEach(element => {
51933
- if ("willRelease" !== element.getGraphicItem().releaseStatus) if (mark.isCollectionMark()) {
51934
- element.getDatum().forEach(entry => {
51935
- const attributes = invokeEncoder(encoder, entry, element, labelParameters);
51936
- data.push(merge$2({}, themeDatum, attributes));
51937
- });
51938
- } else {
51939
- const attributes = invokeEncoder(encoder, element.getDatum(), element, labelParameters),
51940
- datum = merge$2({}, themeDatum, attributes);
51941
- data.push(datum);
51942
- }
51943
- });
51944
- const graphicItemName = null === (_e = mark.graphicItem) || void 0 === _e ? void 0 : _e.name;
51945
- return merge$2({}, currentTheme, {
51946
- data: data,
51947
- baseMarkGroupName: graphicItemName,
51948
- getBaseMarks: () => mark.elements.map(element => element.getGraphicItem())
51949
- }, null != addition ? addition : {});
51950
- }).filter(label => !isNil$1(label));
51951
- return merge$2({}, labelTheme, {
51952
- size: groupSize,
51953
- dataLabels: dataLabels
51954
- });
51966
+ });else {
51967
+ const mergeAttributes = (attributes, themeDatum) => {
51968
+ const {
51969
+ data: labelData
51970
+ } = attributes,
51971
+ restAttribute = __rest(attributes, ["data"]);
51972
+ return Object.assign({
51973
+ data: labelData
51974
+ }, merge$2({}, themeDatum, restAttribute));
51975
+ };
51976
+ mark.elements.forEach(element => {
51977
+ if ("willRelease" !== element.getGraphicItem().releaseStatus) if (mark.isCollectionMark()) {
51978
+ element.getDatum().forEach(entry => {
51979
+ const attributes = invokeEncoder(encoder, entry, element, labelParameters);
51980
+ data.push(mergeAttributes(attributes, themeDatum));
51981
+ });
51982
+ } else {
51983
+ const attributes = invokeEncoder(encoder, element.getDatum(), element, labelParameters);
51984
+ data.push(mergeAttributes(attributes, themeDatum));
51985
+ }
51986
+ });
51987
+ }
51988
+ const graphicItemName = null === (_e = mark.graphicItem) || void 0 === _e ? void 0 : _e.name,
51989
+ result = merge$2({}, currentTheme, {
51990
+ baseMarkGroupName: graphicItemName,
51991
+ getBaseMarks: () => mark.elements.map(element => element.getGraphicItem())
51992
+ }, null != addition ? addition : {});
51993
+ return result.data = null != data ? data : currentTheme.data, result;
51994
+ }).filter(label => !isNil$1(label)),
51995
+ result = merge$2({}, labelTheme, {
51996
+ size: groupSize
51997
+ });
51998
+ return result.dataLabels = dataLabels, result;
51955
51999
  };
51956
52000
  let Label$1 = class Label extends Component {
51957
52001
  constructor(view, group) {
@@ -58873,7 +58917,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
58873
58917
  this._product.encode(updateStyles, true);
58874
58918
  }
58875
58919
  _separateStyle() {
58876
- const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL, normalStyle = _a[_b]; __rest$d(_a, [typeof _b === "symbol" ? _b : _b + ""]);
58920
+ const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL, normalStyle = _a[_b]; __rest$e(_a, [typeof _b === "symbol" ? _b : _b + ""]);
58877
58921
  const enterStyles = this._option.noSeparateStyle ? null : {};
58878
58922
  const updateStyles = {};
58879
58923
  Object.keys(normalStyle).forEach(key => {
@@ -58893,7 +58937,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
58893
58937
  return { enterStyles, updateStyles };
58894
58938
  }
58895
58939
  compileEncode() {
58896
- const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL; _a[_b]; const temp = __rest$d(_a, [typeof _b === "symbol" ? _b : _b + ""]);
58940
+ const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL; _a[_b]; const temp = __rest$e(_a, [typeof _b === "symbol" ? _b : _b + ""]);
58897
58941
  const { enterStyles, updateStyles } = this._separateStyle();
58898
58942
  this._product.encode(updateStyles, true);
58899
58943
  this._product.encodeState('group', enterStyles, true);
@@ -59338,7 +59382,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59338
59382
  }
59339
59383
  _computeGradientAttr(gradientStyle) {
59340
59384
  var _a, _b;
59341
- const { gradient, scale, field } = gradientStyle, rest = __rest$d(gradientStyle, ["gradient", "scale", "field"]);
59385
+ const { gradient, scale, field } = gradientStyle, rest = __rest$e(gradientStyle, ["gradient", "scale", "field"]);
59342
59386
  let colorScale = scale;
59343
59387
  let colorField = field;
59344
59388
  if ((!scale || !field) && this.model.modelType === 'series') {
@@ -59385,7 +59429,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59385
59429
  };
59386
59430
  }
59387
59431
  _computeBorderAttr(borderStyle) {
59388
- const { scale, field } = borderStyle, mergedStyle = __rest$d(borderStyle, ["scale", "field"]);
59432
+ const { scale, field } = borderStyle, mergedStyle = __rest$e(borderStyle, ["scale", "field"]);
59389
59433
  return (data, opt) => {
59390
59434
  var _a, _b, _c;
59391
59435
  const computeStyle = {};
@@ -59792,7 +59836,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59792
59836
  };
59793
59837
  this._option = merge$2(this._option, { animation: spec.animation !== false }, options);
59794
59838
  this._onError = (_a = this._option) === null || _a === void 0 ? void 0 : _a.onError;
59795
- const _g = this._option, { dom, renderCanvas, mode, stage, poptip } = _g, restOptions = __rest$d(_g, ["dom", "renderCanvas", "mode", "stage", "poptip"]);
59839
+ const _g = this._option, { dom, renderCanvas, mode, stage, poptip } = _g, restOptions = __rest$e(_g, ["dom", "renderCanvas", "mode", "stage", "poptip"]);
59796
59840
  const isTrueBrowseEnv = isTrueBrowser(mode);
59797
59841
  if (isTrueBrowseEnv) {
59798
59842
  registerBrowserEnv();
@@ -60944,7 +60988,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
60944
60988
  };
60945
60989
  registerVChartCore();
60946
60990
 
60947
- const version = "1.12.2-alpha.1";
60991
+ const version = "1.12.2-alpha.3";
60948
60992
 
60949
60993
  const addVChartProperty = (data, op) => {
60950
60994
  const context = op.beforeCall();
@@ -61521,10 +61565,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61521
61565
  update: [
61522
61566
  {
61523
61567
  type: 'update',
61524
- options: { excludeChannels: ['points', 'defined'] }
61568
+ options: { excludeChannels: ['points', 'defined', 'segments'] }
61525
61569
  },
61526
61570
  {
61527
- channel: ['points'],
61571
+ channel: ['points', 'segments'],
61528
61572
  custom: TagPointsUpdate,
61529
61573
  duration: DEFAULT_ANIMATION_CONFIG.update.duration,
61530
61574
  easing: DEFAULT_ANIMATION_CONFIG.update.easing,
@@ -61589,7 +61633,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61589
61633
  View.useRegisters([registerGrowPointsInAnimation, registerGrowPointsOutAnimation]);
61590
61634
  };
61591
61635
 
61592
- const AnimationStates = Object.keys(DEFAULT_ANIMATION_CONFIG);
61636
+ const AnimationStates = [...Object.keys(DEFAULT_ANIMATION_CONFIG), 'normal'];
61593
61637
  function animationConfig(defaultConfig = {}, userConfig, params) {
61594
61638
  const config = {};
61595
61639
  for (let i = 0; i < AnimationStates.length; i++) {
@@ -64442,7 +64486,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64442
64486
 
64443
64487
  class BaseComponent extends LayoutModel {
64444
64488
  static createComponent(specInfo, options) {
64445
- const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
64489
+ const { spec } = specInfo, others = __rest$e(specInfo, ["spec"]);
64446
64490
  return new this(spec, Object.assign(Object.assign({}, options), others));
64447
64491
  }
64448
64492
  getRegions() {
@@ -64943,7 +64987,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64943
64987
  };
64944
64988
  }
64945
64989
  if (spec.title && spec.title.visible) {
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"]);
64990
+ const _a = spec.title, { autoRotate, angle, style: titleStyle = {}, background: titleBackgroundSpec, state: titleState, shape: titleShapeSpec } = _a, restTitleAttrs = __rest$e(_a, ["autoRotate", "angle", "style", "background", "state", "shape"]);
64947
64991
  let titleAngle = angle;
64948
64992
  let titleTextStyle;
64949
64993
  if (spec.orient === 'left' || spec.orient === 'right') {
@@ -65180,7 +65224,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65180
65224
  };
65181
65225
  this._updateAxisLayout = () => {
65182
65226
  const startPoint = this.getLayoutStartPoint();
65183
- const _a = this._getUpdateAttribute(false), { grid: updateGridAttrs } = _a, updateAxisAttrs = __rest$d(_a, ["grid"]);
65227
+ const _a = this._getUpdateAttribute(false), { grid: updateGridAttrs } = _a, updateAxisAttrs = __rest$e(_a, ["grid"]);
65184
65228
  const axisProduct = this._axisMark.getProduct();
65185
65229
  const axisAttrs = mergeSpec({ x: startPoint.x, y: startPoint.y }, this._axisStyle, updateAxisAttrs);
65186
65230
  axisProduct.encode(axisAttrs);
@@ -65293,7 +65337,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65293
65337
  return specInfos;
65294
65338
  }
65295
65339
  static createComponent(specInfo, options) {
65296
- const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
65340
+ const { spec } = specInfo, others = __rest$e(specInfo, ["spec"]);
65297
65341
  const C = Factory$1.getComponentInKey(others.type);
65298
65342
  if (C) {
65299
65343
  return new C(spec, Object.assign(Object.assign({}, options), others));
@@ -65841,6 +65885,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65841
65885
  const min = data[0];
65842
65886
  const max = data[data.length - 1];
65843
65887
  const breaks = points.filter(point => point > min && point < max);
65888
+ if (breaks.length === 0) {
65889
+ return [[min, max]];
65890
+ }
65844
65891
  return setDomain(min, max, breaks);
65845
65892
  }
65846
65893
  const sorter = (a, b) => a - b;
@@ -65990,54 +66037,29 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65990
66037
  }
65991
66038
  });
65992
66039
  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];
66040
+ const breakRanges = [];
66041
+ const breaks = [];
66042
+ for (let index = 0; index < this._spec.breaks.length; index++) {
66043
+ const { range } = this._spec.breaks[index];
66044
+ if (range[0] <= range[1] && (range[1] <= maxDomain || range[1] <= minDomain)) {
66045
+ breakRanges.push(range);
66046
+ breaks.push(this._spec.breaks[index]);
66047
+ }
66048
+ }
66049
+ breakRanges.sort((a, b) => a[0] - b[0]);
66050
+ if (breakRanges.length) {
66051
+ const { domain: breakDomains, scope: breakScopes } = breakData(values, combineArray(breakRanges));
66052
+ domain = combineArray(breakDomains);
66053
+ this._break = {
66054
+ domain: breakDomains,
66055
+ scope: breakScopes,
66056
+ range: breakRanges,
66057
+ breaks
66058
+ };
66002
66059
  }
66003
66060
  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
- }
66061
+ domain = [minDomain, maxDomain];
66034
66062
  }
66035
- domain = combineArray(breakDomains);
66036
- this._break = {
66037
- domain: breakDomains,
66038
- scope: breakScopes,
66039
- range: breakRanges
66040
- };
66041
66063
  }
66042
66064
  else {
66043
66065
  domain = [minDomain, maxDomain];
@@ -66252,16 +66274,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66252
66274
  return Object.assign(Object.assign({}, super._tickTransformOption()), { breakData: ((_a = this._spec.breaks) === null || _a === void 0 ? void 0 : _a.length) ? () => this._break : null });
66253
66275
  }
66254
66276
  _getUpdateAttribute(ignoreGrid) {
66255
- var _a;
66277
+ var _a, _b;
66256
66278
  const attrs = super._getUpdateAttribute(ignoreGrid);
66257
- if (!isZAxis(this._orient) && ((_a = this._spec.breaks) === null || _a === void 0 ? void 0 : _a.length) && this._break) {
66279
+ if (!isZAxis(this._orient) && ((_b = (_a = this._break) === null || _a === void 0 ? void 0 : _a.breaks) === null || _b === void 0 ? void 0 : _b.length)) {
66258
66280
  const { width, height } = this.getLayoutRect();
66259
66281
  const isX = isXAxis(this._orient);
66260
66282
  const axisLength = isX ? width : height;
66261
- attrs.breaks = this._spec.breaks.map(obj => {
66283
+ attrs.breaks = this._break.breaks.map(obj => {
66262
66284
  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;
66285
+ const position = this.valueToPosition((range[0] + range[1]) / 2);
66286
+ const ratio = position / axisLength;
66265
66287
  let gapRatio;
66266
66288
  if (isPercent(gap)) {
66267
66289
  gapRatio = Number(gap.substring(0, gap.length - 1)) / 100;
@@ -66269,9 +66291,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66269
66291
  else {
66270
66292
  gapRatio = gap / axisLength;
66271
66293
  }
66294
+ const symbolAngle = isValidNumber$1(breakSymbol.angle) ? breakSymbol.angle : isX ? 60 : 15;
66272
66295
  return {
66273
66296
  range: [ratio - gapRatio / 2, ratio + gapRatio / 2],
66274
- breakSymbol: Object.assign({ visible: true }, breakSymbol),
66297
+ breakSymbol: Object.assign(Object.assign({ visible: true }, breakSymbol), { angle: (symbolAngle * Math.PI) / 180 }),
66275
66298
  rawRange: range
66276
66299
  };
66277
66300
  });
@@ -67060,6 +67083,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67060
67083
  result.reMake = true;
67061
67084
  return result;
67062
67085
  }
67086
+ if (!isEqual(lastSpec.specified, s.specified)) {
67087
+ result.reMake = true;
67088
+ return result;
67089
+ }
67063
67090
  if (s.range && !isEqual(s.range, scale.range())) {
67064
67091
  scale.range(s.range);
67065
67092
  result.reRender = true;
@@ -67473,7 +67500,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67473
67500
  if (!constructor) {
67474
67501
  return;
67475
67502
  }
67476
- const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
67503
+ const { spec } = specInfo, others = __rest$e(specInfo, ["spec"]);
67477
67504
  const region = new constructor(spec, Object.assign(Object.assign({}, this._modelOption), others));
67478
67505
  if (region) {
67479
67506
  region.created();
@@ -67484,7 +67511,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67484
67511
  if (!constructor) {
67485
67512
  return;
67486
67513
  }
67487
- const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
67514
+ const { spec } = specInfo, others = __rest$e(specInfo, ["spec"]);
67488
67515
  let region;
67489
67516
  if (isValid$1(spec.regionId)) {
67490
67517
  region = this.getRegionsInUserId(spec.regionId);
@@ -67758,7 +67785,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67758
67785
  }
67759
67786
  for (let i = 0; i < currentKeys.length; i++) {
67760
67787
  const key = currentKeys[i];
67761
- if (isArray$1(this._spec[key]) && this._spec[key].length !== spec[key].length) {
67788
+ if (isArray$1(this._spec[key]) && this._spec[key].length !== array(spec[key]).length) {
67762
67789
  result.reMake = true;
67763
67790
  return result;
67764
67791
  }
@@ -69677,9 +69704,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
69677
69704
  const depthFromSpec = this._groups ? this._groups.fields.length : 1;
69678
69705
  const depth = isNil$1(scaleDepth) ? depthFromSpec : Math.min(depthFromSpec, scaleDepth);
69679
69706
  const bandWidth = (_b = (_a = axisHelper.getBandwidth) === null || _a === void 0 ? void 0 : _a.call(axisHelper, depth - 1)) !== null && _b !== void 0 ? _b : DefaultBandWidth$2;
69680
- const hasBarWidth = this._spec.barWidth !== undefined && depth === depthFromSpec;
69681
- const hasBarMinWidth = this._spec.barMinWidth !== undefined;
69682
- const hasBarMaxWidth = this._spec.barMaxWidth !== undefined;
69707
+ const hasBarWidth = isValid$1(this._spec.barWidth) && depth === depthFromSpec;
69708
+ const hasBarMinWidth = isValid$1(this._spec.barMinWidth);
69709
+ const hasBarMaxWidth = isValid$1(this._spec.barMaxWidth);
69683
69710
  let width = bandWidth;
69684
69711
  if (hasBarWidth) {
69685
69712
  width = getActualNumValue(this._spec.barWidth, bandWidth);
@@ -74891,7 +74918,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
74891
74918
  return specInfos;
74892
74919
  }
74893
74920
  static createComponent(specInfo, options) {
74894
- const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
74921
+ const { spec } = specInfo, others = __rest$e(specInfo, ["spec"]);
74895
74922
  const C = Factory$1.getComponentInKey(others.type);
74896
74923
  if (C) {
74897
74924
  return new C(spec, Object.assign(Object.assign({}, options), others));
@@ -75204,7 +75231,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
75204
75231
  return { outerRadius, innerRadius };
75205
75232
  }
75206
75233
  _update(attrs) {
75207
- const { grid: gridAttrs } = attrs, axisAttrs = __rest$d(attrs, ["grid"]);
75234
+ const { grid: gridAttrs } = attrs, axisAttrs = __rest$e(attrs, ["grid"]);
75208
75235
  const axisProduct = this._axisMark.getProduct();
75209
75236
  axisProduct.encode(mergeSpec({}, this._axisStyle, axisAttrs));
75210
75237
  if (this._gridMark) {
@@ -78551,7 +78578,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78551
78578
  size: size,
78552
78579
  maskCanvas: maskCanvas
78553
78580
  } = segmentationInput,
78554
- imageData = maskCanvas.getContext("2d").getImageData(0, 0, maskCanvas.width, maskCanvas.height),
78581
+ imageData = maskCanvas.getContext("2d", {
78582
+ willReadFrequently: !0
78583
+ }).getImageData(0, 0, maskCanvas.width, maskCanvas.height),
78555
78584
  labels = new Array(size[0] * size[1]).fill(0);
78556
78585
  let curLabel = 1;
78557
78586
  const offset = [[0, 1], [1, 0], [-1, 0], [0, -1]];
@@ -78633,7 +78662,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78633
78662
  }
78634
78663
  function removeBorder(image, canvas, isEmptyPixel) {
78635
78664
  canvas.width = image.width, canvas.height = image.height;
78636
- const ctx = canvas.getContext("2d");
78665
+ const ctx = canvas.getContext("2d", {
78666
+ willReadFrequently: !0
78667
+ });
78637
78668
  ctx.clearRect(0, 0, canvas.width, canvas.height), ctx.drawImage(image, 0, 0);
78638
78669
  const width = canvas.width,
78639
78670
  imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
@@ -78728,7 +78759,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78728
78759
  shapeRatio: shapeRatio
78729
78760
  } = segmentationOutput,
78730
78761
  board = initBoardWithShape(segmentationOutput),
78731
- ctx = canvas.getContext("2d");
78762
+ ctx = canvas.getContext("2d", {
78763
+ willReadFrequently: !0
78764
+ });
78732
78765
  for (const region of regions) {
78733
78766
  const {
78734
78767
  words: regionWords,
@@ -78769,7 +78802,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78769
78802
  shapeMaxR: shapeMaxR,
78770
78803
  shapeRatio: shapeRatio
78771
78804
  } = segmentationOutput,
78772
- ctx = canvas.getContext("2d"),
78805
+ ctx = canvas.getContext("2d", {
78806
+ willReadFrequently: !0
78807
+ }),
78773
78808
  boardOrigin = initBoardWithShape(segmentationOutput);
78774
78809
  let board = boardOrigin.slice(0);
78775
78810
  const fontFactor = layoutConfig.fontSizeShrinkFactor;
@@ -78837,7 +78872,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78837
78872
  shapeMaxR: shapeMaxR,
78838
78873
  shapeRatio: shapeRatio
78839
78874
  } = segmentationOutput,
78840
- ctx = canvas.getContext("2d"),
78875
+ ctx = canvas.getContext("2d", {
78876
+ willReadFrequently: !0
78877
+ }),
78841
78878
  boardOrigin = initBoardWithShape(segmentationOutput);
78842
78879
  let board = boardOrigin.slice(0);
78843
78880
  const fontFactor = layoutConfig.fontSizeEnlargeFactor,
@@ -79086,7 +79123,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
79086
79123
  tempCanvas: canvas,
79087
79124
  randomGenerator: randomGenerator
79088
79125
  } = segmentationOutput,
79089
- ctx = canvas.getContext("2d");
79126
+ ctx = canvas.getContext("2d", {
79127
+ willReadFrequently: !0
79128
+ });
79090
79129
  let fontSize = fillingInitialFontSize,
79091
79130
  opacity = fillingInitialOpacity;
79092
79131
  const placedFillingWords = [];
@@ -79202,7 +79241,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
79202
79241
  width: options.size[0],
79203
79242
  height: options.size[1]
79204
79243
  }),
79205
- tempCtx = tempCanvas.getContext("2d");
79244
+ tempCtx = tempCanvas.getContext("2d", {
79245
+ willReadFrequently: !0
79246
+ });
79206
79247
  tempCtx.textAlign = "center", tempCtx.textBaseline = "middle", segmentationInput.tempCanvas = tempCanvas;
79207
79248
  const boardW = options.size[0] + 31 >> 5 << 5;
79208
79249
  if (segmentationInput.boardSize = [boardW, options.size[1]], segmentationInput.random ? segmentationInput.randomGenerator = Math.random : segmentationInput.randomGenerator = fakeRandom(), this.segmentationInput = segmentationInput, isString$1(segmentationInput.shapeUrl)) {
@@ -80733,6 +80774,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80733
80774
  let flattenIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1;
80734
80775
  let parent = arguments.length > 4 ? arguments[4] : undefined;
80735
80776
  let getNodeKey = arguments.length > 5 ? arguments[5] : undefined;
80777
+ let valueField = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : "value";
80736
80778
  let sum = 0,
80737
80779
  prevFlattenIndex = null != flattenIndex ? flattenIndex : -1,
80738
80780
  maxDepth = depth;
@@ -80744,16 +80786,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80744
80786
  maxDepth: -1,
80745
80787
  depth: depth,
80746
80788
  index: index,
80747
- value: datum.value,
80789
+ value: datum[valueField],
80748
80790
  isLeaf: !0,
80749
80791
  datum: parent ? parent.datum.concat(datum) : [datum],
80750
80792
  parentKey: null == parent ? void 0 : parent.key
80751
80793
  };
80752
80794
  if (null === (_b = datum.children) || void 0 === _b ? void 0 : _b.length) {
80753
80795
  node.children = [], node.isLeaf = !1;
80754
- const res = calculateNodeValue$1(datum.children, node.children, depth + 1, prevFlattenIndex, node, getNodeKey);
80755
- node.value = isNil$1(datum.value) ? res.sum : Math.max(res.sum, toValidNumber$1(datum.value)), prevFlattenIndex = res.flattenIndex, maxDepth = Math.max(res.maxDepth, maxDepth);
80756
- } else node.isLeaf = !0, node.value = toValidNumber$1(datum.value);
80796
+ const res = calculateNodeValue$1(datum.children, node.children, depth + 1, prevFlattenIndex, node, getNodeKey, valueField);
80797
+ node.value = isNil$1(datum[valueField]) ? res.sum : Math.max(res.sum, toValidNumber$1(datum[valueField])), prevFlattenIndex = res.flattenIndex, maxDepth = Math.max(res.maxDepth, maxDepth);
80798
+ } else node.isLeaf = !0, node.value = toValidNumber$1(datum[valueField]);
80757
80799
  sum += Math.abs(node.value), output.push(node);
80758
80800
  }), {
80759
80801
  sum: sum,
@@ -80863,7 +80905,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80863
80905
  height: Math.abs(config.y1 - config.y0)
80864
80906
  },
80865
80907
  nodes = [],
80866
- res = calculateNodeValue$1(data, nodes, 0, -1, null, this._getNodeKey);
80908
+ res = calculateNodeValue$1(data, nodes, 0, -1, null, this._getNodeKey, this.options.valueField);
80867
80909
  if (this._maxDepth = res.maxDepth, res.sum <= 0) return [];
80868
80910
  const root = {
80869
80911
  flattenIndex: -1,
@@ -82108,18 +82150,51 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82108
82150
  let links = result.links;
82109
82151
  if (this._nodeMap = result.nodeMap, this.computeNodeValues(nodes), this.computeNodeDepths(nodes), ["right", "end", "justify"].includes(this.options.nodeAlign) && this.computeNodeEndDepths(nodes), this._maxDepth <= 1) return null;
82110
82152
  const columns = this.computeNodeBreadths(nodes);
82111
- return this.computeLinkBreadths(nodes), nodes.forEach(node => {
82153
+ if (this.computeLinkBreadths(nodes), nodes.forEach(node => {
82112
82154
  node.sourceLinks = node.sourceLinks.filter(link => !isNil$1(link.source) && !isNil$1(link.target)), node.targetLinks = node.targetLinks.filter(link => !isNil$1(link.source) && !isNil$1(link.target));
82113
- }), links = links.filter(link => !isNil$1(link.source) && !isNil$1(link.target)), isVertical$1(this.options.direction) && (nodes.forEach(node => {
82114
- const y0 = node.y0,
82115
- y1 = node.y1;
82116
- node.y0 = node.x0, node.y1 = node.x1, node.x0 = y0, node.x1 = y1;
82155
+ }), links = links.filter(link => !isNil$1(link.source) && !isNil$1(link.target)), isVertical$1(this.options.direction)) {
82156
+ if (this.options.inverse) {
82157
+ const viewY1 = this._viewBox.x1;
82158
+ nodes.forEach(node => {
82159
+ const {
82160
+ y0: y0,
82161
+ y1: y1,
82162
+ x0: x0,
82163
+ x1: x1
82164
+ } = node;
82165
+ node.y0 = viewY1 - x1, node.y1 = viewY1 - x0, node.x0 = y0, node.x1 = y1;
82166
+ }), links.forEach(link => {
82167
+ link.vertical = !0;
82168
+ const {
82169
+ x0: x0,
82170
+ x1: x1,
82171
+ y0: y0,
82172
+ y1: y1
82173
+ } = link;
82174
+ link.x0 = y0, link.x1 = y1, link.y0 = viewY1 - x0, link.y1 = viewY1 - x1;
82175
+ });
82176
+ } else nodes.forEach(node => {
82177
+ const {
82178
+ y0: y0,
82179
+ y1: y1
82180
+ } = node;
82181
+ node.y0 = node.x0, node.y1 = node.x1, node.x0 = y0, node.x1 = y1;
82182
+ }), links.forEach(link => {
82183
+ link.vertical = !0;
82184
+ const x0 = link.x0,
82185
+ x1 = link.x1;
82186
+ link.x0 = link.y0, link.x1 = link.y1, link.y0 = x0, link.y1 = x1;
82187
+ });
82188
+ } else this.options.inverse && (nodes.forEach(node => {
82189
+ const {
82190
+ x0: x0,
82191
+ x1: x1
82192
+ } = node;
82193
+ node.x0 = viewBox.x1 - x1, node.x1 = viewBox.x1 - x0;
82117
82194
  }), links.forEach(link => {
82118
- link.vertical = !0;
82119
- const x0 = link.x0,
82120
- x1 = link.x1;
82121
- link.x0 = link.y0, link.x1 = link.y1, link.y0 = x0, link.y1 = x1;
82122
- })), links.forEach(link => {
82195
+ link.x0 = viewBox.x1 - link.x0, link.x1 = viewBox.x1 - link.x1;
82196
+ }));
82197
+ return links.forEach(link => {
82123
82198
  const sourceNode = this._nodeMap[link.source],
82124
82199
  targetNode = this._nodeMap[link.target];
82125
82200
  link.sourceRect = {
@@ -83361,7 +83436,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
83361
83436
  nodeHeight: this._spec.nodeHeight,
83362
83437
  linkHeight: this._spec.linkHeight,
83363
83438
  equalNodeHeight: this._spec.equalNodeHeight,
83364
- linkOverlap: this._spec.linkOverlap
83439
+ linkOverlap: this._spec.linkOverlap,
83440
+ inverse: this._spec.inverse
83365
83441
  },
83366
83442
  level: TransformLevel.sankeyLayout
83367
83443
  });
@@ -87435,7 +87511,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87435
87511
  if (!constructor) {
87436
87512
  return;
87437
87513
  }
87438
- const { spec } = specInfo, others = __rest$d(specInfo, ["spec"]);
87514
+ const { spec } = specInfo, others = __rest$e(specInfo, ["spec"]);
87439
87515
  if (spec.type === exports.SeriesTypeEnum.link) {
87440
87516
  spec.dotSeriesSpec = this._spec.series[spec.dotSeriesIndex];
87441
87517
  }
@@ -88183,7 +88259,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88183
88259
 
88184
88260
  class SankeyChartSpecTransformer extends BaseChartSpecTransformer {
88185
88261
  _getDefaultSeriesSpec(spec) {
88186
- const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { categoryField: spec.categoryField, valueField: spec.valueField, sourceField: spec.sourceField, targetField: spec.targetField, direction: spec.direction, nodeAlign: spec.nodeAlign, nodeGap: spec.nodeGap, nodeWidth: spec.nodeWidth, linkWidth: spec.linkWidth, minStepWidth: spec.minStepWidth, minNodeHeight: spec.minNodeHeight, minLinkHeight: spec.minLinkHeight, dropIsolatedNode: spec.dropIsolatedNode, nodeHeight: spec.nodeHeight, linkHeight: spec.linkHeight, equalNodeHeight: spec.equalNodeHeight, linkOverlap: spec.linkOverlap, iterations: spec.iterations, nodeKey: spec.nodeKey, linkSortBy: spec.linkSortBy, nodeSortBy: spec.nodeSortBy, setNodeLayer: spec.setNodeLayer, node: spec.node, link: spec.link, label: spec.label, emphasis: spec.emphasis });
88262
+ const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { categoryField: spec.categoryField, valueField: spec.valueField, sourceField: spec.sourceField, targetField: spec.targetField, direction: spec.direction, nodeAlign: spec.nodeAlign, nodeGap: spec.nodeGap, nodeWidth: spec.nodeWidth, linkWidth: spec.linkWidth, minStepWidth: spec.minStepWidth, minNodeHeight: spec.minNodeHeight, minLinkHeight: spec.minLinkHeight, dropIsolatedNode: spec.dropIsolatedNode, nodeHeight: spec.nodeHeight, linkHeight: spec.linkHeight, equalNodeHeight: spec.equalNodeHeight, linkOverlap: spec.linkOverlap, iterations: spec.iterations, nodeKey: spec.nodeKey, linkSortBy: spec.linkSortBy, nodeSortBy: spec.nodeSortBy, setNodeLayer: spec.setNodeLayer, node: spec.node, link: spec.link, label: spec.label, emphasis: spec.emphasis, inverse: spec.inverse });
88187
88263
  const seriesType = this.seriesType;
88188
88264
  if (seriesType) {
88189
88265
  series.type = seriesType;
@@ -88369,7 +88445,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88369
88445
  }
88370
88446
 
88371
88447
  function getLegendAttributes(spec, rect) {
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"]);
88448
+ const { title = {}, item = {}, pager = {}, background = {}, type, id, visible, orient, position, data, filter, regionId, regionIndex, seriesIndex, seriesId, padding } = spec, restSpec = __rest$e(spec, ["title", "item", "pager", "background", "type", "id", "visible", "orient", "position", "data", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding"]);
88373
88449
  const attrs = restSpec;
88374
88450
  if (title.visible) {
88375
88451
  attrs.title = transformLegendTitleAttributes(title);
@@ -88985,7 +89061,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88985
89061
  };
88986
89062
 
88987
89063
  function getContinuousLegendAttributes(spec) {
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"]);
89064
+ 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$e(_a, ["title", "handler", "rail", "track", "startText", "endText", "handlerText", "sizeBackground", "background", "type", "id", "visible", "orient", "position", "data", "defaultSelected", "field", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding"]);
88989
89065
  const attrs = restSpec;
88990
89066
  if (title.visible) {
88991
89067
  attrs.title = transformLegendTitleAttributes(title);
@@ -91056,7 +91132,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91056
91132
  else {
91057
91133
  const style = line.style || {};
91058
91134
  const { stroke, fill, lineWidth } = style;
91059
- const _d = style, { strokeOpacity, fillOpacity, opacity } = _d, restStyle = __rest$d(_d, ["strokeOpacity", "fillOpacity", "opacity"]);
91135
+ const _d = style, { strokeOpacity, fillOpacity, opacity } = _d, restStyle = __rest$e(_d, ["strokeOpacity", "fillOpacity", "opacity"]);
91060
91136
  const isLineType = hair.type === 'line';
91061
91137
  let finalOpacity = isLineType ? strokeOpacity : fillOpacity;
91062
91138
  if (isNumber$1(opacity)) {
@@ -91085,7 +91161,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91085
91161
  if (!!label.visible) {
91086
91162
  const labelBackground = label.labelBackground || {};
91087
91163
  const labelStyle = label.style || {};
91088
- const _e = labelBackground.style || {}, { fill: rectFill = 'rgba(47, 59, 82, 0.9)', stroke: rectStroke, outerBorder } = _e, rectStyle = __rest$d(_e, ["fill", "stroke", "outerBorder"]);
91164
+ const _e = labelBackground.style || {}, { fill: rectFill = 'rgba(47, 59, 82, 0.9)', stroke: rectStroke, outerBorder } = _e, rectStyle = __rest$e(_e, ["fill", "stroke", "outerBorder"]);
91089
91165
  hair.label = {
91090
91166
  visible: true,
91091
91167
  formatMethod: label.formatMethod,
@@ -91778,7 +91854,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91778
91854
  const bandWidth = series.angleAxisHelper.getBandwidth(0);
91779
91855
  currValueAngle.forEach((_a) => {
91780
91856
  var _b;
91781
- var { axis, value, coord } = _a, rest = __rest$d(_a, ["axis", "value", "coord"]);
91857
+ var { axis, value, coord } = _a, rest = __rest$e(_a, ["axis", "value", "coord"]);
91782
91858
  value = value !== null && value !== void 0 ? value : '';
91783
91859
  mergeSpec(angleCrossHairInfo, rest);
91784
91860
  const angle = series.angleAxisHelper.dataToPosition([value]);
@@ -91798,7 +91874,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91798
91874
  radiusCrossHairInfo.visible = !!currValueRadius.size;
91799
91875
  currValueRadius.forEach((_a) => {
91800
91876
  var _b;
91801
- var { axis, value, coord } = _a, rest = __rest$d(_a, ["axis", "value", "coord"]);
91877
+ var { axis, value, coord } = _a, rest = __rest$e(_a, ["axis", "value", "coord"]);
91802
91878
  value = value !== null && value !== void 0 ? value : '';
91803
91879
  const niceLabelFormatter = axis.niceLabelFormatter;
91804
91880
  if ((_b = radiusHair.label) === null || _b === void 0 ? void 0 : _b.visible) {
@@ -92756,9 +92832,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92756
92832
  }
92757
92833
  _modeCheck(statePoint, mode) {
92758
92834
  if (statePoint === 'start') {
92759
- return (mode === 'percent' && this._spec.start) || (mode === 'value' && this._spec.startValue);
92835
+ return (mode === 'percent' && isValid$1(this._spec.start)) || (mode === 'value' && isValid$1(this._spec.startValue));
92760
92836
  }
92761
- return (mode === 'percent' && this._spec.end) || (mode === 'value' && this._spec.endValue);
92837
+ return (mode === 'percent' && isValid$1(this._spec.end)) || (mode === 'value' && isValid$1(this._spec.endValue));
92762
92838
  }
92763
92839
  _setStateFromSpec() {
92764
92840
  var _a, _b;
@@ -93742,11 +93818,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93742
93818
  super.updateLayoutAttribute();
93743
93819
  }
93744
93820
  _getIndicatorAttrs() {
93821
+ if (this._spec.visible === false || (this._spec.fixed === false && this._activeDatum === null)) {
93822
+ return {
93823
+ visible: false
93824
+ };
93825
+ }
93745
93826
  const region = this._regions[0];
93746
93827
  const { width, height } = region.getLayoutRect();
93747
93828
  const { x, y } = region.getLayoutStartPoint();
93829
+ const _a = this._spec, { content, offsetX, offsetY, limitRatio, title } = _a, restSpec = __rest$e(_a, ["content", "offsetX", "offsetY", "limitRatio", "title"]);
93748
93830
  const contentComponentSpec = [];
93749
- array(this._spec.content).forEach((eachItem) => {
93831
+ array(content).forEach((eachItem) => {
93750
93832
  const contentSpec = mergeSpec({}, this._theme.content, eachItem);
93751
93833
  contentComponentSpec.push({
93752
93834
  visible: contentSpec.visible !== false && (contentSpec.field ? this._activeDatum !== null : true),
@@ -93758,29 +93840,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93758
93840
  style: Object.assign(Object.assign({}, transformIndicatorStyle(pickWithout(contentSpec.style, ['text']), this._activeDatum)), { text: this._createText(contentSpec.field, contentSpec.style.text) })
93759
93841
  });
93760
93842
  });
93761
- return {
93762
- visible: this._spec.visible !== false && (this._spec.fixed !== false || this._activeDatum !== null),
93763
- size: {
93843
+ return Object.assign({ visible: true, size: {
93764
93844
  width: width,
93765
93845
  height: height
93766
- },
93767
- zIndex: this.layoutZIndex,
93768
- x: x,
93769
- y: y,
93770
- dx: this._spec.offsetX ? getActualNumValue(this._spec.offsetX, this._computeLayoutRadius()) : 0,
93771
- dy: this._spec.offsetY ? getActualNumValue(this._spec.offsetY, this._computeLayoutRadius()) : 0,
93772
- limitRatio: this._spec.limitRatio || Infinity,
93773
- title: {
93774
- visible: this._spec.title.visible !== false && (!isValid$1(this._spec.title.field) || this._activeDatum !== null),
93775
- space: this._spec.title.space || this._gap,
93776
- autoLimit: this._spec.title.autoLimit,
93777
- autoFit: this._spec.title.autoFit,
93778
- fitPercent: this._spec.title.fitPercent,
93779
- fitStrategy: this._spec.title.fitStrategy,
93780
- style: Object.assign(Object.assign({}, transformIndicatorStyle(pickWithout(this._spec.title.style, ['text']), this._activeDatum)), { text: this._createText(this._spec.title.field, this._spec.title.style.text) })
93781
- },
93782
- content: contentComponentSpec
93783
- };
93846
+ }, zIndex: this.layoutZIndex, x: x, y: y, dx: offsetX ? getActualNumValue(offsetX, this._computeLayoutRadius()) : 0, dy: offsetY ? getActualNumValue(offsetY, this._computeLayoutRadius()) : 0, limitRatio: limitRatio || Infinity, title: {
93847
+ visible: title.visible !== false && (!isValid$1(title.field) || this._activeDatum !== null),
93848
+ space: title.space || this._gap,
93849
+ autoLimit: title.autoLimit,
93850
+ autoFit: title.autoFit,
93851
+ fitPercent: title.fitPercent,
93852
+ fitStrategy: title.fitStrategy,
93853
+ style: Object.assign(Object.assign({}, transformIndicatorStyle(pickWithout(title.style, ['text']), this._activeDatum)), { text: this._createText(title.field, title.style.text) })
93854
+ }, content: contentComponentSpec }, restSpec);
93784
93855
  }
93785
93856
  _createOrUpdateIndicatorComponent(attrs) {
93786
93857
  if (this._indicatorComponent) {
@@ -94156,7 +94227,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
94156
94227
  return { minX, maxX, minY, maxY };
94157
94228
  }
94158
94229
  function transformLabelAttributes(label, markerData) {
94159
- const { labelBackground = {}, style, shape } = label, restLabel = __rest$d(label, ["labelBackground", "style", "shape"]);
94230
+ const { labelBackground = {}, style, shape } = label, restLabel = __rest$e(label, ["labelBackground", "style", "shape"]);
94160
94231
  if (label.visible !== false) {
94161
94232
  const labelAttrs = restLabel;
94162
94233
  if (shape === null || shape === void 0 ? void 0 : shape.visible) {
@@ -94393,7 +94464,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
94393
94464
  function markerAggregation(_data, options) {
94394
94465
  let markerSource;
94395
94466
  if (options.coordinates) {
94396
- const _a = options, { coordinates: coordinatesInOptions, coordinateType, getSeriesByIdOrIndex } = _a, rest = __rest$d(_a, ["coordinates", "coordinateType", "getSeriesByIdOrIndex"]);
94467
+ const _a = options, { coordinates: coordinatesInOptions, coordinateType, getSeriesByIdOrIndex } = _a, rest = __rest$e(_a, ["coordinates", "coordinateType", "getSeriesByIdOrIndex"]);
94397
94468
  let coordinates;
94398
94469
  if (isFunction$1(coordinatesInOptions)) {
94399
94470
  const relativeSeries = options.getRelativeSeries();
@@ -96597,7 +96668,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96597
96668
  _createMarkerComponent() {
96598
96669
  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;
96599
96670
  const { itemContent = {}, itemLine = {}, targetSymbol = {} } = this._spec;
96600
- const { text: label = {}, symbol, image, richText } = itemContent, restItemContent = __rest$d(itemContent, ["text", "symbol", "image", "richText"]);
96671
+ const { text: label = {}, symbol, image, richText } = itemContent, restItemContent = __rest$e(itemContent, ["text", "symbol", "image", "richText"]);
96601
96672
  const markPointAttrs = {
96602
96673
  zIndex: this.layoutZIndex,
96603
96674
  interactive: (_a = this._spec.interactive) !== null && _a !== void 0 ? _a : true,
@@ -96641,7 +96712,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96641
96712
  if (richText === null || richText === void 0 ? void 0 : richText.style) {
96642
96713
  markPointAttrs.itemContent.richTextStyle = transformStyle(richText.style, this._markerData);
96643
96714
  }
96644
- const { visible, line = {} } = itemLine, restItemLine = __rest$d(itemLine, ["visible", "line"]);
96715
+ const { visible, line = {} } = itemLine, restItemLine = __rest$e(itemLine, ["visible", "line"]);
96645
96716
  if (visible !== false) {
96646
96717
  markPointAttrs.itemLine = Object.assign(Object.assign({}, restItemLine), { visible: true, lineStyle: transformToGraphic(line.style) });
96647
96718
  }
@@ -96985,13 +97056,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
96985
97056
  this._needDisablePickable = false;
96986
97057
  const { operateMask } = e.detail;
96987
97058
  this._handleBrushChange(ChartEvent.brushEnd, region, e);
96988
- this._setAxisAndDataZoom(operateMask, region);
97059
+ const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
97060
+ if (!this._spec.zoomWhenEmpty && inBrushData.length > 0) {
97061
+ this._setAxisAndDataZoom(operateMask, region);
97062
+ }
96989
97063
  this._emitEvent(ChartEvent.brushEnd, region);
96990
97064
  });
96991
97065
  brush.addEventListener(IOperateType.moveEnd, (e) => {
96992
97066
  const { operateMask } = e.detail;
96993
97067
  this._handleBrushChange(ChartEvent.brushEnd, region, e);
96994
- this._setAxisAndDataZoom(operateMask, region);
97068
+ const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
97069
+ if (!this._spec.zoomWhenEmpty && inBrushData.length > 0) {
97070
+ this._setAxisAndDataZoom(operateMask, region);
97071
+ }
96995
97072
  this._emitEvent(ChartEvent.brushEnd, region);
96996
97073
  });
96997
97074
  }