@visactor/vchart 1.13.9-alpha.1 → 1.13.9-alpha.11

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 (128) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +335 -337
  3. package/build/index.js +335 -336
  4. package/build/index.min.js +1 -1
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/chart/base/base-chart.d.ts +8 -1
  7. package/cjs/chart/base/base-chart.js +33 -20
  8. package/cjs/chart/base/base-chart.js.map +1 -1
  9. package/cjs/chart/index.d.ts +1 -1
  10. package/cjs/chart/index.js.map +1 -1
  11. package/cjs/chart/interface/chart.d.ts +8 -1
  12. package/cjs/chart/interface/chart.js.map +1 -1
  13. package/cjs/chart/pictogram/interface.d.ts +1 -1
  14. package/cjs/chart/pictogram/interface.js.map +1 -1
  15. package/cjs/chart/sankey/sankey.js +21 -21
  16. package/cjs/chart/sankey/sankey.js.map +1 -1
  17. package/cjs/compile/mark/compilable-mark.d.ts +1 -0
  18. package/cjs/compile/mark/compilable-mark.js +3 -0
  19. package/cjs/compile/mark/compilable-mark.js.map +1 -1
  20. package/cjs/component/axis/base-axis.js +7 -2
  21. package/cjs/component/axis/base-axis.js.map +1 -1
  22. package/cjs/component/axis/interface/spec.d.ts +7 -2
  23. package/cjs/component/axis/interface/spec.js.map +1 -1
  24. package/cjs/component/data-zoom/data-zoom/interface.d.ts +2 -3
  25. package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
  26. package/cjs/component/marker/mark-area/base-mark-area.js +17 -27
  27. package/cjs/component/marker/mark-area/base-mark-area.js.map +1 -1
  28. package/cjs/component/marker/mark-area/interface/theme.d.ts +3 -4
  29. package/cjs/component/marker/mark-area/interface/theme.js.map +1 -1
  30. package/cjs/component/marker/mark-line/base-mark-line.js +20 -31
  31. package/cjs/component/marker/mark-line/base-mark-line.js.map +1 -1
  32. package/cjs/component/marker/mark-line/cartesian-mark-line.js +19 -23
  33. package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
  34. package/cjs/component/marker/mark-line/interface/theme.d.ts +3 -4
  35. package/cjs/component/marker/mark-line/interface/theme.js.map +1 -1
  36. package/cjs/component/marker/mark-point/cartesian-mark-point.js +3 -1
  37. package/cjs/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
  38. package/cjs/component/marker/utils.d.ts +12 -0
  39. package/cjs/component/marker/utils.js +22 -7
  40. package/cjs/component/marker/utils.js.map +1 -1
  41. package/cjs/constant/funnel.js +1 -2
  42. package/cjs/constant/sunburst.js +2 -1
  43. package/cjs/core/index.d.ts +1 -1
  44. package/cjs/core/index.js +1 -1
  45. package/cjs/core/index.js.map +1 -1
  46. package/cjs/core/interface.js +1 -2
  47. package/cjs/core/vchart.js +2 -1
  48. package/cjs/data/transforms/pictogram.d.ts +1 -9
  49. package/cjs/data/transforms/pictogram.js +3 -3
  50. package/cjs/data/transforms/pictogram.js.map +1 -1
  51. package/cjs/data/transforms/pie.js +1 -1
  52. package/cjs/data/transforms/pie.js.map +1 -1
  53. package/cjs/index-harmony-simple.js.map +1 -1
  54. package/cjs/index.d.ts +1 -0
  55. package/cjs/index.js +8 -7
  56. package/cjs/index.js.map +1 -1
  57. package/cjs/model/base-model.d.ts +1 -0
  58. package/cjs/model/base-model.js +6 -0
  59. package/cjs/model/base-model.js.map +1 -1
  60. package/cjs/series/bar/bar.js.map +1 -1
  61. package/cjs/series/pictogram/tooltip-helper.d.ts +2 -2
  62. package/cjs/series/pictogram/tooltip-helper.js.map +1 -1
  63. package/cjs/series/pie/pie.js +3 -3
  64. package/cjs/series/pie/pie.js.map +1 -1
  65. package/cjs/typings/visual.d.ts +1 -1
  66. package/cjs/typings/visual.js.map +1 -1
  67. package/esm/chart/base/base-chart.d.ts +8 -1
  68. package/esm/chart/base/base-chart.js +33 -20
  69. package/esm/chart/base/base-chart.js.map +1 -1
  70. package/esm/chart/index.d.ts +1 -1
  71. package/esm/chart/index.js.map +1 -1
  72. package/esm/chart/interface/chart.d.ts +8 -1
  73. package/esm/chart/interface/chart.js.map +1 -1
  74. package/esm/chart/pictogram/interface.d.ts +1 -1
  75. package/esm/chart/pictogram/interface.js.map +1 -1
  76. package/esm/chart/sankey/sankey.js +22 -22
  77. package/esm/chart/sankey/sankey.js.map +1 -1
  78. package/esm/compile/mark/compilable-mark.d.ts +1 -0
  79. package/esm/compile/mark/compilable-mark.js +3 -0
  80. package/esm/compile/mark/compilable-mark.js.map +1 -1
  81. package/esm/component/axis/base-axis.js +7 -2
  82. package/esm/component/axis/base-axis.js.map +1 -1
  83. package/esm/component/axis/interface/spec.d.ts +7 -2
  84. package/esm/component/axis/interface/spec.js.map +1 -1
  85. package/esm/component/data-zoom/data-zoom/interface.d.ts +2 -3
  86. package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
  87. package/esm/component/marker/mark-area/base-mark-area.js +16 -27
  88. package/esm/component/marker/mark-area/base-mark-area.js.map +1 -1
  89. package/esm/component/marker/mark-area/interface/theme.d.ts +3 -4
  90. package/esm/component/marker/mark-area/interface/theme.js.map +1 -1
  91. package/esm/component/marker/mark-line/base-mark-line.js +19 -30
  92. package/esm/component/marker/mark-line/base-mark-line.js.map +1 -1
  93. package/esm/component/marker/mark-line/cartesian-mark-line.js +19 -23
  94. package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
  95. package/esm/component/marker/mark-line/interface/theme.d.ts +3 -4
  96. package/esm/component/marker/mark-line/interface/theme.js.map +1 -1
  97. package/esm/component/marker/mark-point/cartesian-mark-point.js +1 -1
  98. package/esm/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
  99. package/esm/component/marker/utils.d.ts +12 -0
  100. package/esm/component/marker/utils.js +19 -4
  101. package/esm/component/marker/utils.js.map +1 -1
  102. package/esm/constant/funnel.js +1 -2
  103. package/esm/constant/sunburst.js +2 -1
  104. package/esm/core/index.d.ts +1 -1
  105. package/esm/core/index.js +1 -1
  106. package/esm/core/index.js.map +1 -1
  107. package/esm/core/interface.js +1 -2
  108. package/esm/core/vchart.js +2 -1
  109. package/esm/data/transforms/pictogram.d.ts +1 -9
  110. package/esm/data/transforms/pictogram.js +3 -3
  111. package/esm/data/transforms/pictogram.js.map +1 -1
  112. package/esm/data/transforms/pie.js +1 -1
  113. package/esm/data/transforms/pie.js.map +1 -1
  114. package/esm/index-harmony-simple.js.map +1 -1
  115. package/esm/index.d.ts +1 -0
  116. package/esm/index.js +2 -0
  117. package/esm/index.js.map +1 -1
  118. package/esm/model/base-model.d.ts +1 -0
  119. package/esm/model/base-model.js +6 -0
  120. package/esm/model/base-model.js.map +1 -1
  121. package/esm/series/bar/bar.js.map +1 -1
  122. package/esm/series/pictogram/tooltip-helper.d.ts +2 -2
  123. package/esm/series/pictogram/tooltip-helper.js.map +1 -1
  124. package/esm/series/pie/pie.js +4 -4
  125. package/esm/series/pie/pie.js.map +1 -1
  126. package/esm/typings/visual.d.ts +1 -1
  127. package/esm/typings/visual.js.map +1 -1
  128. package/package.json +7 -7
package/build/index.js CHANGED
@@ -39830,26 +39830,17 @@
39830
39830
  l.animate().wait(delay + startSymbolDuration + index * stepDuration).to({
39831
39831
  clipRange: 1
39832
39832
  }, stepDuration, easing);
39833
- }), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing), array(label).forEach(labelNode => {
39834
- const delayTime = delay + startSymbolDuration + lineDuration + endSymbolDuration;
39835
- graphicFadeIn(labelNode.getTextShape(), delayTime, labelDuration, easing), graphicFadeIn(labelNode.getBgRect(), delayTime, labelDuration, easing);
39836
- });
39833
+ }), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing), graphicFadeIn(label.getTextShape(), delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing), graphicFadeIn(label.getBgRect(), delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing);
39837
39834
  }
39838
39835
 
39839
39836
  function commonLineFadeIn(line, label, duration, delay, easing) {
39840
- segmentFadeIn(line, delay, duration, easing), array(label).forEach(labelNode => {
39841
- tagFadeIn(labelNode, delay, duration, easing);
39842
- });
39837
+ segmentFadeIn(line, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
39843
39838
  }
39844
39839
  function areaFadeIn(area, label, duration, delay, easing) {
39845
- graphicFadeIn(area, delay, duration, easing), array(label).forEach(labelNode => {
39846
- tagFadeIn(labelNode, delay, duration, easing);
39847
- });
39840
+ graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
39848
39841
  }
39849
39842
  function arcAreaFadeIn(area, label, duration, delay, easing) {
39850
- graphicFadeIn(area, delay, duration, easing), array(label).forEach(labelNode => {
39851
- tagFadeIn(labelNode, delay, duration, easing);
39852
- });
39843
+ graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
39853
39844
  }
39854
39845
  function pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing) {
39855
39846
  var _a;
@@ -39857,19 +39848,13 @@
39857
39848
  }
39858
39849
 
39859
39850
  function commonLineFadeOut(line, label, duration, delay, easing) {
39860
- segmentFadeOut(line, delay, duration, easing), array(label).forEach(labelNode => {
39861
- tagFadeOut(labelNode, delay, duration, easing);
39862
- });
39851
+ segmentFadeOut(line, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
39863
39852
  }
39864
39853
  function areaFadeOut(area, label, duration, delay, easing) {
39865
- graphicFadeOut(area, delay, duration, easing), array(label).forEach(labelNode => {
39866
- tagFadeOut(labelNode, delay, duration, easing);
39867
- });
39854
+ graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
39868
39855
  }
39869
39856
  function arcAreaFadeOut(area, label, duration, delay, easing) {
39870
- graphicFadeOut(area, delay, duration, easing), array(label).forEach(labelNode => {
39871
- tagFadeOut(labelNode, delay, duration, easing);
39872
- });
39857
+ graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
39873
39858
  }
39874
39859
  function pointFadeOut(itemLine, decorativeLine, item, duration, delay, easing) {
39875
39860
  var _a;
@@ -40041,57 +40026,6 @@
40041
40026
  delay: 0
40042
40027
  };
40043
40028
 
40044
- class MarkLabelMixin {
40045
- getLabel() {
40046
- return this._label;
40047
- }
40048
- _addMarkLabels(container, labelName, defaultLabelAttrs) {
40049
- const {
40050
- label: label,
40051
- state: state
40052
- } = this.attribute,
40053
- labelStates = array(null == state ? void 0 : state.label),
40054
- labelBackgroundStates = array(null == state ? void 0 : state.labelBackground),
40055
- labelShapes = array(label).map((labelAttrs, index) => {
40056
- var _a, _b;
40057
- const finalLabelAttrs = merge$1({}, defaultLabelAttrs, labelAttrs),
40058
- markLabel = new Tag(Object.assign(Object.assign({}, finalLabelAttrs), {
40059
- state: {
40060
- panel: merge$1({}, DEFAULT_STATES$2, null !== (_a = labelBackgroundStates[index]) && void 0 !== _a ? _a : last(labelBackgroundStates)),
40061
- text: merge$1({}, DEFAULT_STATES$2, null !== (_b = labelStates[index]) && void 0 !== _b ? _b : last(labelStates))
40062
- }
40063
- }));
40064
- return markLabel.name = labelName, container.add(markLabel), this.setLabelPos(markLabel, finalLabelAttrs), markLabel;
40065
- });
40066
- this._label = 1 === array(labelShapes).length ? labelShapes[0] : labelShapes;
40067
- }
40068
- _updateMarkLabels(defaultLabelAttrs) {
40069
- const {
40070
- label: label,
40071
- state: state
40072
- } = this.attribute,
40073
- labelShapes = array(this._label),
40074
- labelStates = array(null == state ? void 0 : state.label),
40075
- labelBackgroundStates = array(null == state ? void 0 : state.labelBackground);
40076
- if (labelShapes.length) {
40077
- const labels = array(label);
40078
- labelShapes.forEach((labelItem, index) => {
40079
- var _a, _b;
40080
- const finalLabelAttrs = merge$1({}, defaultLabelAttrs, labels[index]);
40081
- labelItem.setAttributes(Object.assign(Object.assign({
40082
- dx: 0,
40083
- dy: 0
40084
- }, finalLabelAttrs), {
40085
- state: {
40086
- panel: merge$1({}, DEFAULT_STATES$2, null !== (_a = labelBackgroundStates[index]) && void 0 !== _a ? _a : last(labelBackgroundStates)),
40087
- text: merge$1({}, DEFAULT_STATES$2, null !== (_b = labelStates[index]) && void 0 !== _b ? _b : last(labelStates))
40088
- }
40089
- })), this.setLabelPos(labelItem, finalLabelAttrs);
40090
- });
40091
- }
40092
- }
40093
- }
40094
-
40095
40029
  class MarkCommonLine extends Marker {
40096
40030
  constructor() {
40097
40031
  super(...arguments), this.name = "markCommonLine", this.defaultUpdateAnimation = DefaultUpdateMarkLineAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
@@ -40099,20 +40033,24 @@
40099
40033
  getLine() {
40100
40034
  return this._line;
40101
40035
  }
40102
- setLabelPos(labelNode, labelAttrs) {
40036
+ getLabel() {
40037
+ return this._label;
40038
+ }
40039
+ setLabelPos() {
40103
40040
  const {
40041
+ label = {},
40104
40042
  limitRect: limitRect
40105
40043
  } = this.attribute,
40106
40044
  {
40107
40045
  position: position,
40108
40046
  confine: confine,
40109
40047
  autoRotate: autoRotate
40110
- } = labelAttrs,
40111
- labelPoint = this.getPointAttrByPosition(position, labelAttrs),
40048
+ } = label,
40049
+ labelPoint = this.getPointAttrByPosition(position),
40112
40050
  labelAngle = position.toString().toLocaleLowerCase().includes("start") ? this._line.getStartAngle() || 0 : this._line.getEndAngle() || 0;
40113
- if (labelNode.setAttributes(Object.assign(Object.assign({}, labelPoint.position), {
40114
- angle: autoRotate ? this.getRotateByAngle(labelPoint.angle, labelAttrs) : 0,
40115
- textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)), labelAttrs.textStyle)
40051
+ if (this._label.setAttributes(Object.assign(Object.assign({}, labelPoint.position), {
40052
+ angle: autoRotate ? this.getRotateByAngle(labelPoint.angle) : 0,
40053
+ textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)), label.textStyle)
40116
40054
  })), limitRect && confine) {
40117
40055
  const {
40118
40056
  x: x,
@@ -40120,7 +40058,7 @@
40120
40058
  width: width,
40121
40059
  height: height
40122
40060
  } = limitRect;
40123
- limitShapeInBounds(labelNode, {
40061
+ limitShapeInBounds(this._label, {
40124
40062
  x1: x,
40125
40063
  y1: y,
40126
40064
  x2: x + width,
@@ -40129,14 +40067,36 @@
40129
40067
  }
40130
40068
  }
40131
40069
  initMarker(container) {
40132
- const line = this.createSegment();
40133
- line.name = "mark-common-line-line", this._line = line, container.add(line), this.addMarkLineLabels(container);
40070
+ const {
40071
+ label: label,
40072
+ state: state
40073
+ } = this.attribute,
40074
+ line = this.createSegment();
40075
+ line.name = "mark-common-line-line", this._line = line, container.add(line);
40076
+ const markLabel = new Tag(Object.assign(Object.assign({}, label), {
40077
+ state: {
40078
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
40079
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
40080
+ }
40081
+ }));
40082
+ markLabel.name = "mark-common-line-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
40134
40083
  }
40135
40084
  updateMarker() {
40136
- this.setLineAttributes(), this.updateMarkLineLabels();
40085
+ const {
40086
+ label: label,
40087
+ state: state
40088
+ } = this.attribute;
40089
+ this.setLineAttributes(), this._label && (this._label.setAttributes(Object.assign(Object.assign({
40090
+ dx: 0,
40091
+ dy: 0
40092
+ }, label), {
40093
+ state: {
40094
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
40095
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
40096
+ }
40097
+ })), this.setLabelPos());
40137
40098
  }
40138
40099
  }
40139
- mixin(MarkCommonLine, MarkLabelMixin);
40140
40100
 
40141
40101
  const FUZZY_EQUAL_DELTA = .001;
40142
40102
  const DEFAULT_MARK_LINE_THEME = {
@@ -40325,7 +40285,6 @@
40325
40285
  lineWidth: 0
40326
40286
  },
40327
40287
  label: {
40328
- autoRotate: !0,
40329
40288
  position: IMarkCommonArcLabelPosition.arcOuterMiddle,
40330
40289
  refX: 0,
40331
40290
  refY: 0,
@@ -40380,7 +40339,6 @@
40380
40339
  const DEFAULT_MARK_ARC_AREA_THEME = {
40381
40340
  interactive: !0,
40382
40341
  label: {
40383
- autoRotate: !0,
40384
40342
  position: IMarkCommonArcLabelPosition.arcOuterMiddle,
40385
40343
  textStyle: {
40386
40344
  fill: "#fff",
@@ -40636,12 +40594,15 @@
40636
40594
  constructor(attributes, options) {
40637
40595
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkLine.defaultAttributes, attributes)), this.name = "markLine";
40638
40596
  }
40639
- getPointAttrByPosition(position, labelAttrs) {
40597
+ getPointAttrByPosition(position) {
40640
40598
  var _a;
40641
40599
  const {
40600
+ label = {}
40601
+ } = this.attribute,
40602
+ {
40642
40603
  refX = 0,
40643
40604
  refY = 0
40644
- } = labelAttrs,
40605
+ } = label,
40645
40606
  points = this._line.getMainSegmentPoints(),
40646
40607
  lineEndAngle = null !== (_a = this._line.getEndAngle()) && void 0 !== _a ? _a : 0,
40647
40608
  labelAngle = (lineEndAngle),
@@ -40667,9 +40628,9 @@
40667
40628
  angle: labelAngle
40668
40629
  };
40669
40630
  }
40670
- getRotateByAngle(angle, labelAttrs) {
40631
+ getRotateByAngle(angle) {
40671
40632
  var _a;
40672
- return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a = labelAttrs.refAngle) && void 0 !== _a ? _a : 0);
40633
+ return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a = this.attribute.label.refAngle) && void 0 !== _a ? _a : 0);
40673
40634
  }
40674
40635
  getTextStyle(position, labelAngle, autoRotate) {
40675
40636
  return fuzzyEqualNumber(Math.abs(labelAngle), Math.PI / 2, FUZZY_EQUAL_DELTA) || fuzzyEqualNumber(Math.abs(labelAngle), 3 * Math.PI / 2, FUZZY_EQUAL_DELTA) ? getTextAlignAttrOfVerticalDir(autoRotate, labelAngle, position) : isPostiveXAxis(labelAngle) ? DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP.postiveXAxis[position] : DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP.negativeXAxis[position];
@@ -40735,12 +40696,6 @@
40735
40696
  });else if (!isValidNumber$1(point.x) || !isValidNumber$1(point.y)) return void (validFlag = !1);
40736
40697
  }), validFlag;
40737
40698
  }
40738
- addMarkLineLabels(container) {
40739
- this._addMarkLabels(container, "mark-common-line-label", MarkLine.defaultAttributes.label);
40740
- }
40741
- updateMarkLineLabels() {
40742
- this._updateMarkLabels(MarkLine.defaultAttributes.label);
40743
- }
40744
40699
  }
40745
40700
  MarkLine.defaultAttributes = DEFAULT_MARK_LINE_THEME;
40746
40701
 
@@ -40755,6 +40710,9 @@
40755
40710
  getArea() {
40756
40711
  return this._area;
40757
40712
  }
40713
+ getLabel() {
40714
+ return this._label;
40715
+ }
40758
40716
  constructor(attributes, options) {
40759
40717
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArea.defaultAttributes, attributes)), this.name = "markArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
40760
40718
  }
@@ -40771,21 +40729,24 @@
40771
40729
  };
40772
40730
  return (position.includes("left") || position.includes("Left")) && (result.x = x1), (position.includes("right") || position.includes("Right")) && (result.x = x2), (position.includes("top") || position.includes("Top")) && (result.y = y1), (position.includes("bottom") || position.includes("Bottom")) && (result.y = y2), result;
40773
40731
  }
40774
- setLabelPos(labelNode, labelAttrs) {
40732
+ setLabelPos() {
40775
40733
  var _a;
40776
- if (this._area) {
40777
- const labelPosition = null !== (_a = labelAttrs.position) && void 0 !== _a ? _a : "middle",
40734
+ if (this._label && this._area) {
40735
+ const {
40736
+ label = {}
40737
+ } = this.attribute,
40738
+ labelPosition = null !== (_a = label.position) && void 0 !== _a ? _a : "middle",
40778
40739
  labelPoint = this.getPointAttrByPosition(labelPosition);
40779
- if (labelNode.setAttributes(Object.assign(Object.assign({}, labelPoint), {
40780
- textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]), labelAttrs.textStyle)
40781
- })), this.attribute.limitRect && labelAttrs.confine) {
40740
+ if (this._label.setAttributes(Object.assign(Object.assign({}, labelPoint), {
40741
+ textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
40742
+ })), this.attribute.limitRect && label.confine) {
40782
40743
  const {
40783
40744
  x: x,
40784
40745
  y: y,
40785
40746
  width: width,
40786
40747
  height: height
40787
40748
  } = this.attribute.limitRect;
40788
- limitShapeInBounds(labelNode, {
40749
+ limitShapeInBounds(this._label, {
40789
40750
  x1: x,
40790
40751
  y1: y,
40791
40752
  x2: x + width,
@@ -40797,23 +40758,40 @@
40797
40758
  initMarker(container) {
40798
40759
  const {
40799
40760
  points: points,
40761
+ label: label,
40800
40762
  areaStyle: areaStyle,
40801
40763
  state: state
40802
40764
  } = this.attribute,
40803
40765
  area = graphicCreator.polygon(Object.assign({
40804
40766
  points: points
40805
40767
  }, areaStyle));
40806
- area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "mark-area-polygon", this._area = area, container.add(area), this._addMarkLabels(container, "mark-area-label", MarkArea.defaultAttributes.label);
40768
+ area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "mark-area-polygon", this._area = area, container.add(area);
40769
+ const markLabel = new Tag(Object.assign(Object.assign({}, label), {
40770
+ state: {
40771
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
40772
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
40773
+ }
40774
+ }));
40775
+ markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
40807
40776
  }
40808
40777
  updateMarker() {
40809
40778
  const {
40810
40779
  points: points,
40780
+ label: label,
40811
40781
  areaStyle: areaStyle,
40812
40782
  state: state
40813
40783
  } = this.attribute;
40814
40784
  this._area && (this._area.setAttributes(Object.assign({
40815
40785
  points: points
40816
- }, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._updateMarkLabels(MarkArea.defaultAttributes.label);
40786
+ }, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._label && this._label.setAttributes(Object.assign(Object.assign({
40787
+ dx: 0,
40788
+ dy: 0
40789
+ }, label), {
40790
+ state: {
40791
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
40792
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
40793
+ }
40794
+ })), this.setLabelPos();
40817
40795
  }
40818
40796
  isValidPoints() {
40819
40797
  const {
@@ -40826,7 +40804,7 @@
40826
40804
  }), validFlag;
40827
40805
  }
40828
40806
  }
40829
- MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME, mixin(MarkArea, MarkLabelMixin);
40807
+ MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME;
40830
40808
 
40831
40809
  loadMarkArcLineComponent();
40832
40810
  function registerMarkArcLineAnimate() {
@@ -40837,19 +40815,24 @@
40837
40815
  MarkArcLine._animate && this._animationConfig && MarkArcLine._animate(this._line, this._label, this._animationConfig, state);
40838
40816
  }
40839
40817
  constructor(attributes, options) {
40840
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes)), this.name = "markArcLine";
40818
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes, {
40819
+ label: {
40820
+ autoRotate: !0
40821
+ }
40822
+ })), this.name = "markArcLine";
40841
40823
  }
40842
- getPointAttrByPosition(direction, labelAttrs) {
40824
+ getPointAttrByPosition(direction) {
40843
40825
  const {
40844
40826
  center: center,
40845
40827
  radius: radius,
40846
40828
  startAngle: startAngle,
40847
- endAngle: endAngle
40829
+ endAngle: endAngle,
40830
+ label: label
40848
40831
  } = this.attribute,
40849
40832
  {
40850
40833
  refX = 0,
40851
40834
  refY = 0
40852
- } = labelAttrs;
40835
+ } = label;
40853
40836
  let angle;
40854
40837
  switch (direction) {
40855
40838
  case IMarkCommonArcLabelPosition.arcInnerStart:
@@ -40879,9 +40862,9 @@
40879
40862
  getTextStyle(position) {
40880
40863
  return DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[position];
40881
40864
  }
40882
- getRotateByAngle(angle, labelAttrs) {
40865
+ getRotateByAngle(angle) {
40883
40866
  var _a;
40884
- return angle - Math.PI / 2 + (null !== (_a = labelAttrs.refAngle) && void 0 !== _a ? _a : 0);
40867
+ return angle - Math.PI / 2 + (null !== (_a = this.attribute.label.refAngle) && void 0 !== _a ? _a : 0);
40885
40868
  }
40886
40869
  createSegment() {
40887
40870
  const {
@@ -40938,12 +40921,6 @@
40938
40921
  isValidPoints() {
40939
40922
  return !0;
40940
40923
  }
40941
- addMarkLineLabels(container) {
40942
- this._addMarkLabels(container, "mark-common-line-label", MarkArcLine.defaultAttributes.label);
40943
- }
40944
- updateMarkLineLabels() {
40945
- this._updateMarkLabels(MarkArcLine.defaultAttributes.label);
40946
- }
40947
40924
  }
40948
40925
  MarkArcLine.defaultAttributes = DEFAULT_MARK_ARC_LINE_THEME;
40949
40926
 
@@ -40958,21 +40935,29 @@
40958
40935
  getArea() {
40959
40936
  return this._area;
40960
40937
  }
40938
+ getLabel() {
40939
+ return this._label;
40940
+ }
40961
40941
  constructor(attributes, options) {
40962
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes)), this.name = "markArcArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
40942
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes, {
40943
+ label: {
40944
+ autoRotate: !0
40945
+ }
40946
+ })), this.name = "markArcArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
40963
40947
  }
40964
- getPointAttrByPosition(position, labelAttrs) {
40948
+ getPointAttrByPosition(position) {
40965
40949
  const {
40966
40950
  center: center,
40967
40951
  innerRadius: innerRadius,
40968
40952
  outerRadius: outerRadius,
40969
40953
  startAngle: startAngle,
40970
- endAngle: endAngle
40954
+ endAngle: endAngle,
40955
+ label: label
40971
40956
  } = this.attribute,
40972
40957
  {
40973
40958
  refX = 0,
40974
40959
  refY = 0
40975
- } = labelAttrs;
40960
+ } = label;
40976
40961
  let radius, angle;
40977
40962
  switch (position) {
40978
40963
  case IMarkCommonArcLabelPosition.center:
@@ -41007,25 +40992,28 @@
41007
40992
  angle: angle
41008
40993
  };
41009
40994
  }
41010
- setLabelPos(labelNode, labelAttrs) {
40995
+ setLabelPos() {
41011
40996
  var _a;
41012
- if (this._area) {
40997
+ if (this._label && this._area) {
41013
40998
  const {
40999
+ label = {}
41000
+ } = this.attribute,
41001
+ {
41014
41002
  position: labelPosition = "arcInnerMiddle",
41015
41003
  autoRotate: autoRotate
41016
- } = labelAttrs,
41017
- labelAttr = this.getPointAttrByPosition(labelPosition, labelAttrs);
41018
- if (labelNode.setAttributes(Object.assign(Object.assign({}, labelAttr.position), {
41019
- angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a = labelAttrs.refAngle) && void 0 !== _a ? _a : 0) : 0,
41020
- textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]), labelAttrs.textStyle)
41021
- })), this.attribute.limitRect && labelAttrs.confine) {
41004
+ } = label,
41005
+ labelAttr = this.getPointAttrByPosition(labelPosition);
41006
+ if (this._label.setAttributes(Object.assign(Object.assign({}, labelAttr.position), {
41007
+ angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a = label.refAngle) && void 0 !== _a ? _a : 0) : 0,
41008
+ textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
41009
+ })), this.attribute.limitRect && label.confine) {
41022
41010
  const {
41023
41011
  x: x,
41024
41012
  y: y,
41025
41013
  width: width,
41026
41014
  height: height
41027
41015
  } = this.attribute.limitRect;
41028
- limitShapeInBounds(labelNode, {
41016
+ limitShapeInBounds(this._label, {
41029
41017
  x1: x,
41030
41018
  y1: y,
41031
41019
  x2: x + width,
@@ -41042,6 +41030,7 @@
41042
41030
  startAngle: startAngle,
41043
41031
  endAngle: endAngle,
41044
41032
  areaStyle: areaStyle,
41033
+ label: label,
41045
41034
  state: state
41046
41035
  } = this.attribute,
41047
41036
  area = graphicCreator.arc(Object.assign({
@@ -41052,7 +41041,14 @@
41052
41041
  startAngle: startAngle,
41053
41042
  endAngle: endAngle
41054
41043
  }, areaStyle));
41055
- area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "polar-mark-area-area", this._area = area, container.add(area), this._addMarkLabels(container, "mark-area-label", MarkArcArea.defaultAttributes.label);
41044
+ area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "polar-mark-area-area", this._area = area, container.add(area);
41045
+ const markLabel = new Tag(Object.assign(Object.assign({}, label), {
41046
+ state: {
41047
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
41048
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
41049
+ }
41050
+ }));
41051
+ markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
41056
41052
  }
41057
41053
  updateMarker() {
41058
41054
  const {
@@ -41072,13 +41068,21 @@
41072
41068
  outerRadius: outerRadius,
41073
41069
  startAngle: startAngle,
41074
41070
  endAngle: endAngle
41075
- }, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._updateMarkLabels(MarkArcArea.defaultAttributes.label);
41071
+ }, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._label && (this._label.setAttributes(Object.assign(Object.assign({
41072
+ dx: 0,
41073
+ dy: 0
41074
+ }, label), {
41075
+ state: {
41076
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
41077
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
41078
+ }
41079
+ })), this.setLabelPos());
41076
41080
  }
41077
41081
  isValidPoints() {
41078
41082
  return !0;
41079
41083
  }
41080
41084
  }
41081
- MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME, mixin(MarkArcArea, MarkLabelMixin);
41085
+ MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME;
41082
41086
 
41083
41087
  loadMarkPointComponent();
41084
41088
  function registerMarkPointAnimate() {
@@ -59557,6 +59561,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59557
59561
  }
59558
59562
  beforeRelease() {
59559
59563
  }
59564
+ clear() {
59565
+ this.getMarks().forEach(m => { var _a; return (_a = m.clear) === null || _a === void 0 ? void 0 : _a.call(m); });
59566
+ }
59560
59567
  release() {
59561
59568
  var _a;
59562
59569
  this._releaseEvent();
@@ -61709,6 +61716,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61709
61716
  }
61710
61717
  return undefined;
61711
61718
  }
61719
+ clear() {
61720
+ this._event.off(HOOK_EVENT.AFTER_DO_RENDER);
61721
+ }
61712
61722
  release() {
61713
61723
  super.release();
61714
61724
  this.state.release();
@@ -63658,7 +63668,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
63658
63668
  };
63659
63669
  registerVChartCore();
63660
63670
 
63661
- const version = "1.13.9-alpha.1";
63671
+ const version = "1.13.9-alpha.11";
63662
63672
 
63663
63673
  const addVChartProperty = (data, op) => {
63664
63674
  const context = op.beforeCall();
@@ -67805,6 +67815,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67805
67815
  if (spec.label.state) {
67806
67816
  axisAttrs.label.state = transformAxisLabelStateStyle(spec.label.state);
67807
67817
  }
67818
+ if (isFunction$1(spec.label.dataFilter)) {
67819
+ axisAttrs.label.dataFilter = (data, layer) => spec.label.dataFilter(data, layer, { vchart: this._option.globalInstance });
67820
+ }
67808
67821
  }
67809
67822
  else {
67810
67823
  axisAttrs.label = {
@@ -67817,7 +67830,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67817
67830
  length: spec.tick.tickSize,
67818
67831
  inside: spec.tick.inside,
67819
67832
  alignWithLabel: spec.tick.alignWithLabel,
67820
- dataFilter: spec.tick.dataFilter
67833
+ dataFilter: isFunction$1(spec.tick.dataFilter)
67834
+ ? (data) => spec.tick.dataFilter(data, { vchart: this._option.globalInstance })
67835
+ : undefined
67821
67836
  };
67822
67837
  if (spec.tick.style) {
67823
67838
  axisAttrs.tick.style = isFunction$1(spec.tick.style)
@@ -71070,58 +71085,83 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
71070
71085
  }
71071
71086
  });
71072
71087
  }
71073
- _setStateInDatum(stateKey, checkReverse, datum, filter, region) {
71088
+ filterGraphicsByDatum(datum, opt = {}) {
71089
+ var _a;
71074
71090
  datum = datum ? array(datum) : null;
71075
71091
  const keys = !datum ? null : Object.keys(datum[0]);
71076
- this.getRegionsInQuerier(region).forEach(r => {
71077
- if (!datum) {
71078
- r.interaction.clearEventElement(stateKey, true);
71079
- return;
71080
- }
71081
- r.getSeries().forEach(s => {
71082
- s.getMarks().forEach(m => {
71083
- if (!m.getProduct()) {
71084
- return;
71085
- }
71086
- if (!filter || (isFunction$1(filter) && filter(s, m))) {
71087
- const isCollect = m.getProduct().isCollectionMark();
71088
- const elements = m.getProduct().elements;
71089
- let pickElements = [];
71090
- if (isCollect) {
71091
- pickElements = elements.filter(e => {
71092
- const elDatum = e.getDatum();
71093
- datum.every((d, index) => keys.every(k => d[k] == elDatum[index][k]));
71094
- });
71092
+ const allElements = [];
71093
+ const getDatumOfElement = (_a = opt.getDatum) !== null && _a !== void 0 ? _a : ((el) => el.getDatum());
71094
+ this.getRegionsInQuerier(opt.region).forEach(r => {
71095
+ const pickElements = [];
71096
+ datum &&
71097
+ r.getSeries().forEach(s => {
71098
+ s.getMarks().forEach(m => {
71099
+ if (!m.getProduct()) {
71100
+ return;
71095
71101
  }
71096
- else {
71097
- if (datum.length > 1) {
71098
- const datumTemp = datum.slice();
71099
- pickElements = elements.filter(e => {
71100
- if (datumTemp.length === 0) {
71101
- return false;
71102
- }
71103
- const elDatum = e.getDatum();
71104
- const index = datumTemp.findIndex(d => keys.every(k => d[k] == elDatum[k]));
71105
- if (index >= 0) {
71106
- datumTemp.splice(index, 1);
71107
- return true;
71102
+ if (!opt.filter || (isFunction$1(opt.filter) && opt.filter(s, m))) {
71103
+ const isCollect = m.getProduct().isCollectionMark();
71104
+ const elements = m.getProduct().elements;
71105
+ if (isCollect) {
71106
+ elements.filter(e => {
71107
+ const elDatum = getDatumOfElement(e, m, s, r);
71108
+ const isPick = elDatum && datum.every((d, index) => keys.every(k => d[k] == elDatum[index][k]));
71109
+ if (isPick) {
71110
+ pickElements.push(e);
71111
+ allElements.push(e);
71112
+ opt.callback && opt.callback(e, m, s, r);
71108
71113
  }
71109
- return false;
71110
71114
  });
71111
71115
  }
71112
71116
  else {
71113
- const el = elements.find(e => keys.every(k => datum[0][k] == e.getDatum()[k]));
71114
- el && (pickElements = [el]);
71117
+ if (datum.length > 1) {
71118
+ const datumTemp = datum.slice();
71119
+ elements.forEach(e => {
71120
+ const elDatum = getDatumOfElement(e, m, s, r);
71121
+ const index = elDatum && datumTemp.findIndex(d => keys.every(k => d[k] == elDatum[k]));
71122
+ if (index >= 0) {
71123
+ datumTemp.splice(index, 1);
71124
+ pickElements.push(e);
71125
+ allElements.push(e);
71126
+ opt.callback && opt.callback(e, m, s, r);
71127
+ }
71128
+ });
71129
+ }
71130
+ else {
71131
+ const el = elements.find(e => {
71132
+ const elDatum = getDatumOfElement(e, m, s, r);
71133
+ return elDatum && keys.every(k => datum[0][k] == elDatum[k]);
71134
+ });
71135
+ if (el) {
71136
+ pickElements.push(el);
71137
+ allElements.push(el);
71138
+ opt.callback && opt.callback(el, m, s, r);
71139
+ }
71140
+ }
71115
71141
  }
71116
71142
  }
71117
- pickElements.forEach(element => {
71118
- r.interaction.startInteraction(stateKey, element);
71119
- });
71120
- }
71143
+ });
71121
71144
  });
71122
- });
71123
- if (checkReverse) {
71124
- r.interaction.reverseEventElement(stateKey);
71145
+ opt.regionCallback && opt.regionCallback(pickElements, r);
71146
+ });
71147
+ return allElements;
71148
+ }
71149
+ _setStateInDatum(stateKey, checkReverse, datum, filter, region) {
71150
+ this.filterGraphicsByDatum(datum, {
71151
+ filter,
71152
+ region,
71153
+ regionCallback: (elements, r) => {
71154
+ if (!datum) {
71155
+ r.interaction.clearEventElement(stateKey, true);
71156
+ }
71157
+ else if (elements.length) {
71158
+ elements.forEach(e => {
71159
+ r.interaction.startInteraction(stateKey, e);
71160
+ });
71161
+ if (checkReverse) {
71162
+ r.interaction.reverseEventElement(stateKey);
71163
+ }
71164
+ }
71125
71165
  }
71126
71166
  });
71127
71167
  }
@@ -72721,9 +72761,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
72721
72761
  else if (domainMin > 0) {
72722
72762
  return scale.scale(domainMin);
72723
72763
  }
72724
- else {
72725
- return scale.scale(0);
72726
- }
72764
+ return scale.scale(0);
72727
72765
  }
72728
72766
  }
72729
72767
  };
@@ -76931,7 +76969,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
76931
76969
  return data;
76932
76970
  }
76933
76971
  if (!showAllZero && showEmptyCircle && isDataEmpty(data, angleField, supportNegative)) {
76934
- return data;
76972
+ return [];
76935
76973
  }
76936
76974
  const appendArcInfo = (data, startAngle, angle) => {
76937
76975
  data[asStartAngle] = startAngle;
@@ -77420,6 +77458,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
77420
77458
  }, {
77421
77459
  dataView: false
77422
77460
  });
77461
+ this._emptyArcMark.setDepend(this._pieMark);
77423
77462
  }
77424
77463
  }
77425
77464
  startAngleScale(datum) {
@@ -77455,8 +77494,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
77455
77494
  const emptyPieMark = this._emptyArcMark;
77456
77495
  if (emptyPieMark) {
77457
77496
  this.setMarkStyle(emptyPieMark, Object.assign(Object.assign({}, initialStyle), { visible: () => {
77458
- const angleField = this.getAngleField()[0];
77459
- return isDataEmpty(this.getViewData().latestData, angleField, this._supportNegative);
77497
+ const data = this.getViewData().latestData;
77498
+ return !data || !data.length;
77460
77499
  } }), 'normal', AttributeLevel.Series);
77461
77500
  }
77462
77501
  }
@@ -89895,21 +89934,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89895
89934
  return isValid$1(attr) && attr !== 'none' && !((_a = attr.includes) === null || _a === void 0 ? void 0 : _a.call(attr, 'url'));
89896
89935
  }
89897
89936
  const getLineWidth = (attributes) => {
89898
- const strokeWidth = parseFloat(attributes['strokeWidth']);
89937
+ const strokeWidth = parseFloat(attributes.strokeWidth);
89899
89938
  if (!isNaN(strokeWidth)) {
89900
89939
  return strokeWidth;
89901
89940
  }
89902
- const stroke = attributes['stroke'];
89941
+ const stroke = attributes.stroke;
89903
89942
  return stroke && isValidStrokeOrFill(stroke) ? 1 : 0;
89904
89943
  };
89905
89944
  const getFill = (attributes, defaultFill) => {
89906
89945
  var _a;
89907
- const fill = (_a = attributes['fill']) !== null && _a !== void 0 ? _a : defaultFill;
89946
+ const fill = (_a = attributes.fill) !== null && _a !== void 0 ? _a : defaultFill;
89908
89947
  return fill && isValidStrokeOrFill(fill) ? fill : undefined;
89909
89948
  };
89910
89949
  const getStroke = (attributes, defaultStroke) => {
89911
89950
  var _a;
89912
- const stroke = (_a = attributes['stroke']) !== null && _a !== void 0 ? _a : defaultStroke;
89951
+ const stroke = (_a = attributes.stroke) !== null && _a !== void 0 ? _a : defaultStroke;
89913
89952
  return stroke && isValidStrokeOrFill(stroke) ? stroke : false;
89914
89953
  };
89915
89954
  const commonAttributes = (attributes) => {
@@ -89918,7 +89957,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89918
89957
  const graphicAttributeTransform = {
89919
89958
  group: (attributes) => {
89920
89959
  const common = commonAttributes(attributes);
89921
- return Object.assign(Object.assign({}, common), { visibleAll: common['visible'] !== false });
89960
+ return Object.assign(Object.assign({}, common), { visibleAll: common.visible !== false });
89922
89961
  },
89923
89962
  rule: (attributes) => {
89924
89963
  return Object.assign(Object.assign({}, commonAttributes(attributes)), { x: parseFloat(attributes.x1), y: parseFloat(attributes.y1), x1: parseFloat(attributes.x2), y1: parseFloat(attributes.y2) });
@@ -89969,7 +90008,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89969
90008
  el._uniqueId = `${el.id}-${index}`;
89970
90009
  el.data = undefined;
89971
90010
  const { graphicType: type, transform } = el;
89972
- let finalAttributes = {
90011
+ const finalAttributes = {
89973
90012
  visible: el.attributes.visibility !== 'hidden' && el.attributes.visibility !== 'collapse'
89974
90013
  };
89975
90014
  if (el.graphicType === 'text') {
@@ -90004,7 +90043,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
90004
90043
  return result;
90005
90044
  });
90006
90045
  if (children && children.length) {
90007
- let startX = (_b = (_a = texts[i]._textGroupStyle) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0;
90046
+ const startX = (_b = (_a = texts[i]._textGroupStyle) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0;
90008
90047
  let curX = startX;
90009
90048
  for (let j = 0; j < children.length; j++) {
90010
90049
  const currentChild = children[j];
@@ -91980,49 +92019,40 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91980
92019
  }
91981
92020
  _setStateInDatum(stateKey, checkReverse, datum, filter, region) {
91982
92021
  const activeDatum = isArray$1(datum) ? datum[0] : datum;
91983
- const keys = !activeDatum ? null : Object.keys(activeDatum);
91984
- this.getRegionsInQuerier(region).forEach(r => {
91985
- if (!activeDatum) {
91986
- r.interaction.clearEventElement(stateKey, true);
91987
- return;
91988
- }
91989
- let hasPick = false;
91990
- r.getSeries().forEach(s => {
91991
- var _a, _b;
91992
- let activeNodeOrLink = null;
91993
- s.getMarksWithoutRoot().forEach(m => {
91994
- if (m.type === 'text') {
91995
- return;
91996
- }
91997
- let pickElement = null;
91998
- const mark = m.getProduct();
91999
- if (!mark) {
92000
- return;
92001
- }
92002
- if (!filter || (isFunction$1(filter) && filter(s, m))) {
92003
- pickElement = mark.elements.find((e) => keys.every(k => {
92004
- var _a;
92005
- let datum = (_a = e.getDatum()) === null || _a === void 0 ? void 0 : _a.datum;
92006
- if (isArray$1(datum)) {
92007
- datum = datum[0];
92008
- }
92009
- return activeDatum[k] == (datum === null || datum === void 0 ? void 0 : datum[k]);
92010
- }));
92011
- }
92012
- if (pickElement) {
92013
- hasPick = true;
92014
- r.interaction.startInteraction(stateKey, pickElement);
92015
- if (mark.id().includes('node') || mark.id().includes('link')) {
92016
- activeNodeOrLink = pickElement;
92017
- }
92022
+ const markFilter = (series, mark) => {
92023
+ return mark.type !== 'text' && mark.getProduct() && (!filter || filter(series, mark));
92024
+ };
92025
+ this.filterGraphicsByDatum(activeDatum, {
92026
+ filter: markFilter,
92027
+ region,
92028
+ getDatum: e => {
92029
+ var _a;
92030
+ let d = (_a = e.getDatum()) === null || _a === void 0 ? void 0 : _a.datum;
92031
+ if (isArray$1(d)) {
92032
+ d = d[0];
92033
+ }
92034
+ return d;
92035
+ },
92036
+ callback: (element, mark, s, r) => {
92037
+ var _a, _b, _c;
92038
+ const id = (_a = mark.getProduct()) === null || _a === void 0 ? void 0 : _a.id();
92039
+ if (id && (id.includes('node') || id.includes('link'))) {
92040
+ (_c = (_b = s)._handleEmphasisElement) === null || _c === void 0 ? void 0 : _c.call(_b, { item: element });
92041
+ }
92042
+ },
92043
+ regionCallback: (elements, r) => {
92044
+ if (!activeDatum) {
92045
+ r.interaction.clearEventElement(stateKey, true);
92046
+ return;
92047
+ }
92048
+ else if (elements.length) {
92049
+ elements.forEach(e => {
92050
+ r.interaction.startInteraction(stateKey, e);
92051
+ });
92052
+ if (checkReverse) {
92053
+ r.interaction.reverseEventElement(stateKey);
92018
92054
  }
92019
- });
92020
- if (activeNodeOrLink) {
92021
- (_b = (_a = s)._handleEmphasisElement) === null || _b === void 0 ? void 0 : _b.call(_a, { item: activeNodeOrLink });
92022
92055
  }
92023
- });
92024
- if (checkReverse && hasPick) {
92025
- r.interaction.reverseEventElement(stateKey);
92026
92056
  }
92027
92057
  });
92028
92058
  }
@@ -97477,17 +97507,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97477
97507
  }
97478
97508
  return offset;
97479
97509
  }
97510
+ function getProcessInfo(spec) {
97511
+ return {
97512
+ isXProcess: isValid$1(spec.x),
97513
+ isYProcess: isValid$1(spec.y),
97514
+ isX1Process: isValid$1(spec.x1),
97515
+ isY1Process: isValid$1(spec.y1),
97516
+ isAngleProcess: isValid$1(spec.angle),
97517
+ isRadiusProcess: isValid$1(spec.radius),
97518
+ isAngle1Process: isValid$1(spec.angle1),
97519
+ isRadius1Process: isValid$1(spec.radius1),
97520
+ isCoordinatesProcess: isValid$1(spec.coordinates),
97521
+ isValidProcess: isValid$1(spec.process)
97522
+ };
97523
+ }
97480
97524
  function getMarkLineProcessInfo(spec) {
97481
- const isXProcess = 'x' in spec;
97482
- const isYProcess = 'y' in spec;
97483
- const isX1Process = 'x1' in spec;
97484
- const isY1Process = 'y1' in spec;
97485
- const isAngleProcess = 'angle' in spec;
97486
- const isRadiusProcess = 'radius' in spec;
97487
- const isAngle1Process = 'angle1' in spec;
97488
- const isRadius1Process = 'radius1' in spec;
97489
- const isCoordinatesProcess = 'coordinates' in spec;
97490
- const isValidProcess = 'process' in spec;
97525
+ const { isXProcess, isYProcess, isX1Process, isY1Process, isAngleProcess, isRadiusProcess, isAngle1Process, isRadius1Process, isCoordinatesProcess, isValidProcess } = getProcessInfo(spec);
97491
97526
  return {
97492
97527
  doXProcess: isXProcess && !isYProcess && !isY1Process,
97493
97528
  doXYY1Process: isXProcess && isYProcess && isY1Process,
@@ -97503,15 +97538,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97503
97538
  };
97504
97539
  }
97505
97540
  function getMarkAreaProcessInfo(spec) {
97506
- const isXProcess = 'x' in spec;
97507
- const isX1Process = 'x1' in spec;
97508
- const isYProcess = 'y' in spec;
97509
- const isY1Process = 'y1' in spec;
97510
- const isAngleProcess = 'angle' in spec;
97511
- const isRadiusProcess = 'radius' in spec;
97512
- const isAngle1Process = 'angle1' in spec;
97513
- const isRadius1Process = 'radius1' in spec;
97514
- const isCoordinatesProcess = 'coordinates' in spec;
97541
+ const { isXProcess, isYProcess, isX1Process, isY1Process, isAngleProcess, isRadiusProcess, isAngle1Process, isRadius1Process, isCoordinatesProcess } = getProcessInfo(spec);
97515
97542
  return {
97516
97543
  doXProcess: isXProcess && isX1Process && !isYProcess && !isY1Process,
97517
97544
  doYProcess: isYProcess && isY1Process && !isXProcess && !isX1Process,
@@ -98029,14 +98056,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98029
98056
  return 'cartesian';
98030
98057
  }
98031
98058
  _createMarkerComponent() {
98032
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
98033
- const { startSymbol = {}, endSymbol = {} } = this._spec;
98034
- const label = array((_a = this._spec.label) !== null && _a !== void 0 ? _a : {});
98059
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
98060
+ const { label = {}, startSymbol = {}, endSymbol = {} } = this._spec;
98035
98061
  const markLineAttrs = {
98036
98062
  zIndex: this.layoutZIndex,
98037
- interactive: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
98038
- hover: (_c = this._spec.interactive) !== null && _c !== void 0 ? _c : true,
98039
- select: (_d = this._spec.interactive) !== null && _d !== void 0 ? _d : true,
98063
+ interactive: (_a = this._spec.interactive) !== null && _a !== void 0 ? _a : true,
98064
+ hover: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
98065
+ select: (_c = this._spec.interactive) !== null && _c !== void 0 ? _c : true,
98040
98066
  points: [
98041
98067
  { x: 0, y: 0 },
98042
98068
  { x: 0, y: 0 }
@@ -98048,25 +98074,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98048
98074
  radius: 0,
98049
98075
  startAngle: 0,
98050
98076
  endAngle: 0,
98051
- lineStyle: transformStyle(transformToGraphic((_e = this._spec.line) === null || _e === void 0 ? void 0 : _e.style), this._markerData, this._markAttributeContext),
98052
- clipInRange: (_f = this._spec.clip) !== null && _f !== void 0 ? _f : false,
98053
- label: label.map(labelItem => {
98054
- return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
98055
- }),
98077
+ lineStyle: transformStyle(transformToGraphic((_d = this._spec.line) === null || _d === void 0 ? void 0 : _d.style), this._markerData, this._markAttributeContext),
98078
+ clipInRange: (_e = this._spec.clip) !== null && _e !== void 0 ? _e : false,
98079
+ label: transformLabelAttributes(label, this._markerData, this._markAttributeContext),
98056
98080
  state: {
98057
- line: transformState((_h = (_g = this._spec.line) === null || _g === void 0 ? void 0 : _g.state) !== null && _h !== void 0 ? _h : {}, this._markerData, this._markAttributeContext),
98058
- lineStartSymbol: transformState((_k = (_j = this._spec.startSymbol) === null || _j === void 0 ? void 0 : _j.state) !== null && _k !== void 0 ? _k : {}, this._markerData, this._markAttributeContext),
98059
- lineEndSymbol: transformState((_m = (_l = this._spec.endSymbol) === null || _l === void 0 ? void 0 : _l.state) !== null && _m !== void 0 ? _m : {}, this._markerData, this._markAttributeContext),
98060
- label: label.map(labelItem => {
98061
- var _a;
98062
- return transformState((_a = labelItem.state) !== null && _a !== void 0 ? _a : {}, this._markerData, this._markAttributeContext);
98063
- }),
98064
- labelBackground: label.map(labelItem => {
98065
- var _a, _b;
98066
- return transformState((_b = (_a = labelItem.labelBackground) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : {}, this._markerData, this._markAttributeContext);
98067
- })
98081
+ line: transformState((_g = (_f = this._spec.line) === null || _f === void 0 ? void 0 : _f.state) !== null && _g !== void 0 ? _g : {}, this._markerData, this._markAttributeContext),
98082
+ lineStartSymbol: transformState((_j = (_h = this._spec.startSymbol) === null || _h === void 0 ? void 0 : _h.state) !== null && _j !== void 0 ? _j : {}, this._markerData, this._markAttributeContext),
98083
+ lineEndSymbol: transformState((_l = (_k = this._spec.endSymbol) === null || _k === void 0 ? void 0 : _k.state) !== null && _l !== void 0 ? _l : {}, this._markerData, this._markAttributeContext),
98084
+ label: transformState((_p = (_o = (_m = this._spec) === null || _m === void 0 ? void 0 : _m.label) === null || _o === void 0 ? void 0 : _o.state) !== null && _p !== void 0 ? _p : {}, this._markerData, this._markAttributeContext),
98085
+ labelBackground: transformState((_t = (_s = (_r = (_q = this._spec) === null || _q === void 0 ? void 0 : _q.label) === null || _r === void 0 ? void 0 : _r.labelBackground) === null || _s === void 0 ? void 0 : _s.state) !== null && _t !== void 0 ? _t : {}, this._markerData, this._markAttributeContext)
98068
98086
  },
98069
- animation: (_o = this._spec.animation) !== null && _o !== void 0 ? _o : false,
98087
+ animation: (_u = this._spec.animation) !== null && _u !== void 0 ? _u : false,
98070
98088
  animationEnter: this._spec.animationEnter,
98071
98089
  animationExit: this._spec.animationExit,
98072
98090
  animationUpdate: this._spec.animationUpdate
@@ -98091,7 +98109,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98091
98109
  return markLine;
98092
98110
  }
98093
98111
  _getUpdateMarkerAttrs() {
98094
- var _a, _b;
98112
+ var _a, _b, _c, _d;
98095
98113
  const spec = this._spec;
98096
98114
  const data = this._markerData;
98097
98115
  const startRelativeSeries = this._startRelativeSeries;
@@ -98101,7 +98119,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98101
98119
  const seriesData = relativeSeries.getViewData().latestData;
98102
98120
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
98103
98121
  let limitRect;
98104
- if (spec.clip || array(spec.label).some(labelCfg => labelCfg === null || labelCfg === void 0 ? void 0 : labelCfg.confine)) {
98122
+ if (spec.clip || ((_a = spec.label) === null || _a === void 0 ? void 0 : _a.confine)) {
98105
98123
  const { minX, maxX, minY, maxY } = computeClipRange([
98106
98124
  startRelativeSeries.getRegion(),
98107
98125
  endRelativeSeries.getRegion(),
@@ -98114,13 +98132,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98114
98132
  height: maxY - minY
98115
98133
  };
98116
98134
  }
98117
- const markerComponentAttr = (_b = (_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.attribute) !== null && _b !== void 0 ? _b : {};
98118
- const prevLabelAttrs = array(markerComponentAttr.label);
98119
- const specLabels = array(this._spec.label);
98120
- const labelAttrs = prevLabelAttrs.map((prevLabel, index) => {
98121
- const specLabel = specLabels[index] || {};
98122
- return Object.assign(Object.assign({}, prevLabel), { text: specLabel.formatMethod ? specLabel.formatMethod(dataPoints, seriesData) : prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.text });
98123
- });
98135
+ const markerComponentAttr = (_c = (_b = this._markerComponent) === null || _b === void 0 ? void 0 : _b.attribute) !== null && _c !== void 0 ? _c : {};
98136
+ const labelAttrs = Object.assign(Object.assign({}, markerComponentAttr.label), { text: this._spec.label.formatMethod
98137
+ ? this._spec.label.formatMethod(dataPoints, seriesData)
98138
+ : (_d = markerComponentAttr.label) === null || _d === void 0 ? void 0 : _d.text });
98124
98139
  return Object.assign(Object.assign({}, pointsAttr), { label: labelAttrs, limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY });
98125
98140
  }
98126
98141
  _markerLayout() {
@@ -98222,7 +98237,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98222
98237
  return { points };
98223
98238
  }
98224
98239
  _markerLayout() {
98225
- var _a, _b, _c, _d, _e;
98240
+ var _a, _b, _c, _d, _e, _f, _g, _h;
98226
98241
  const updateAttrs = this._getUpdateMarkerAttrs();
98227
98242
  if (this._spec.type === 'type-step') {
98228
98243
  const startRelativeSeries = this._startRelativeSeries;
@@ -98249,7 +98264,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98249
98264
  else {
98250
98265
  expandDistanceValue = expandDistance;
98251
98266
  }
98252
- const { points, limitRect } = updateAttrs;
98267
+ const { points, label, limitRect } = updateAttrs;
98253
98268
  const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
98254
98269
  let labelPositionAttrs;
98255
98270
  if (multiSegment && isValid$1(mainSegmentIndex)) {
@@ -98263,10 +98278,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98263
98278
  else {
98264
98279
  labelPositionAttrs = Object.assign(Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue)), { refX: 0, refY: 0 });
98265
98280
  }
98266
- const markerComponentAttr = (_b = (_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.attribute) !== null && _b !== void 0 ? _b : {};
98267
- const prevLabelAttrs = array(markerComponentAttr.label);
98268
- const label = array((_c = updateAttrs.label) !== null && _c !== void 0 ? _c : {});
98269
- (_d = this._markerComponent) === null || _d === void 0 ? void 0 : _d.setAttributes({
98281
+ if (isValidNumber$1((_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.refX)) {
98282
+ labelPositionAttrs.refX += this._spec.label.refX;
98283
+ }
98284
+ if (isValidNumber$1((_b = this._spec.label) === null || _b === void 0 ? void 0 : _b.refY)) {
98285
+ labelPositionAttrs.refY += this._spec.label.refY;
98286
+ }
98287
+ if (isValidNumber$1((_c = this._spec.label) === null || _c === void 0 ? void 0 : _c.dx)) {
98288
+ labelPositionAttrs.dx = (labelPositionAttrs.dx || 0) + this._spec.label.dx;
98289
+ }
98290
+ if (isValidNumber$1((_d = this._spec.label) === null || _d === void 0 ? void 0 : _d.dy)) {
98291
+ labelPositionAttrs.dy = (labelPositionAttrs.dy || 0) + this._spec.label.dy;
98292
+ }
98293
+ const markerComponentAttr = (_f = (_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.attribute) !== null && _f !== void 0 ? _f : {};
98294
+ (_g = this._markerComponent) === null || _g === void 0 ? void 0 : _g.setAttributes({
98270
98295
  points: multiSegment
98271
98296
  ? [
98272
98297
  [joinPoints[0], joinPoints[1]],
@@ -98274,22 +98299,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98274
98299
  [joinPoints[2], joinPoints[3]]
98275
98300
  ]
98276
98301
  : joinPoints,
98277
- label: label.map((labelItem, index) => {
98278
- var _a;
98279
- if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.refX)) {
98280
- labelPositionAttrs.refX += labelItem.refX;
98281
- }
98282
- if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.refY)) {
98283
- labelPositionAttrs.refY += labelItem.refY;
98284
- }
98285
- if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.dx)) {
98286
- labelPositionAttrs.dx = (labelPositionAttrs.dx || 0) + labelItem.dx;
98287
- }
98288
- if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.dy)) {
98289
- labelPositionAttrs.dy = (labelPositionAttrs.dy || 0) + labelItem.dy;
98290
- }
98291
- return Object.assign(Object.assign(Object.assign({}, labelItem), labelPositionAttrs), { textStyle: Object.assign(Object.assign({}, (_a = prevLabelAttrs[index]) === null || _a === void 0 ? void 0 : _a.textStyle), { textAlign: 'center', textBaseline: 'middle' }) });
98292
- }),
98302
+ label: Object.assign(Object.assign(Object.assign({}, label), labelPositionAttrs), { textStyle: Object.assign(Object.assign({}, markerComponentAttr.label.textStyle), { textAlign: 'center', textBaseline: 'middle' }) }),
98293
98303
  limitRect,
98294
98304
  multiSegment,
98295
98305
  mainSegmentIndex,
@@ -98298,7 +98308,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98298
98308
  });
98299
98309
  }
98300
98310
  else {
98301
- (_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.setAttributes(updateAttrs);
98311
+ (_h = this._markerComponent) === null || _h === void 0 ? void 0 : _h.setAttributes(updateAttrs);
98302
98312
  }
98303
98313
  }
98304
98314
  _computeOptions() {
@@ -98362,15 +98372,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98362
98372
  type: 'markerAggregation',
98363
98373
  options
98364
98374
  });
98365
- if (spec.process && 'x' in spec.process) {
98375
+ if (spec.process && isValid$1(spec.process.x)) {
98366
98376
  options = [this._processSpecByDims([{ dim: 'x', specValue: spec.process.x }])];
98367
98377
  needAggr = true;
98368
98378
  }
98369
- if (spec.process && 'y' in spec.process) {
98379
+ if (spec.process && isValid$1(spec.process.y)) {
98370
98380
  options = options = [this._processSpecByDims([{ dim: 'y', specValue: spec.process.y }])];
98371
98381
  needAggr = true;
98372
98382
  }
98373
- if (spec.process && 'xy' in spec.process) {
98383
+ if (spec.process && isValid$1(spec.process.xy)) {
98374
98384
  const { xField, yField } = relativeSeries.getSpec();
98375
98385
  options = {
98376
98386
  fieldX: xField,
@@ -98652,8 +98662,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98652
98662
  return 'cartesian';
98653
98663
  }
98654
98664
  _createMarkerComponent() {
98655
- var _a, _b, _c, _d, _e, _f, _g, _h;
98656
- const label = array((_a = this._spec.label) !== null && _a !== void 0 ? _a : {});
98665
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
98666
+ const label = (_a = this._spec.label) !== null && _a !== void 0 ? _a : {};
98657
98667
  const markAreaAttrs = {
98658
98668
  zIndex: this.layoutZIndex,
98659
98669
  interactive: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
@@ -98675,20 +98685,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98675
98685
  endAngle: 0,
98676
98686
  areaStyle: transformStyle(transformToGraphic((_e = this._spec.area) === null || _e === void 0 ? void 0 : _e.style), this._markerData, this._markAttributeContext),
98677
98687
  clipInRange: (_f = this._spec.clip) !== null && _f !== void 0 ? _f : false,
98678
- label: label.map((labelItem) => {
98679
- return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
98680
- }),
98688
+ label: transformLabelAttributes(label, this._markerData, this._markAttributeContext),
98681
98689
  state: {
98682
98690
  area: transformState((_g = this._spec.area) === null || _g === void 0 ? void 0 : _g.state, this._markerData, this._markAttributeContext),
98683
- label: label.map((labelItem) => {
98684
- return transformState(labelItem.state, this._markerData, this._markAttributeContext);
98685
- }),
98686
- labelBackground: label.map((labelItem) => {
98687
- var _a;
98688
- return transformState((_a = labelItem.labelBackground) === null || _a === void 0 ? void 0 : _a.state, this._markerData, this._markAttributeContext);
98689
- })
98691
+ label: transformState((_h = this._spec.label) === null || _h === void 0 ? void 0 : _h.state, this._markerData, this._markAttributeContext),
98692
+ labelBackground: transformState((_l = (_k = (_j = this._spec) === null || _j === void 0 ? void 0 : _j.label) === null || _k === void 0 ? void 0 : _k.labelBackground) === null || _l === void 0 ? void 0 : _l.state, this._markerData, this._markAttributeContext)
98690
98693
  },
98691
- animation: (_h = this._spec.animation) !== null && _h !== void 0 ? _h : false,
98694
+ animation: (_m = this._spec.animation) !== null && _m !== void 0 ? _m : false,
98692
98695
  animationEnter: this._spec.animationEnter,
98693
98696
  animationExit: this._spec.animationExit,
98694
98697
  animationUpdate: this._spec.animationUpdate
@@ -98697,7 +98700,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98697
98700
  return markArea;
98698
98701
  }
98699
98702
  _markerLayout() {
98700
- var _a;
98703
+ var _a, _b, _c, _d;
98701
98704
  const spec = this._spec;
98702
98705
  const data = this._markerData;
98703
98706
  const startRelativeSeries = this._startRelativeSeries;
@@ -98711,7 +98714,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98711
98714
  : data.latestData
98712
98715
  : seriesData;
98713
98716
  let limitRect;
98714
- if (spec.clip || array(spec.label).some(labelCfg => labelCfg === null || labelCfg === void 0 ? void 0 : labelCfg.confine)) {
98717
+ if (spec.clip || ((_a = spec.label) === null || _a === void 0 ? void 0 : _a.confine)) {
98715
98718
  const { minX, maxX, minY, maxY } = computeClipRange([
98716
98719
  startRelativeSeries.getRegion(),
98717
98720
  endRelativeSeries.getRegion(),
@@ -98725,15 +98728,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
98725
98728
  };
98726
98729
  }
98727
98730
  if (this._markerComponent) {
98728
- const prevLabelAttrs = array((_a = this._markerComponent.attribute) === null || _a === void 0 ? void 0 : _a.label);
98729
- const specLabels = array(this._spec.label);
98730
- this._markerComponent.setAttributes(Object.assign(Object.assign({}, pointsAttr), { label: prevLabelAttrs.map((prevLabel, index) => {
98731
- const specLabel = specLabels[index] || {};
98732
- return Object.assign(Object.assign({}, prevLabel), { text: specLabel.formatMethod
98733
- ?
98734
- specLabel.formatMethod(dataPoints, seriesData)
98735
- : prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.text });
98736
- }), limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY }));
98731
+ this._markerComponent.setAttributes(Object.assign(Object.assign({}, pointsAttr), { label: Object.assign(Object.assign({}, (_b = this._markerComponent.attribute) === null || _b === void 0 ? void 0 : _b.label), { text: this._spec.label.formatMethod
98732
+ ?
98733
+ this._spec.label.formatMethod(dataPoints, seriesData)
98734
+ : (_d = (_c = this._markerComponent.attribute) === null || _c === void 0 ? void 0 : _c.label) === null || _d === void 0 ? void 0 : _d.text }), limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY }));
98737
98735
  }
98738
98736
  }
98739
98737
  _initDataView() {
@@ -99962,9 +99960,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
99962
99960
  const spec = this._spec;
99963
99961
  const data = this._markerData;
99964
99962
  const relativeSeries = this._relativeSeries;
99965
- const isXYLayout = 'x' in spec && 'y' in spec;
99966
- const isCoordinateLayout = 'coordinate' in spec;
99967
- const isPositionLayout = 'position' in spec;
99963
+ const isXYLayout = isValid$1(spec.x) && isValid$1(spec.y);
99964
+ const isCoordinateLayout = isValid$1(spec.coordinate);
99965
+ const isPositionLayout = isValid$1(spec.position);
99968
99966
  const autoRange = (_a = spec === null || spec === void 0 ? void 0 : spec.autoRange) !== null && _a !== void 0 ? _a : false;
99969
99967
  let point;
99970
99968
  if (isXYLayout) {
@@ -103825,6 +103823,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
103825
103823
  exports.CanvasTooltipHandler = CanvasTooltipHandler;
103826
103824
  exports.CartesianAxis = CartesianAxis;
103827
103825
  exports.CartesianBandAxis = CartesianBandAxis;
103826
+ exports.CartesianChartSpecTransformer = CartesianChartSpecTransformer;
103828
103827
  exports.CartesianCrossHair = CartesianCrossHair;
103829
103828
  exports.CartesianLinearAxis = CartesianLinearAxis;
103830
103829
  exports.CartesianLogAxis = CartesianLogAxis;