@visactor/vchart 1.13.9-alpha.1 → 1.13.9-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 (32) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +243 -244
  3. package/build/index.js +243 -244
  4. package/build/index.min.js +1 -1
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/component/marker/mark-area/base-mark-area.js +17 -27
  7. package/cjs/component/marker/mark-area/base-mark-area.js.map +1 -1
  8. package/cjs/component/marker/mark-area/interface/theme.d.ts +3 -4
  9. package/cjs/component/marker/mark-area/interface/theme.js.map +1 -1
  10. package/cjs/component/marker/mark-line/base-mark-line.js +20 -31
  11. package/cjs/component/marker/mark-line/base-mark-line.js.map +1 -1
  12. package/cjs/component/marker/mark-line/cartesian-mark-line.js +16 -20
  13. package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
  14. package/cjs/component/marker/mark-line/interface/theme.d.ts +3 -4
  15. package/cjs/component/marker/mark-line/interface/theme.js.map +1 -1
  16. package/cjs/core/index.d.ts +1 -1
  17. package/cjs/core/index.js +1 -1
  18. package/cjs/core/index.js.map +1 -1
  19. package/esm/component/marker/mark-area/base-mark-area.js +16 -27
  20. package/esm/component/marker/mark-area/base-mark-area.js.map +1 -1
  21. package/esm/component/marker/mark-area/interface/theme.d.ts +3 -4
  22. package/esm/component/marker/mark-area/interface/theme.js.map +1 -1
  23. package/esm/component/marker/mark-line/base-mark-line.js +19 -30
  24. package/esm/component/marker/mark-line/base-mark-line.js.map +1 -1
  25. package/esm/component/marker/mark-line/cartesian-mark-line.js +16 -20
  26. package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
  27. package/esm/component/marker/mark-line/interface/theme.d.ts +3 -4
  28. package/esm/component/marker/mark-line/interface/theme.js.map +1 -1
  29. package/esm/core/index.d.ts +1 -1
  30. package/esm/core/index.js +1 -1
  31. package/esm/core/index.js.map +1 -1
  32. package/package.json +15 -15
package/build/index.es.js CHANGED
@@ -31425,6 +31425,10 @@ const SCROLLBAR_START_EVENT = "scrollDown";
31425
31425
  const SCROLLBAR_EVENT$1 = "scrollDrag";
31426
31426
  const SCROLLBAR_END_EVENT$1 = "scrollUp";
31427
31427
 
31428
+ function getEndTriggersOfDrag() {
31429
+ return "browser" === vglobal.env ? ["pointerup", "pointerleave"] : ["pointerup", "pointerleave", "pointerupoutside"];
31430
+ }
31431
+
31428
31432
  const delayMap$3 = {
31429
31433
  debounce: debounce,
31430
31434
  throttle: throttle
@@ -31457,6 +31461,7 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
31457
31461
  }
31458
31462
  this.setScrollRange([currentScrollValue - (range[1] - range[0]) / 2, currentScrollValue + (range[1] - range[0]) / 2], !1), this.stage && !this.stage.autoRender && this.stage.renderNextFrame();
31459
31463
  }, this._onSliderPointerDown = e => {
31464
+ this._clearDragEvents();
31460
31465
  const {
31461
31466
  stopSliderDownPropagation = !0
31462
31467
  } = this.attribute;
@@ -31471,11 +31476,14 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
31471
31476
  this._prePos = "horizontal" === direction ? x : y, this._dispatchEvent(SCROLLBAR_START_EVENT, {
31472
31477
  pos: this._prePos,
31473
31478
  event: e
31474
- }), "browser" === vglobal.env ? (vglobal.addEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
31475
- capture: !0
31476
- }), vglobal.addEventListener("pointerup", this._onSliderPointerUp)) : (this.stage.addEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
31479
+ });
31480
+ const triggers = getEndTriggersOfDrag(),
31481
+ obj = "browser" === vglobal.env ? vglobal : this.stage;
31482
+ obj.addEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
31477
31483
  capture: !0
31478
- }), this.stage.addEventListener("pointerup", this._onSliderPointerUp), this.stage.addEventListener("pointerupoutside", this._onSliderPointerUp));
31484
+ }), triggers.forEach(trigger => {
31485
+ obj.addEventListener(trigger, this._onSliderPointerUp);
31486
+ });
31479
31487
  }, this._computeScrollValue = e => {
31480
31488
  const {
31481
31489
  direction: direction
@@ -31512,11 +31520,7 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
31512
31520
  this._dispatchEvent(SCROLLBAR_END_EVENT$1, {
31513
31521
  pre: preRange,
31514
31522
  value: clampRange$1(range, limitRange[0], limitRange[1])
31515
- }), "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
31516
- capture: !0
31517
- }), vglobal.removeEventListener("pointerup", this._onSliderPointerUp)) : (this.stage.removeEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
31518
- capture: !0
31519
- }), this.stage.removeEventListener("pointerup", this._onSliderPointerUp), this.stage.removeEventListener("pointerupoutside", this._onSliderPointerUp));
31523
+ }), this._clearDragEvents();
31520
31524
  };
31521
31525
  }
31522
31526
  setScrollRange(range) {
@@ -31665,6 +31669,15 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
31665
31669
  sliderSize = this._sliderSize;
31666
31670
  return "horizontal" === direction ? clampRange$1([x1 + min * width, x1 + max * width], x1, width - sliderSize) : clampRange$1([y1 + min * height, y1 + max * height], y1, height - sliderSize);
31667
31671
  }
31672
+ _clearDragEvents() {
31673
+ const triggers = getEndTriggersOfDrag(),
31674
+ obj = "browser" === vglobal.env ? vglobal : this.stage;
31675
+ obj.removeEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
31676
+ capture: !0
31677
+ }), triggers.forEach(trigger => {
31678
+ obj.removeEventListener(trigger, this._onSliderPointerUp);
31679
+ });
31680
+ }
31668
31681
  _reset() {
31669
31682
  this._sliderRenderBounds = null, this._sliderLimitRange = null;
31670
31683
  }
@@ -39824,26 +39837,17 @@ function commonLineClipIn(line, label, duration, delay, easing) {
39824
39837
  l.animate().wait(delay + startSymbolDuration + index * stepDuration).to({
39825
39838
  clipRange: 1
39826
39839
  }, stepDuration, easing);
39827
- }), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing), array(label).forEach(labelNode => {
39828
- const delayTime = delay + startSymbolDuration + lineDuration + endSymbolDuration;
39829
- graphicFadeIn(labelNode.getTextShape(), delayTime, labelDuration, easing), graphicFadeIn(labelNode.getBgRect(), delayTime, labelDuration, easing);
39830
- });
39840
+ }), 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);
39831
39841
  }
39832
39842
 
39833
39843
  function commonLineFadeIn(line, label, duration, delay, easing) {
39834
- segmentFadeIn(line, delay, duration, easing), array(label).forEach(labelNode => {
39835
- tagFadeIn(labelNode, delay, duration, easing);
39836
- });
39844
+ segmentFadeIn(line, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
39837
39845
  }
39838
39846
  function areaFadeIn(area, label, duration, delay, easing) {
39839
- graphicFadeIn(area, delay, duration, easing), array(label).forEach(labelNode => {
39840
- tagFadeIn(labelNode, delay, duration, easing);
39841
- });
39847
+ graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
39842
39848
  }
39843
39849
  function arcAreaFadeIn(area, label, duration, delay, easing) {
39844
- graphicFadeIn(area, delay, duration, easing), array(label).forEach(labelNode => {
39845
- tagFadeIn(labelNode, delay, duration, easing);
39846
- });
39850
+ graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
39847
39851
  }
39848
39852
  function pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing) {
39849
39853
  var _a;
@@ -39851,19 +39855,13 @@ function pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing) {
39851
39855
  }
39852
39856
 
39853
39857
  function commonLineFadeOut(line, label, duration, delay, easing) {
39854
- segmentFadeOut(line, delay, duration, easing), array(label).forEach(labelNode => {
39855
- tagFadeOut(labelNode, delay, duration, easing);
39856
- });
39858
+ segmentFadeOut(line, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
39857
39859
  }
39858
39860
  function areaFadeOut(area, label, duration, delay, easing) {
39859
- graphicFadeOut(area, delay, duration, easing), array(label).forEach(labelNode => {
39860
- tagFadeOut(labelNode, delay, duration, easing);
39861
- });
39861
+ graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
39862
39862
  }
39863
39863
  function arcAreaFadeOut(area, label, duration, delay, easing) {
39864
- graphicFadeOut(area, delay, duration, easing), array(label).forEach(labelNode => {
39865
- tagFadeOut(labelNode, delay, duration, easing);
39866
- });
39864
+ graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
39867
39865
  }
39868
39866
  function pointFadeOut(itemLine, decorativeLine, item, duration, delay, easing) {
39869
39867
  var _a;
@@ -40035,57 +40033,6 @@ const DefaultExitMarkerAnimation = {
40035
40033
  delay: 0
40036
40034
  };
40037
40035
 
40038
- class MarkLabelMixin {
40039
- getLabel() {
40040
- return this._label;
40041
- }
40042
- _addMarkLabels(container, labelName, defaultLabelAttrs) {
40043
- const {
40044
- label: label,
40045
- state: state
40046
- } = this.attribute,
40047
- labelStates = array(null == state ? void 0 : state.label),
40048
- labelBackgroundStates = array(null == state ? void 0 : state.labelBackground),
40049
- labelShapes = array(label).map((labelAttrs, index) => {
40050
- var _a, _b;
40051
- const finalLabelAttrs = merge$1({}, defaultLabelAttrs, labelAttrs),
40052
- markLabel = new Tag(Object.assign(Object.assign({}, finalLabelAttrs), {
40053
- state: {
40054
- panel: merge$1({}, DEFAULT_STATES$2, null !== (_a = labelBackgroundStates[index]) && void 0 !== _a ? _a : last(labelBackgroundStates)),
40055
- text: merge$1({}, DEFAULT_STATES$2, null !== (_b = labelStates[index]) && void 0 !== _b ? _b : last(labelStates))
40056
- }
40057
- }));
40058
- return markLabel.name = labelName, container.add(markLabel), this.setLabelPos(markLabel, finalLabelAttrs), markLabel;
40059
- });
40060
- this._label = 1 === array(labelShapes).length ? labelShapes[0] : labelShapes;
40061
- }
40062
- _updateMarkLabels(defaultLabelAttrs) {
40063
- const {
40064
- label: label,
40065
- state: state
40066
- } = this.attribute,
40067
- labelShapes = array(this._label),
40068
- labelStates = array(null == state ? void 0 : state.label),
40069
- labelBackgroundStates = array(null == state ? void 0 : state.labelBackground);
40070
- if (labelShapes.length) {
40071
- const labels = array(label);
40072
- labelShapes.forEach((labelItem, index) => {
40073
- var _a, _b;
40074
- const finalLabelAttrs = merge$1({}, defaultLabelAttrs, labels[index]);
40075
- labelItem.setAttributes(Object.assign(Object.assign({
40076
- dx: 0,
40077
- dy: 0
40078
- }, finalLabelAttrs), {
40079
- state: {
40080
- panel: merge$1({}, DEFAULT_STATES$2, null !== (_a = labelBackgroundStates[index]) && void 0 !== _a ? _a : last(labelBackgroundStates)),
40081
- text: merge$1({}, DEFAULT_STATES$2, null !== (_b = labelStates[index]) && void 0 !== _b ? _b : last(labelStates))
40082
- }
40083
- })), this.setLabelPos(labelItem, finalLabelAttrs);
40084
- });
40085
- }
40086
- }
40087
- }
40088
-
40089
40036
  class MarkCommonLine extends Marker {
40090
40037
  constructor() {
40091
40038
  super(...arguments), this.name = "markCommonLine", this.defaultUpdateAnimation = DefaultUpdateMarkLineAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
@@ -40093,20 +40040,24 @@ class MarkCommonLine extends Marker {
40093
40040
  getLine() {
40094
40041
  return this._line;
40095
40042
  }
40096
- setLabelPos(labelNode, labelAttrs) {
40043
+ getLabel() {
40044
+ return this._label;
40045
+ }
40046
+ setLabelPos() {
40097
40047
  const {
40048
+ label = {},
40098
40049
  limitRect: limitRect
40099
40050
  } = this.attribute,
40100
40051
  {
40101
40052
  position: position,
40102
40053
  confine: confine,
40103
40054
  autoRotate: autoRotate
40104
- } = labelAttrs,
40105
- labelPoint = this.getPointAttrByPosition(position, labelAttrs),
40055
+ } = label,
40056
+ labelPoint = this.getPointAttrByPosition(position),
40106
40057
  labelAngle = position.toString().toLocaleLowerCase().includes("start") ? this._line.getStartAngle() || 0 : this._line.getEndAngle() || 0;
40107
- if (labelNode.setAttributes(Object.assign(Object.assign({}, labelPoint.position), {
40108
- angle: autoRotate ? this.getRotateByAngle(labelPoint.angle, labelAttrs) : 0,
40109
- textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)), labelAttrs.textStyle)
40058
+ if (this._label.setAttributes(Object.assign(Object.assign({}, labelPoint.position), {
40059
+ angle: autoRotate ? this.getRotateByAngle(labelPoint.angle) : 0,
40060
+ textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)), label.textStyle)
40110
40061
  })), limitRect && confine) {
40111
40062
  const {
40112
40063
  x: x,
@@ -40114,7 +40065,7 @@ class MarkCommonLine extends Marker {
40114
40065
  width: width,
40115
40066
  height: height
40116
40067
  } = limitRect;
40117
- limitShapeInBounds(labelNode, {
40068
+ limitShapeInBounds(this._label, {
40118
40069
  x1: x,
40119
40070
  y1: y,
40120
40071
  x2: x + width,
@@ -40123,14 +40074,36 @@ class MarkCommonLine extends Marker {
40123
40074
  }
40124
40075
  }
40125
40076
  initMarker(container) {
40126
- const line = this.createSegment();
40127
- line.name = "mark-common-line-line", this._line = line, container.add(line), this.addMarkLineLabels(container);
40077
+ const {
40078
+ label: label,
40079
+ state: state
40080
+ } = this.attribute,
40081
+ line = this.createSegment();
40082
+ line.name = "mark-common-line-line", this._line = line, container.add(line);
40083
+ const markLabel = new Tag(Object.assign(Object.assign({}, label), {
40084
+ state: {
40085
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
40086
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
40087
+ }
40088
+ }));
40089
+ markLabel.name = "mark-common-line-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
40128
40090
  }
40129
40091
  updateMarker() {
40130
- this.setLineAttributes(), this.updateMarkLineLabels();
40092
+ const {
40093
+ label: label,
40094
+ state: state
40095
+ } = this.attribute;
40096
+ this.setLineAttributes(), this._label && (this._label.setAttributes(Object.assign(Object.assign({
40097
+ dx: 0,
40098
+ dy: 0
40099
+ }, label), {
40100
+ state: {
40101
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
40102
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
40103
+ }
40104
+ })), this.setLabelPos());
40131
40105
  }
40132
40106
  }
40133
- mixin(MarkCommonLine, MarkLabelMixin);
40134
40107
 
40135
40108
  const FUZZY_EQUAL_DELTA = .001;
40136
40109
  const DEFAULT_MARK_LINE_THEME = {
@@ -40319,7 +40292,6 @@ const DEFAULT_MARK_ARC_LINE_THEME = {
40319
40292
  lineWidth: 0
40320
40293
  },
40321
40294
  label: {
40322
- autoRotate: !0,
40323
40295
  position: IMarkCommonArcLabelPosition.arcOuterMiddle,
40324
40296
  refX: 0,
40325
40297
  refY: 0,
@@ -40374,7 +40346,6 @@ const DEFAULT_MARK_AREA_THEME = {
40374
40346
  const DEFAULT_MARK_ARC_AREA_THEME = {
40375
40347
  interactive: !0,
40376
40348
  label: {
40377
- autoRotate: !0,
40378
40349
  position: IMarkCommonArcLabelPosition.arcOuterMiddle,
40379
40350
  textStyle: {
40380
40351
  fill: "#fff",
@@ -40630,12 +40601,15 @@ class MarkLine extends MarkCommonLine {
40630
40601
  constructor(attributes, options) {
40631
40602
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkLine.defaultAttributes, attributes)), this.name = "markLine";
40632
40603
  }
40633
- getPointAttrByPosition(position, labelAttrs) {
40604
+ getPointAttrByPosition(position) {
40634
40605
  var _a;
40635
40606
  const {
40607
+ label = {}
40608
+ } = this.attribute,
40609
+ {
40636
40610
  refX = 0,
40637
40611
  refY = 0
40638
- } = labelAttrs,
40612
+ } = label,
40639
40613
  points = this._line.getMainSegmentPoints(),
40640
40614
  lineEndAngle = null !== (_a = this._line.getEndAngle()) && void 0 !== _a ? _a : 0,
40641
40615
  labelAngle = (lineEndAngle),
@@ -40661,9 +40635,9 @@ class MarkLine extends MarkCommonLine {
40661
40635
  angle: labelAngle
40662
40636
  };
40663
40637
  }
40664
- getRotateByAngle(angle, labelAttrs) {
40638
+ getRotateByAngle(angle) {
40665
40639
  var _a;
40666
- return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a = labelAttrs.refAngle) && void 0 !== _a ? _a : 0);
40640
+ return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a = this.attribute.label.refAngle) && void 0 !== _a ? _a : 0);
40667
40641
  }
40668
40642
  getTextStyle(position, labelAngle, autoRotate) {
40669
40643
  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];
@@ -40729,12 +40703,6 @@ class MarkLine extends MarkCommonLine {
40729
40703
  });else if (!isValidNumber$1(point.x) || !isValidNumber$1(point.y)) return void (validFlag = !1);
40730
40704
  }), validFlag;
40731
40705
  }
40732
- addMarkLineLabels(container) {
40733
- this._addMarkLabels(container, "mark-common-line-label", MarkLine.defaultAttributes.label);
40734
- }
40735
- updateMarkLineLabels() {
40736
- this._updateMarkLabels(MarkLine.defaultAttributes.label);
40737
- }
40738
40706
  }
40739
40707
  MarkLine.defaultAttributes = DEFAULT_MARK_LINE_THEME;
40740
40708
 
@@ -40749,6 +40717,9 @@ class MarkArea extends Marker {
40749
40717
  getArea() {
40750
40718
  return this._area;
40751
40719
  }
40720
+ getLabel() {
40721
+ return this._label;
40722
+ }
40752
40723
  constructor(attributes, options) {
40753
40724
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArea.defaultAttributes, attributes)), this.name = "markArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
40754
40725
  }
@@ -40765,21 +40736,24 @@ class MarkArea extends Marker {
40765
40736
  };
40766
40737
  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;
40767
40738
  }
40768
- setLabelPos(labelNode, labelAttrs) {
40739
+ setLabelPos() {
40769
40740
  var _a;
40770
- if (this._area) {
40771
- const labelPosition = null !== (_a = labelAttrs.position) && void 0 !== _a ? _a : "middle",
40741
+ if (this._label && this._area) {
40742
+ const {
40743
+ label = {}
40744
+ } = this.attribute,
40745
+ labelPosition = null !== (_a = label.position) && void 0 !== _a ? _a : "middle",
40772
40746
  labelPoint = this.getPointAttrByPosition(labelPosition);
40773
- if (labelNode.setAttributes(Object.assign(Object.assign({}, labelPoint), {
40774
- textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]), labelAttrs.textStyle)
40775
- })), this.attribute.limitRect && labelAttrs.confine) {
40747
+ if (this._label.setAttributes(Object.assign(Object.assign({}, labelPoint), {
40748
+ textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
40749
+ })), this.attribute.limitRect && label.confine) {
40776
40750
  const {
40777
40751
  x: x,
40778
40752
  y: y,
40779
40753
  width: width,
40780
40754
  height: height
40781
40755
  } = this.attribute.limitRect;
40782
- limitShapeInBounds(labelNode, {
40756
+ limitShapeInBounds(this._label, {
40783
40757
  x1: x,
40784
40758
  y1: y,
40785
40759
  x2: x + width,
@@ -40791,23 +40765,40 @@ class MarkArea extends Marker {
40791
40765
  initMarker(container) {
40792
40766
  const {
40793
40767
  points: points,
40768
+ label: label,
40794
40769
  areaStyle: areaStyle,
40795
40770
  state: state
40796
40771
  } = this.attribute,
40797
40772
  area = graphicCreator.polygon(Object.assign({
40798
40773
  points: points
40799
40774
  }, areaStyle));
40800
- 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);
40775
+ area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "mark-area-polygon", this._area = area, container.add(area);
40776
+ const markLabel = new Tag(Object.assign(Object.assign({}, label), {
40777
+ state: {
40778
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
40779
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
40780
+ }
40781
+ }));
40782
+ markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
40801
40783
  }
40802
40784
  updateMarker() {
40803
40785
  const {
40804
40786
  points: points,
40787
+ label: label,
40805
40788
  areaStyle: areaStyle,
40806
40789
  state: state
40807
40790
  } = this.attribute;
40808
40791
  this._area && (this._area.setAttributes(Object.assign({
40809
40792
  points: points
40810
- }, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._updateMarkLabels(MarkArea.defaultAttributes.label);
40793
+ }, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._label && this._label.setAttributes(Object.assign(Object.assign({
40794
+ dx: 0,
40795
+ dy: 0
40796
+ }, label), {
40797
+ state: {
40798
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
40799
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
40800
+ }
40801
+ })), this.setLabelPos();
40811
40802
  }
40812
40803
  isValidPoints() {
40813
40804
  const {
@@ -40820,7 +40811,7 @@ class MarkArea extends Marker {
40820
40811
  }), validFlag;
40821
40812
  }
40822
40813
  }
40823
- MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME, mixin(MarkArea, MarkLabelMixin);
40814
+ MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME;
40824
40815
 
40825
40816
  loadMarkArcLineComponent();
40826
40817
  function registerMarkArcLineAnimate() {
@@ -40831,19 +40822,24 @@ class MarkArcLine extends MarkCommonLine {
40831
40822
  MarkArcLine._animate && this._animationConfig && MarkArcLine._animate(this._line, this._label, this._animationConfig, state);
40832
40823
  }
40833
40824
  constructor(attributes, options) {
40834
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes)), this.name = "markArcLine";
40825
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes, {
40826
+ label: {
40827
+ autoRotate: !0
40828
+ }
40829
+ })), this.name = "markArcLine";
40835
40830
  }
40836
- getPointAttrByPosition(direction, labelAttrs) {
40831
+ getPointAttrByPosition(direction) {
40837
40832
  const {
40838
40833
  center: center,
40839
40834
  radius: radius,
40840
40835
  startAngle: startAngle,
40841
- endAngle: endAngle
40836
+ endAngle: endAngle,
40837
+ label: label
40842
40838
  } = this.attribute,
40843
40839
  {
40844
40840
  refX = 0,
40845
40841
  refY = 0
40846
- } = labelAttrs;
40842
+ } = label;
40847
40843
  let angle;
40848
40844
  switch (direction) {
40849
40845
  case IMarkCommonArcLabelPosition.arcInnerStart:
@@ -40873,9 +40869,9 @@ class MarkArcLine extends MarkCommonLine {
40873
40869
  getTextStyle(position) {
40874
40870
  return DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[position];
40875
40871
  }
40876
- getRotateByAngle(angle, labelAttrs) {
40872
+ getRotateByAngle(angle) {
40877
40873
  var _a;
40878
- return angle - Math.PI / 2 + (null !== (_a = labelAttrs.refAngle) && void 0 !== _a ? _a : 0);
40874
+ return angle - Math.PI / 2 + (null !== (_a = this.attribute.label.refAngle) && void 0 !== _a ? _a : 0);
40879
40875
  }
40880
40876
  createSegment() {
40881
40877
  const {
@@ -40932,12 +40928,6 @@ class MarkArcLine extends MarkCommonLine {
40932
40928
  isValidPoints() {
40933
40929
  return !0;
40934
40930
  }
40935
- addMarkLineLabels(container) {
40936
- this._addMarkLabels(container, "mark-common-line-label", MarkArcLine.defaultAttributes.label);
40937
- }
40938
- updateMarkLineLabels() {
40939
- this._updateMarkLabels(MarkArcLine.defaultAttributes.label);
40940
- }
40941
40931
  }
40942
40932
  MarkArcLine.defaultAttributes = DEFAULT_MARK_ARC_LINE_THEME;
40943
40933
 
@@ -40952,21 +40942,29 @@ class MarkArcArea extends Marker {
40952
40942
  getArea() {
40953
40943
  return this._area;
40954
40944
  }
40945
+ getLabel() {
40946
+ return this._label;
40947
+ }
40955
40948
  constructor(attributes, options) {
40956
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes)), this.name = "markArcArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
40949
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes, {
40950
+ label: {
40951
+ autoRotate: !0
40952
+ }
40953
+ })), this.name = "markArcArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
40957
40954
  }
40958
- getPointAttrByPosition(position, labelAttrs) {
40955
+ getPointAttrByPosition(position) {
40959
40956
  const {
40960
40957
  center: center,
40961
40958
  innerRadius: innerRadius,
40962
40959
  outerRadius: outerRadius,
40963
40960
  startAngle: startAngle,
40964
- endAngle: endAngle
40961
+ endAngle: endAngle,
40962
+ label: label
40965
40963
  } = this.attribute,
40966
40964
  {
40967
40965
  refX = 0,
40968
40966
  refY = 0
40969
- } = labelAttrs;
40967
+ } = label;
40970
40968
  let radius, angle;
40971
40969
  switch (position) {
40972
40970
  case IMarkCommonArcLabelPosition.center:
@@ -41001,25 +40999,28 @@ class MarkArcArea extends Marker {
41001
40999
  angle: angle
41002
41000
  };
41003
41001
  }
41004
- setLabelPos(labelNode, labelAttrs) {
41002
+ setLabelPos() {
41005
41003
  var _a;
41006
- if (this._area) {
41004
+ if (this._label && this._area) {
41007
41005
  const {
41006
+ label = {}
41007
+ } = this.attribute,
41008
+ {
41008
41009
  position: labelPosition = "arcInnerMiddle",
41009
41010
  autoRotate: autoRotate
41010
- } = labelAttrs,
41011
- labelAttr = this.getPointAttrByPosition(labelPosition, labelAttrs);
41012
- if (labelNode.setAttributes(Object.assign(Object.assign({}, labelAttr.position), {
41013
- angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a = labelAttrs.refAngle) && void 0 !== _a ? _a : 0) : 0,
41014
- textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]), labelAttrs.textStyle)
41015
- })), this.attribute.limitRect && labelAttrs.confine) {
41011
+ } = label,
41012
+ labelAttr = this.getPointAttrByPosition(labelPosition);
41013
+ if (this._label.setAttributes(Object.assign(Object.assign({}, labelAttr.position), {
41014
+ angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a = label.refAngle) && void 0 !== _a ? _a : 0) : 0,
41015
+ textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
41016
+ })), this.attribute.limitRect && label.confine) {
41016
41017
  const {
41017
41018
  x: x,
41018
41019
  y: y,
41019
41020
  width: width,
41020
41021
  height: height
41021
41022
  } = this.attribute.limitRect;
41022
- limitShapeInBounds(labelNode, {
41023
+ limitShapeInBounds(this._label, {
41023
41024
  x1: x,
41024
41025
  y1: y,
41025
41026
  x2: x + width,
@@ -41036,6 +41037,7 @@ class MarkArcArea extends Marker {
41036
41037
  startAngle: startAngle,
41037
41038
  endAngle: endAngle,
41038
41039
  areaStyle: areaStyle,
41040
+ label: label,
41039
41041
  state: state
41040
41042
  } = this.attribute,
41041
41043
  area = graphicCreator.arc(Object.assign({
@@ -41046,7 +41048,14 @@ class MarkArcArea extends Marker {
41046
41048
  startAngle: startAngle,
41047
41049
  endAngle: endAngle
41048
41050
  }, areaStyle));
41049
- 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);
41051
+ 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);
41052
+ const markLabel = new Tag(Object.assign(Object.assign({}, label), {
41053
+ state: {
41054
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
41055
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
41056
+ }
41057
+ }));
41058
+ markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
41050
41059
  }
41051
41060
  updateMarker() {
41052
41061
  const {
@@ -41066,13 +41075,21 @@ class MarkArcArea extends Marker {
41066
41075
  outerRadius: outerRadius,
41067
41076
  startAngle: startAngle,
41068
41077
  endAngle: endAngle
41069
- }, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._updateMarkLabels(MarkArcArea.defaultAttributes.label);
41078
+ }, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._label && (this._label.setAttributes(Object.assign(Object.assign({
41079
+ dx: 0,
41080
+ dy: 0
41081
+ }, label), {
41082
+ state: {
41083
+ panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
41084
+ text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
41085
+ }
41086
+ })), this.setLabelPos());
41070
41087
  }
41071
41088
  isValidPoints() {
41072
41089
  return !0;
41073
41090
  }
41074
41091
  }
41075
- MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME, mixin(MarkArcArea, MarkLabelMixin);
41092
+ MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME;
41076
41093
 
41077
41094
  loadMarkPointComponent();
41078
41095
  function registerMarkPointAnimate() {
@@ -42592,16 +42609,19 @@ class Slider extends AbstractComponent {
42592
42609
  } = this.attribute;
42593
42610
  tooltip && tooltip.alwaysShow || (this._tooltipState = null, this._tooltipShape && this._tooltipShape.setAttribute("visible", !1), this._tooltipText && this._tooltipText.setAttribute("visible", !1), this._dispatchTooltipEvent("sliderTooltipHide"));
42594
42611
  }, this._onHandlerPointerdown = e => {
42595
- e.stopPropagation(), this._isChanging = !0;
42612
+ e.stopPropagation(), this._clearAllDragEvents(), this._isChanging = !0;
42596
42613
  const {
42597
42614
  x: x,
42598
42615
  y: y
42599
42616
  } = this.stage.eventPointTransform(e);
42600
- this._currentHandler = e.target, this._prePos = this._isHorizontal ? x : y, "browser" === vglobal.env ? (vglobal.addEventListener("pointermove", this._onHandlerPointerMove, {
42601
- capture: !0
42602
- }), vglobal.addEventListener("pointerup", this._onHandlerPointerUp)) : (this.stage.addEventListener("pointermove", this._onHandlerPointerMove, {
42617
+ this._currentHandler = e.target, this._prePos = this._isHorizontal ? x : y;
42618
+ const triggers = getEndTriggersOfDrag(),
42619
+ obj = "browser" === vglobal.env ? vglobal : this.stage;
42620
+ obj.addEventListener("pointermove", this._onHandlerPointerMove, {
42603
42621
  capture: !0
42604
- }), this.stage.addEventListener("pointerup", this._onHandlerPointerUp), this.stage.addEventListener("pointerupoutside", this._onHandlerPointerUp));
42622
+ }), triggers.forEach(trigger => {
42623
+ obj.addEventListener(trigger, this._onHandlerPointerUp);
42624
+ });
42605
42625
  }, this._onHandlerPointerMove = e => {
42606
42626
  var _a, _b;
42607
42627
  e.stopPropagation(), this._isChanging = !0;
@@ -42625,22 +42645,21 @@ class Slider extends AbstractComponent {
42625
42645
  currentValue = this.calculateValueByPos(newPos);
42626
42646
  "text" === this._currentHandler.type ? this._updateHandlerText(this._currentHandler, newPos, currentValue) : this._updateHandler(this._currentHandler, newPos, currentValue), this._updateTrack(), this._prePos = currentPos, this._dispatchChangeEvent();
42627
42647
  }, this._onHandlerPointerUp = e => {
42628
- e.preventDefault(), this._isChanging = !1, this._currentHandler = null, "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
42629
- capture: !0
42630
- }), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp)) : (this.stage.removeEventListener("pointermove", this._onHandlerPointerMove, {
42631
- capture: !0
42632
- }), this.stage.removeEventListener("pointerup", this._onHandlerPointerUp), this.stage.removeEventListener("pointerupoutside", this._onHandlerPointerUp));
42648
+ e.preventDefault(), this._isChanging = !1, this._currentHandler = null, this._clearAllDragEvents();
42633
42649
  }, this._onTrackPointerdown = e => {
42634
- e.stopPropagation(), this._isChanging = !0;
42650
+ e.stopPropagation(), this._clearAllDragEvents(), this._isChanging = !0;
42635
42651
  const {
42636
42652
  x: x,
42637
42653
  y: y
42638
42654
  } = this.stage.eventPointTransform(e);
42639
- this._prePos = this._isHorizontal ? x : y, "browser" === vglobal.env ? (vglobal.addEventListener("pointermove", this._onTrackPointerMove, {
42640
- capture: !0
42641
- }), vglobal.addEventListener("pointerup", this._onTrackPointerUp)) : (this.stage.addEventListener("pointermove", this._onTrackPointerMove, {
42655
+ this._prePos = this._isHorizontal ? x : y;
42656
+ const triggers = getEndTriggersOfDrag(),
42657
+ obj = "browser" === vglobal.env ? vglobal : this.stage;
42658
+ obj.addEventListener("pointermove", this._onTrackPointerMove, {
42642
42659
  capture: !0
42643
- }), this.stage.addEventListener("pointerup", this._onTrackPointerUp), this.stage.addEventListener("pointerupoutside", this._onTrackPointerUp));
42660
+ }), triggers.forEach(trigger => {
42661
+ obj.addEventListener(trigger, this._onTrackPointerUp);
42662
+ });
42644
42663
  }, this._onTrackPointerMove = e => {
42645
42664
  e.stopPropagation(), this._isChanging = !0;
42646
42665
  const {
@@ -42683,13 +42702,9 @@ class Slider extends AbstractComponent {
42683
42702
  }
42684
42703
  this._prePos = currentPos, this._dispatchChangeEvent();
42685
42704
  }, this._onTrackPointerUp = e => {
42686
- e.preventDefault(), this._isChanging = !1, "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onTrackPointerMove, {
42687
- capture: !0
42688
- }), vglobal.removeEventListener("pointerup", this._onTrackPointerUp)) : (this.stage.removeEventListener("pointermove", this._onTrackPointerMove, {
42689
- capture: !0
42690
- }), this.stage.removeEventListener("pointerup", this._onTrackPointerUp), this.stage.removeEventListener("pointerupoutside", this._onTrackPointerUp));
42705
+ e.preventDefault(), this._isChanging = !1, this._clearAllDragEvents();
42691
42706
  }, this._onRailPointerDown = e => {
42692
- e.stopPropagation(), this._isChanging = !0;
42707
+ e.stopPropagation(), this._clearAllDragEvents(), this._isChanging = !0;
42693
42708
  const {
42694
42709
  railWidth: railWidth,
42695
42710
  railHeight: railHeight,
@@ -43015,6 +43030,19 @@ class Slider extends AbstractComponent {
43015
43030
  _bindTooltipEvents() {
43016
43031
  this.attribute.disableTriggerEvent || (this._mainContainer.addEventListener("pointerenter", this._onTooltipShow), this._mainContainer.addEventListener("pointermove", this._onTooltipUpdate), this._mainContainer.addEventListener("pointerleave", this._onTooltipHide));
43017
43032
  }
43033
+ _clearAllDragEvents() {
43034
+ const triggers = getEndTriggersOfDrag(),
43035
+ obj = "browser" === vglobal.env ? vglobal : this.stage;
43036
+ obj.removeEventListener("pointermove", this._onHandlerPointerMove, {
43037
+ capture: !0
43038
+ }), triggers.forEach(trigger => {
43039
+ obj.removeEventListener(trigger, this._onHandlerPointerUp);
43040
+ }), obj.removeEventListener("pointermove", this._onTrackPointerMove, {
43041
+ capture: !0
43042
+ }), triggers.forEach(trigger => {
43043
+ obj.removeEventListener(trigger, this._onTrackPointerUp);
43044
+ });
43045
+ }
43018
43046
  _updateTrack() {
43019
43047
  const {
43020
43048
  inverse: inverse,
@@ -63652,7 +63680,7 @@ const registerVChartCore = () => {
63652
63680
  };
63653
63681
  registerVChartCore();
63654
63682
 
63655
- const version = "1.13.9-alpha.1";
63683
+ const version = "1.13.9-alpha.3";
63656
63684
 
63657
63685
  const addVChartProperty = (data, op) => {
63658
63686
  const context = op.beforeCall();
@@ -98023,14 +98051,13 @@ class BaseMarkLine extends BaseMarker {
98023
98051
  return 'cartesian';
98024
98052
  }
98025
98053
  _createMarkerComponent() {
98026
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
98027
- const { startSymbol = {}, endSymbol = {} } = this._spec;
98028
- const label = array((_a = this._spec.label) !== null && _a !== void 0 ? _a : {});
98054
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
98055
+ const { label = {}, startSymbol = {}, endSymbol = {} } = this._spec;
98029
98056
  const markLineAttrs = {
98030
98057
  zIndex: this.layoutZIndex,
98031
- interactive: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
98032
- hover: (_c = this._spec.interactive) !== null && _c !== void 0 ? _c : true,
98033
- select: (_d = this._spec.interactive) !== null && _d !== void 0 ? _d : true,
98058
+ interactive: (_a = this._spec.interactive) !== null && _a !== void 0 ? _a : true,
98059
+ hover: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
98060
+ select: (_c = this._spec.interactive) !== null && _c !== void 0 ? _c : true,
98034
98061
  points: [
98035
98062
  { x: 0, y: 0 },
98036
98063
  { x: 0, y: 0 }
@@ -98042,25 +98069,17 @@ class BaseMarkLine extends BaseMarker {
98042
98069
  radius: 0,
98043
98070
  startAngle: 0,
98044
98071
  endAngle: 0,
98045
- lineStyle: transformStyle(transformToGraphic((_e = this._spec.line) === null || _e === void 0 ? void 0 : _e.style), this._markerData, this._markAttributeContext),
98046
- clipInRange: (_f = this._spec.clip) !== null && _f !== void 0 ? _f : false,
98047
- label: label.map(labelItem => {
98048
- return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
98049
- }),
98072
+ lineStyle: transformStyle(transformToGraphic((_d = this._spec.line) === null || _d === void 0 ? void 0 : _d.style), this._markerData, this._markAttributeContext),
98073
+ clipInRange: (_e = this._spec.clip) !== null && _e !== void 0 ? _e : false,
98074
+ label: transformLabelAttributes(label, this._markerData, this._markAttributeContext),
98050
98075
  state: {
98051
- line: transformState((_h = (_g = this._spec.line) === null || _g === void 0 ? void 0 : _g.state) !== null && _h !== void 0 ? _h : {}, this._markerData, this._markAttributeContext),
98052
- lineStartSymbol: transformState((_k = (_j = this._spec.startSymbol) === null || _j === void 0 ? void 0 : _j.state) !== null && _k !== void 0 ? _k : {}, this._markerData, this._markAttributeContext),
98053
- lineEndSymbol: transformState((_m = (_l = this._spec.endSymbol) === null || _l === void 0 ? void 0 : _l.state) !== null && _m !== void 0 ? _m : {}, this._markerData, this._markAttributeContext),
98054
- label: label.map(labelItem => {
98055
- var _a;
98056
- return transformState((_a = labelItem.state) !== null && _a !== void 0 ? _a : {}, this._markerData, this._markAttributeContext);
98057
- }),
98058
- labelBackground: label.map(labelItem => {
98059
- var _a, _b;
98060
- return transformState((_b = (_a = labelItem.labelBackground) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : {}, this._markerData, this._markAttributeContext);
98061
- })
98076
+ line: transformState((_g = (_f = this._spec.line) === null || _f === void 0 ? void 0 : _f.state) !== null && _g !== void 0 ? _g : {}, this._markerData, this._markAttributeContext),
98077
+ lineStartSymbol: transformState((_j = (_h = this._spec.startSymbol) === null || _h === void 0 ? void 0 : _h.state) !== null && _j !== void 0 ? _j : {}, this._markerData, this._markAttributeContext),
98078
+ lineEndSymbol: transformState((_l = (_k = this._spec.endSymbol) === null || _k === void 0 ? void 0 : _k.state) !== null && _l !== void 0 ? _l : {}, this._markerData, this._markAttributeContext),
98079
+ 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),
98080
+ 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)
98062
98081
  },
98063
- animation: (_o = this._spec.animation) !== null && _o !== void 0 ? _o : false,
98082
+ animation: (_u = this._spec.animation) !== null && _u !== void 0 ? _u : false,
98064
98083
  animationEnter: this._spec.animationEnter,
98065
98084
  animationExit: this._spec.animationExit,
98066
98085
  animationUpdate: this._spec.animationUpdate
@@ -98085,7 +98104,7 @@ class BaseMarkLine extends BaseMarker {
98085
98104
  return markLine;
98086
98105
  }
98087
98106
  _getUpdateMarkerAttrs() {
98088
- var _a, _b;
98107
+ var _a, _b, _c, _d;
98089
98108
  const spec = this._spec;
98090
98109
  const data = this._markerData;
98091
98110
  const startRelativeSeries = this._startRelativeSeries;
@@ -98095,7 +98114,7 @@ class BaseMarkLine extends BaseMarker {
98095
98114
  const seriesData = relativeSeries.getViewData().latestData;
98096
98115
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
98097
98116
  let limitRect;
98098
- if (spec.clip || array(spec.label).some(labelCfg => labelCfg === null || labelCfg === void 0 ? void 0 : labelCfg.confine)) {
98117
+ if (spec.clip || ((_a = spec.label) === null || _a === void 0 ? void 0 : _a.confine)) {
98099
98118
  const { minX, maxX, minY, maxY } = computeClipRange([
98100
98119
  startRelativeSeries.getRegion(),
98101
98120
  endRelativeSeries.getRegion(),
@@ -98108,13 +98127,10 @@ class BaseMarkLine extends BaseMarker {
98108
98127
  height: maxY - minY
98109
98128
  };
98110
98129
  }
98111
- const markerComponentAttr = (_b = (_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.attribute) !== null && _b !== void 0 ? _b : {};
98112
- const prevLabelAttrs = array(markerComponentAttr.label);
98113
- const specLabels = array(this._spec.label);
98114
- const labelAttrs = prevLabelAttrs.map((prevLabel, index) => {
98115
- const specLabel = specLabels[index] || {};
98116
- return Object.assign(Object.assign({}, prevLabel), { text: specLabel.formatMethod ? specLabel.formatMethod(dataPoints, seriesData) : prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.text });
98117
- });
98130
+ const markerComponentAttr = (_c = (_b = this._markerComponent) === null || _b === void 0 ? void 0 : _b.attribute) !== null && _c !== void 0 ? _c : {};
98131
+ const labelAttrs = Object.assign(Object.assign({}, markerComponentAttr.label), { text: this._spec.label.formatMethod
98132
+ ? this._spec.label.formatMethod(dataPoints, seriesData)
98133
+ : (_d = markerComponentAttr.label) === null || _d === void 0 ? void 0 : _d.text });
98118
98134
  return Object.assign(Object.assign({}, pointsAttr), { label: labelAttrs, limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY });
98119
98135
  }
98120
98136
  _markerLayout() {
@@ -98216,7 +98232,7 @@ class CartesianMarkLine extends BaseMarkLine {
98216
98232
  return { points };
98217
98233
  }
98218
98234
  _markerLayout() {
98219
- var _a, _b, _c, _d, _e;
98235
+ var _a, _b, _c, _d, _e, _f, _g, _h;
98220
98236
  const updateAttrs = this._getUpdateMarkerAttrs();
98221
98237
  if (this._spec.type === 'type-step') {
98222
98238
  const startRelativeSeries = this._startRelativeSeries;
@@ -98243,7 +98259,7 @@ class CartesianMarkLine extends BaseMarkLine {
98243
98259
  else {
98244
98260
  expandDistanceValue = expandDistance;
98245
98261
  }
98246
- const { points, limitRect } = updateAttrs;
98262
+ const { points, label, limitRect } = updateAttrs;
98247
98263
  const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
98248
98264
  let labelPositionAttrs;
98249
98265
  if (multiSegment && isValid$1(mainSegmentIndex)) {
@@ -98257,10 +98273,20 @@ class CartesianMarkLine extends BaseMarkLine {
98257
98273
  else {
98258
98274
  labelPositionAttrs = Object.assign(Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue)), { refX: 0, refY: 0 });
98259
98275
  }
98260
- const markerComponentAttr = (_b = (_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.attribute) !== null && _b !== void 0 ? _b : {};
98261
- const prevLabelAttrs = array(markerComponentAttr.label);
98262
- const label = array((_c = updateAttrs.label) !== null && _c !== void 0 ? _c : {});
98263
- (_d = this._markerComponent) === null || _d === void 0 ? void 0 : _d.setAttributes({
98276
+ if (isValidNumber$1((_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.refX)) {
98277
+ labelPositionAttrs.refX += this._spec.label.refX;
98278
+ }
98279
+ if (isValidNumber$1((_b = this._spec.label) === null || _b === void 0 ? void 0 : _b.refY)) {
98280
+ labelPositionAttrs.refY += this._spec.label.refY;
98281
+ }
98282
+ if (isValidNumber$1((_c = this._spec.label) === null || _c === void 0 ? void 0 : _c.dx)) {
98283
+ labelPositionAttrs.dx = (labelPositionAttrs.dx || 0) + this._spec.label.dx;
98284
+ }
98285
+ if (isValidNumber$1((_d = this._spec.label) === null || _d === void 0 ? void 0 : _d.dy)) {
98286
+ labelPositionAttrs.dy = (labelPositionAttrs.dy || 0) + this._spec.label.dy;
98287
+ }
98288
+ const markerComponentAttr = (_f = (_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.attribute) !== null && _f !== void 0 ? _f : {};
98289
+ (_g = this._markerComponent) === null || _g === void 0 ? void 0 : _g.setAttributes({
98264
98290
  points: multiSegment
98265
98291
  ? [
98266
98292
  [joinPoints[0], joinPoints[1]],
@@ -98268,22 +98294,7 @@ class CartesianMarkLine extends BaseMarkLine {
98268
98294
  [joinPoints[2], joinPoints[3]]
98269
98295
  ]
98270
98296
  : joinPoints,
98271
- label: label.map((labelItem, index) => {
98272
- var _a;
98273
- if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.refX)) {
98274
- labelPositionAttrs.refX += labelItem.refX;
98275
- }
98276
- if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.refY)) {
98277
- labelPositionAttrs.refY += labelItem.refY;
98278
- }
98279
- if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.dx)) {
98280
- labelPositionAttrs.dx = (labelPositionAttrs.dx || 0) + labelItem.dx;
98281
- }
98282
- if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.dy)) {
98283
- labelPositionAttrs.dy = (labelPositionAttrs.dy || 0) + labelItem.dy;
98284
- }
98285
- 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' }) });
98286
- }),
98297
+ label: Object.assign(Object.assign(Object.assign({}, label), labelPositionAttrs), { textStyle: Object.assign(Object.assign({}, markerComponentAttr.label.textStyle), { textAlign: 'center', textBaseline: 'middle' }) }),
98287
98298
  limitRect,
98288
98299
  multiSegment,
98289
98300
  mainSegmentIndex,
@@ -98292,7 +98303,7 @@ class CartesianMarkLine extends BaseMarkLine {
98292
98303
  });
98293
98304
  }
98294
98305
  else {
98295
- (_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.setAttributes(updateAttrs);
98306
+ (_h = this._markerComponent) === null || _h === void 0 ? void 0 : _h.setAttributes(updateAttrs);
98296
98307
  }
98297
98308
  }
98298
98309
  _computeOptions() {
@@ -98646,8 +98657,8 @@ class BaseMarkArea extends BaseMarker {
98646
98657
  return 'cartesian';
98647
98658
  }
98648
98659
  _createMarkerComponent() {
98649
- var _a, _b, _c, _d, _e, _f, _g, _h;
98650
- const label = array((_a = this._spec.label) !== null && _a !== void 0 ? _a : {});
98660
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
98661
+ const label = (_a = this._spec.label) !== null && _a !== void 0 ? _a : {};
98651
98662
  const markAreaAttrs = {
98652
98663
  zIndex: this.layoutZIndex,
98653
98664
  interactive: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
@@ -98669,20 +98680,13 @@ class BaseMarkArea extends BaseMarker {
98669
98680
  endAngle: 0,
98670
98681
  areaStyle: transformStyle(transformToGraphic((_e = this._spec.area) === null || _e === void 0 ? void 0 : _e.style), this._markerData, this._markAttributeContext),
98671
98682
  clipInRange: (_f = this._spec.clip) !== null && _f !== void 0 ? _f : false,
98672
- label: label.map((labelItem) => {
98673
- return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
98674
- }),
98683
+ label: transformLabelAttributes(label, this._markerData, this._markAttributeContext),
98675
98684
  state: {
98676
98685
  area: transformState((_g = this._spec.area) === null || _g === void 0 ? void 0 : _g.state, this._markerData, this._markAttributeContext),
98677
- label: label.map((labelItem) => {
98678
- return transformState(labelItem.state, this._markerData, this._markAttributeContext);
98679
- }),
98680
- labelBackground: label.map((labelItem) => {
98681
- var _a;
98682
- return transformState((_a = labelItem.labelBackground) === null || _a === void 0 ? void 0 : _a.state, this._markerData, this._markAttributeContext);
98683
- })
98686
+ label: transformState((_h = this._spec.label) === null || _h === void 0 ? void 0 : _h.state, this._markerData, this._markAttributeContext),
98687
+ 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)
98684
98688
  },
98685
- animation: (_h = this._spec.animation) !== null && _h !== void 0 ? _h : false,
98689
+ animation: (_m = this._spec.animation) !== null && _m !== void 0 ? _m : false,
98686
98690
  animationEnter: this._spec.animationEnter,
98687
98691
  animationExit: this._spec.animationExit,
98688
98692
  animationUpdate: this._spec.animationUpdate
@@ -98691,7 +98695,7 @@ class BaseMarkArea extends BaseMarker {
98691
98695
  return markArea;
98692
98696
  }
98693
98697
  _markerLayout() {
98694
- var _a;
98698
+ var _a, _b, _c, _d;
98695
98699
  const spec = this._spec;
98696
98700
  const data = this._markerData;
98697
98701
  const startRelativeSeries = this._startRelativeSeries;
@@ -98705,7 +98709,7 @@ class BaseMarkArea extends BaseMarker {
98705
98709
  : data.latestData
98706
98710
  : seriesData;
98707
98711
  let limitRect;
98708
- if (spec.clip || array(spec.label).some(labelCfg => labelCfg === null || labelCfg === void 0 ? void 0 : labelCfg.confine)) {
98712
+ if (spec.clip || ((_a = spec.label) === null || _a === void 0 ? void 0 : _a.confine)) {
98709
98713
  const { minX, maxX, minY, maxY } = computeClipRange([
98710
98714
  startRelativeSeries.getRegion(),
98711
98715
  endRelativeSeries.getRegion(),
@@ -98719,15 +98723,10 @@ class BaseMarkArea extends BaseMarker {
98719
98723
  };
98720
98724
  }
98721
98725
  if (this._markerComponent) {
98722
- const prevLabelAttrs = array((_a = this._markerComponent.attribute) === null || _a === void 0 ? void 0 : _a.label);
98723
- const specLabels = array(this._spec.label);
98724
- this._markerComponent.setAttributes(Object.assign(Object.assign({}, pointsAttr), { label: prevLabelAttrs.map((prevLabel, index) => {
98725
- const specLabel = specLabels[index] || {};
98726
- return Object.assign(Object.assign({}, prevLabel), { text: specLabel.formatMethod
98727
- ?
98728
- specLabel.formatMethod(dataPoints, seriesData)
98729
- : prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.text });
98730
- }), limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY }));
98726
+ 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
98727
+ ?
98728
+ this._spec.label.formatMethod(dataPoints, seriesData)
98729
+ : (_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 }));
98731
98730
  }
98732
98731
  }
98733
98732
  _initDataView() {