@visactor/vrender-components 0.16.14-alpha.7 → 0.16.14

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 (127) hide show
  1. package/cjs/axis/base.js +11 -22
  2. package/cjs/axis/base.js.map +1 -1
  3. package/cjs/axis/line.js +1 -1
  4. package/cjs/axis/line.js.map +1 -1
  5. package/cjs/axis/type.d.ts +3 -6
  6. package/cjs/axis/type.js.map +1 -1
  7. package/cjs/brush/index.js +2 -1
  8. package/cjs/checkbox/index.js +1 -2
  9. package/cjs/data-zoom/config.d.ts +0 -6
  10. package/cjs/data-zoom/config.js +1 -7
  11. package/cjs/data-zoom/config.js.map +1 -1
  12. package/cjs/data-zoom/data-zoom.d.ts +3 -2
  13. package/cjs/data-zoom/data-zoom.js +19 -15
  14. package/cjs/data-zoom/data-zoom.js.map +1 -1
  15. package/cjs/data-zoom/type.d.ts +6 -0
  16. package/cjs/data-zoom/type.js +6 -1
  17. package/cjs/data-zoom/type.js.map +1 -1
  18. package/cjs/index.d.ts +1 -1
  19. package/cjs/index.js +1 -1
  20. package/cjs/index.js.map +1 -1
  21. package/cjs/indicator/indicator.js +6 -50
  22. package/cjs/indicator/indicator.js.map +1 -1
  23. package/cjs/indicator/type.d.ts +2 -5
  24. package/cjs/indicator/type.js.map +1 -1
  25. package/cjs/label/animate/animate.d.ts +8 -2
  26. package/cjs/label/animate/animate.js +37 -3
  27. package/cjs/label/animate/animate.js.map +1 -1
  28. package/cjs/label/arc.d.ts +3 -4
  29. package/cjs/label/arc.js.map +1 -1
  30. package/cjs/label/area.d.ts +15 -0
  31. package/cjs/label/area.js +41 -0
  32. package/cjs/label/area.js.map +1 -0
  33. package/cjs/label/base.d.ts +17 -14
  34. package/cjs/label/base.js +38 -61
  35. package/cjs/label/base.js.map +1 -1
  36. package/cjs/label/dataLabel.js +8 -5
  37. package/cjs/label/dataLabel.js.map +1 -1
  38. package/cjs/label/line.d.ts +1 -1
  39. package/cjs/label/line.js +2 -9
  40. package/cjs/label/line.js.map +1 -1
  41. package/cjs/label/type.d.ts +26 -10
  42. package/cjs/label/type.js +1 -2
  43. package/cjs/label/type.js.map +1 -1
  44. package/cjs/label/util.d.ts +4 -0
  45. package/cjs/label/util.js +14 -2
  46. package/cjs/label/util.js.map +1 -1
  47. package/cjs/link-path/type.js +1 -1
  48. package/cjs/marker/point.d.ts +1 -1
  49. package/cjs/marker/type.js.map +1 -1
  50. package/cjs/scrollbar/scrollbar.js.map +1 -1
  51. package/cjs/tag/tag.js +40 -90
  52. package/cjs/tag/tag.js.map +1 -1
  53. package/cjs/tag/type.d.ts +3 -4
  54. package/cjs/tag/type.js.map +1 -1
  55. package/cjs/title/title.js +47 -111
  56. package/cjs/title/title.js.map +1 -1
  57. package/cjs/title/type.d.ts +5 -10
  58. package/cjs/title/type.js.map +1 -1
  59. package/cjs/tooltip/tooltip.js +1 -26
  60. package/cjs/tooltip/tooltip.js.map +1 -1
  61. package/cjs/tooltip/type.d.ts +1 -3
  62. package/cjs/tooltip/type.js.map +1 -1
  63. package/dist/index.js +290 -311
  64. package/dist/index.min.js +1 -1
  65. package/es/axis/base.js +11 -23
  66. package/es/axis/base.js.map +1 -1
  67. package/es/axis/line.js +1 -1
  68. package/es/axis/line.js.map +1 -1
  69. package/es/axis/type.d.ts +3 -6
  70. package/es/axis/type.js.map +1 -1
  71. package/es/brush/index.js +2 -1
  72. package/es/checkbox/index.js +1 -2
  73. package/es/data-zoom/config.d.ts +0 -6
  74. package/es/data-zoom/config.js +0 -7
  75. package/es/data-zoom/config.js.map +1 -1
  76. package/es/data-zoom/data-zoom.d.ts +3 -2
  77. package/es/data-zoom/data-zoom.js +10 -4
  78. package/es/data-zoom/data-zoom.js.map +1 -1
  79. package/es/data-zoom/type.d.ts +6 -0
  80. package/es/data-zoom/type.js +6 -1
  81. package/es/data-zoom/type.js.map +1 -1
  82. package/es/index.d.ts +1 -1
  83. package/es/index.js +1 -1
  84. package/es/index.js.map +1 -1
  85. package/es/indicator/indicator.js +6 -50
  86. package/es/indicator/indicator.js.map +1 -1
  87. package/es/indicator/type.d.ts +2 -5
  88. package/es/indicator/type.js.map +1 -1
  89. package/es/label/animate/animate.d.ts +8 -2
  90. package/es/label/animate/animate.js +35 -0
  91. package/es/label/animate/animate.js.map +1 -1
  92. package/es/label/arc.d.ts +3 -4
  93. package/es/label/arc.js.map +1 -1
  94. package/es/label/area.d.ts +15 -0
  95. package/es/label/area.js +39 -0
  96. package/es/label/area.js.map +1 -0
  97. package/es/label/base.d.ts +17 -14
  98. package/es/label/base.js +40 -63
  99. package/es/label/base.js.map +1 -1
  100. package/es/label/dataLabel.js +11 -4
  101. package/es/label/dataLabel.js.map +1 -1
  102. package/es/label/line.d.ts +1 -1
  103. package/es/label/line.js +3 -8
  104. package/es/label/line.js.map +1 -1
  105. package/es/label/type.d.ts +26 -10
  106. package/es/label/type.js +1 -2
  107. package/es/label/type.js.map +1 -1
  108. package/es/label/util.d.ts +4 -0
  109. package/es/label/util.js +13 -1
  110. package/es/label/util.js.map +1 -1
  111. package/es/link-path/type.js +1 -1
  112. package/es/marker/point.d.ts +1 -1
  113. package/es/marker/type.js.map +1 -1
  114. package/es/scrollbar/scrollbar.js.map +1 -1
  115. package/es/tag/tag.js +38 -88
  116. package/es/tag/tag.js.map +1 -1
  117. package/es/tag/type.d.ts +3 -4
  118. package/es/tag/type.js.map +1 -1
  119. package/es/title/title.js +45 -111
  120. package/es/title/title.js.map +1 -1
  121. package/es/title/type.d.ts +5 -10
  122. package/es/title/type.js.map +1 -1
  123. package/es/tooltip/tooltip.js +1 -26
  124. package/es/tooltip/tooltip.js.map +1 -1
  125. package/es/tooltip/type.d.ts +1 -3
  126. package/es/tooltip/type.js.map +1 -1
  127. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -20982,8 +20982,8 @@
20982
20982
  this.name = 'tag';
20983
20983
  }
20984
20984
  render() {
20985
- var _a, _b, _c;
20986
- const { text = '', textStyle = {}, shape = {}, panel = {}, space = 4, minWidth, maxWidth, padding = 4, visible, state, type = 'text' } = this.attribute;
20985
+ var _a;
20986
+ const { text = '', textStyle = {}, shape = {}, panel = {}, space = 4, minWidth, maxWidth, padding = 4, visible, state } = this.attribute;
20987
20987
  const parsedPadding = vutils.normalizePadding(padding);
20988
20988
  const group = this.createOrUpdateChild('tag-content', { x: 0, y: 0, zIndex: 1 }, 'group');
20989
20989
  let symbol;
@@ -21005,100 +21005,75 @@
21005
21005
  }
21006
21006
  tagWidth += symbolPlaceWidth;
21007
21007
  textX += symbolPlaceWidth;
21008
- let textShape;
21009
- if (type === 'rich') {
21010
- const richTextAttrs = Object.assign(Object.assign({ textConfig: text, visible: vutils.isValid(text) && visible !== false }, textStyle), { x: textX, y: 0, width: (_a = textStyle.width) !== null && _a !== void 0 ? _a : 0, height: (_b = textStyle.height) !== null && _b !== void 0 ? _b : 0 });
21011
- textShape = group.createOrUpdateChild('tag-text', richTextAttrs, 'richtext');
21012
- const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
21013
- if (visible && vutils.isBoolean(bgVisible)) {
21014
- const bgRect = this.createOrUpdateChild('tag-panel', Object.assign(Object.assign({}, backgroundStyle), { visible: bgVisible && !!text, x: textShape.AABBBounds.x1, y: textShape.AABBBounds.y1, width: textShape.AABBBounds.width(), height: textShape.AABBBounds.height() }), 'rect');
21015
- if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
21016
- bgRect.states = state.panel;
21017
- }
21008
+ const textAttrs = Object.assign(Object.assign({ text, visible: vutils.isValid(text) && visible !== false, lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize }, textStyle), { x: textX, y: 0 });
21009
+ if (vutils.isNil(textAttrs.lineHeight)) {
21010
+ textAttrs.lineHeight = textAttrs.fontSize;
21011
+ }
21012
+ const textShape = group.createOrUpdateChild('tag-text', textAttrs, 'text');
21013
+ if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.text)) {
21014
+ textShape.states = state.text;
21015
+ }
21016
+ const textBounds = measureTextSize(textAttrs.text, textStyle);
21017
+ const textWidth = textBounds.width;
21018
+ const textHeight = textBounds.height;
21019
+ tagWidth += textWidth;
21020
+ const size = (_a = shape.size) !== null && _a !== void 0 ? _a : 10;
21021
+ const maxSize = vutils.isNumber(size) ? size : Math.max(size[0], size[1]);
21022
+ tagHeight += Math.max(textHeight, (shape === null || shape === void 0 ? void 0 : shape.visible) ? maxSize : 0);
21023
+ const { textAlign, textBaseline } = textStyle;
21024
+ if (vutils.isValid(minWidth) || vutils.isValid(maxWidth)) {
21025
+ if (vutils.isValid(minWidth) && tagWidth < minWidth) {
21026
+ tagWidth = minWidth;
21027
+ }
21028
+ if (vutils.isValid(maxWidth) && tagWidth > maxWidth) {
21029
+ tagWidth = maxWidth;
21030
+ textShape.setAttribute('maxLineWidth', maxWidth - parsedPadding[1] - parsedPadding[2]);
21031
+ }
21032
+ }
21033
+ let x = 0;
21034
+ let y = 0;
21035
+ if (textAlign === 'center') {
21036
+ x -= tagWidth / 2;
21037
+ if (symbol) {
21038
+ symbol.setAttribute('x', (symbol.attribute.x || 0) - textWidth / 2);
21018
21039
  }
21040
+ group.setAttribute('x', -symbolPlaceWidth / 2);
21019
21041
  }
21020
- else if (type === 'html') {
21021
- const richTextAttrs = Object.assign(Object.assign({ textConfig: [], visible: vutils.isValid(text) && visible !== false, html: Object.assign({ dom: text, container: '', width: 30, height: 30, style: {} }, textStyle) }, textStyle), { x: textX, y: 0 });
21022
- textShape = group.createOrUpdateChild('tag-text', richTextAttrs, 'richtext');
21023
- const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
21024
- if (visible && vutils.isBoolean(bgVisible)) {
21025
- const bgRect = this.createOrUpdateChild('tag-panel', Object.assign(Object.assign({}, backgroundStyle), { visible: bgVisible && !!text, x: textShape.AABBBounds.x1, y: textShape.AABBBounds.y1, width: textShape.AABBBounds.width(), height: textShape.AABBBounds.height() }), 'rect');
21026
- if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
21027
- bgRect.states = state.panel;
21028
- }
21042
+ else if (textAlign === 'right' || textAlign === 'end') {
21043
+ x -= tagWidth;
21044
+ if (symbol) {
21045
+ symbol.setAttribute('x', (symbol.attribute.x || 0) - textWidth);
21029
21046
  }
21047
+ group.setAttribute('x', -parsedPadding[1] - symbolPlaceWidth);
21030
21048
  }
21031
- else {
21032
- const textAttrs = Object.assign(Object.assign({ text: text, visible: vutils.isValid(text) && visible !== false, lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize }, textStyle), { x: textX, y: 0 });
21033
- if (vutils.isNil(textAttrs.lineHeight)) {
21034
- textAttrs.lineHeight = textStyle.fontSize;
21035
- }
21036
- textShape = group.createOrUpdateChild('tag-text', textAttrs, 'text');
21037
- if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.text)) {
21038
- textShape.states = state.text;
21039
- }
21040
- const textBounds = measureTextSize(textAttrs.text, textStyle);
21041
- const textWidth = textBounds.width;
21042
- const textHeight = textBounds.height;
21043
- tagWidth += textWidth;
21044
- const size = (_c = shape.size) !== null && _c !== void 0 ? _c : 10;
21045
- const maxSize = vutils.isNumber(size) ? size : Math.max(size[0], size[1]);
21046
- tagHeight += Math.max(textHeight, (shape === null || shape === void 0 ? void 0 : shape.visible) ? maxSize : 0);
21047
- const { textAlign, textBaseline } = textStyle;
21048
- if (vutils.isValid(minWidth) || vutils.isValid(maxWidth)) {
21049
- if (vutils.isValid(minWidth) && tagWidth < minWidth) {
21050
- tagWidth = minWidth;
21051
- }
21052
- if (vutils.isValid(maxWidth) && tagWidth > maxWidth) {
21053
- tagWidth = maxWidth;
21054
- textShape.setAttribute('maxLineWidth', maxWidth - parsedPadding[1] - parsedPadding[2]);
21055
- }
21056
- }
21057
- let x = 0;
21058
- let y = 0;
21059
- if (textAlign === 'center') {
21060
- x -= tagWidth / 2;
21061
- if (symbol) {
21062
- symbol.setAttribute('x', (symbol.attribute.x || 0) - textWidth / 2);
21063
- }
21064
- group.setAttribute('x', -symbolPlaceWidth / 2);
21065
- }
21066
- else if (textAlign === 'right' || textAlign === 'end') {
21067
- x -= tagWidth;
21068
- if (symbol) {
21069
- symbol.setAttribute('x', (symbol.attribute.x || 0) - textWidth);
21070
- }
21071
- group.setAttribute('x', -parsedPadding[1] - symbolPlaceWidth);
21072
- }
21073
- else if (textAlign === 'left' || textAlign === 'start') {
21074
- group.setAttribute('x', parsedPadding[3]);
21075
- }
21076
- if (textBaseline === 'middle') {
21077
- y -= tagHeight / 2;
21078
- if (symbol) {
21079
- symbol.setAttribute('y', 0);
21080
- }
21049
+ else if (textAlign === 'left' || textAlign === 'start') {
21050
+ group.setAttribute('x', parsedPadding[3]);
21051
+ }
21052
+ if (textBaseline === 'middle') {
21053
+ y -= tagHeight / 2;
21054
+ if (symbol) {
21055
+ symbol.setAttribute('y', 0);
21081
21056
  }
21082
- else if (textBaseline === 'bottom') {
21083
- y -= tagHeight;
21084
- if (symbol) {
21085
- symbol.setAttribute('y', -textHeight / 2);
21086
- }
21087
- group.setAttribute('y', -parsedPadding[2]);
21057
+ }
21058
+ else if (textBaseline === 'bottom') {
21059
+ y -= tagHeight;
21060
+ if (symbol) {
21061
+ symbol.setAttribute('y', -textHeight / 2);
21088
21062
  }
21089
- else if (textBaseline === 'top') {
21090
- group.setAttribute('y', parsedPadding[0]);
21091
- if (symbol) {
21092
- symbol.setAttribute('y', textHeight / 2);
21093
- }
21063
+ group.setAttribute('y', -parsedPadding[2]);
21064
+ }
21065
+ else if (textBaseline === 'top') {
21066
+ group.setAttribute('y', parsedPadding[0]);
21067
+ if (symbol) {
21068
+ symbol.setAttribute('y', textHeight / 2);
21094
21069
  }
21095
- const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
21096
- if (visible && vutils.isBoolean(bgVisible)) {
21097
- const bgRect = this.createOrUpdateChild('tag-panel', Object.assign(Object.assign({}, backgroundStyle), { visible: bgVisible && !!text, x,
21098
- y, width: tagWidth, height: tagHeight }), 'rect');
21099
- if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
21100
- bgRect.states = state.panel;
21101
- }
21070
+ }
21071
+ const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
21072
+ if (visible && vutils.isBoolean(bgVisible)) {
21073
+ const bgRect = this.createOrUpdateChild('tag-panel', Object.assign(Object.assign({}, backgroundStyle), { visible: bgVisible && !!text, x,
21074
+ y, width: tagWidth, height: tagHeight }), 'rect');
21075
+ if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
21076
+ bgRect.states = state.panel;
21102
21077
  }
21103
21078
  }
21104
21079
  }
@@ -21970,6 +21945,45 @@
21970
21945
  var _a, _b;
21971
21946
  return (_b = (_a = animationEffects[type]) === null || _a === void 0 ? void 0 : _a.call(animationEffects, textAttribute)) !== null && _b !== void 0 ? _b : { from: {}, to: {} };
21972
21947
  }
21948
+ function updateAnimation(prev, next, animationConfig) {
21949
+ if (!vutils.isArray(animationConfig)) {
21950
+ const { duration, easing, increaseEffect = true } = animationConfig;
21951
+ prev.animate().to(next.attribute, duration, easing);
21952
+ increaseEffect && playIncreaseCount(prev, next, duration, easing);
21953
+ return;
21954
+ }
21955
+ animationConfig.forEach((cfg, i) => {
21956
+ const { duration, easing, increaseEffect = true, channel } = cfg;
21957
+ const { from, to } = update(prev, next, channel, cfg.options);
21958
+ if (!vutils.isEmpty(to)) {
21959
+ prev.animate().to(to, duration, easing);
21960
+ }
21961
+ if ('text' in from && 'text' in to && increaseEffect) {
21962
+ playIncreaseCount(prev, next, duration, easing);
21963
+ }
21964
+ });
21965
+ }
21966
+ const update = (prev, next, channel, options) => {
21967
+ const from = Object.assign({}, prev.attribute);
21968
+ const to = Object.assign({}, next.attribute);
21969
+ vutils.array(options === null || options === void 0 ? void 0 : options.excludeChannels).forEach(key => {
21970
+ delete to[key];
21971
+ });
21972
+ Object.keys(to).forEach(key => {
21973
+ if (channel && !channel.includes(key)) {
21974
+ delete to[key];
21975
+ }
21976
+ });
21977
+ return { from, to };
21978
+ };
21979
+ function playIncreaseCount(prev, next, duration, easing) {
21980
+ if (prev.attribute.text !== next.attribute.text &&
21981
+ vutils.isValidNumber(Number(prev.attribute.text) * Number(next.attribute.text))) {
21982
+ prev
21983
+ .animate()
21984
+ .play(new IncreaseCount({ text: prev.attribute.text }, { text: next.attribute.text }, duration, easing));
21985
+ }
21986
+ }
21973
21987
  const DefaultLabelAnimation = {
21974
21988
  mode: 'same-time',
21975
21989
  duration: 300,
@@ -22163,6 +22177,24 @@
22163
22177
  }
22164
22178
  return points;
22165
22179
  };
22180
+ function labelingLineOrArea(textBounds, graphicBounds, position = 'end', offset = 0) {
22181
+ if (!textBounds || !graphicBounds) {
22182
+ return;
22183
+ }
22184
+ const { x1, x2 } = textBounds;
22185
+ const width = Math.abs(x2 - x1);
22186
+ const anchorX = graphicBounds.x1;
22187
+ const anchorY = graphicBounds.y1;
22188
+ let x = anchorX;
22189
+ const y = anchorY;
22190
+ if (position === 'end') {
22191
+ x = anchorX + width / 2 + offset;
22192
+ }
22193
+ else if (position === 'start') {
22194
+ x = anchorX - width / 2 - offset;
22195
+ }
22196
+ return { x, y };
22197
+ }
22166
22198
 
22167
22199
  class LabelBase extends AbstractComponent {
22168
22200
  setBitmap(bitmap) {
@@ -22310,31 +22342,13 @@
22310
22342
  target.states = state;
22311
22343
  }
22312
22344
  _createLabelText(attributes) {
22313
- var _a, _b;
22314
- if (attributes.type === 'rich') {
22315
- attributes.textConfig = attributes.text;
22316
- attributes.width = (_a = attributes.width) !== null && _a !== void 0 ? _a : 0;
22317
- attributes.height = (_b = attributes.height) !== null && _b !== void 0 ? _b : 0;
22318
- const text = createRichText(attributes);
22319
- this._bindEvent(text);
22320
- this._setStatesOfText(text);
22321
- return text;
22322
- }
22323
- else if (attributes.type === 'html') {
22324
- attributes.textConfig = [];
22325
- attributes.html = Object.assign({ dom: attributes.text, container: '', width: 30, height: 30, style: {} }, attributes);
22326
- const text = createRichText(attributes);
22327
- this._bindEvent(text);
22328
- this._setStatesOfText(text);
22329
- return text;
22330
- }
22331
22345
  const text = createText(attributes);
22332
22346
  this._bindEvent(text);
22333
22347
  this._setStatesOfText(text);
22334
22348
  return text;
22335
22349
  }
22336
22350
  _prepare() {
22337
- var _a, _b, _c, _d;
22351
+ var _a, _b, _c, _d, _e;
22338
22352
  const currentBaseMarks = [];
22339
22353
  let baseMarks;
22340
22354
  if (vutils.isFunction(this.attribute.getBaseMarks)) {
@@ -22351,7 +22365,7 @@
22351
22365
  (_a = this._idToGraphic) === null || _a === void 0 ? void 0 : _a.clear();
22352
22366
  (_b = this._idToPoint) === null || _b === void 0 ? void 0 : _b.clear();
22353
22367
  this._baseMarks = currentBaseMarks;
22354
- this._isCollectionBase = ((_c = currentBaseMarks === null || currentBaseMarks === void 0 ? void 0 : currentBaseMarks[0]) === null || _c === void 0 ? void 0 : _c.type) === 'line' || ((_d = currentBaseMarks === null || currentBaseMarks === void 0 ? void 0 : currentBaseMarks[0]) === null || _d === void 0 ? void 0 : _d.type) === 'area';
22368
+ this._isCollectionBase = this.attribute.type === 'line-data';
22355
22369
  if (!currentBaseMarks || currentBaseMarks.length === 0) {
22356
22370
  return;
22357
22371
  }
@@ -22397,6 +22411,15 @@
22397
22411
  }
22398
22412
  }
22399
22413
  }
22414
+ if (this.attribute.animation !== false) {
22415
+ this._animationConfig = {
22416
+ enter: vutils.merge({}, DefaultLabelAnimation, this.attribute.animation, (_c = this.attribute.animationEnter) !== null && _c !== void 0 ? _c : {}),
22417
+ exit: vutils.merge({}, DefaultLabelAnimation, this.attribute.animation, (_d = this.attribute.animationExit) !== null && _d !== void 0 ? _d : {}),
22418
+ update: vutils.isArray(this.attribute.animationUpdate)
22419
+ ? this.attribute.animationUpdate
22420
+ : vutils.merge({}, DefaultLabelAnimation, this.attribute.animation, (_e = this.attribute.animationUpdate) !== null && _e !== void 0 ? _e : {})
22421
+ };
22422
+ }
22400
22423
  }
22401
22424
  getRelatedGrphic(item) {
22402
22425
  return this._idToGraphic.get(item.id);
@@ -22544,17 +22567,11 @@
22544
22567
  }
22545
22568
  }
22546
22569
  _renderWithAnimation(labels) {
22547
- var _a, _b, _c, _d, _e;
22548
- const animationConfig = ((_a = this.attribute.animation) !== null && _a !== void 0 ? _a : {});
22549
- const mode = (_b = animationConfig.mode) !== null && _b !== void 0 ? _b : DefaultLabelAnimation.mode;
22550
- const duration = (_c = animationConfig.duration) !== null && _c !== void 0 ? _c : DefaultLabelAnimation.duration;
22551
- const easing = (_d = animationConfig.easing) !== null && _d !== void 0 ? _d : DefaultLabelAnimation.easing;
22552
- const delay = (_e = animationConfig.delay) !== null && _e !== void 0 ? _e : 0;
22553
22570
  const currentTextMap = new Map();
22554
22571
  const prevTextMap = this._graphicToText || new Map();
22555
22572
  const texts = [];
22556
22573
  labels.forEach((text, index) => {
22557
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
22574
+ var _a, _b, _c, _d, _e, _f, _g;
22558
22575
  const labelLine = this._labelLine(text);
22559
22576
  const relatedGraphic = this.getRelatedGrphic(text.attribute);
22560
22577
  const textId = text.attribute.id;
@@ -22573,13 +22590,7 @@
22573
22590
  this._syncStateWithRelatedGraphic(relatedGraphic);
22574
22591
  relatedGraphic.once('animate-bind', a => {
22575
22592
  text.setAttributes(from);
22576
- const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, {
22577
- mode,
22578
- duration,
22579
- easing,
22580
- to,
22581
- delay
22582
- });
22593
+ const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, to, this._animationConfig.enter);
22583
22594
  relatedGraphic.on('afterAttributeUpdate', listener);
22584
22595
  });
22585
22596
  }
@@ -22589,25 +22600,19 @@
22589
22600
  prevTextMap.delete(textKey);
22590
22601
  currentTextMap.set(textKey, prevLabel);
22591
22602
  const prevText = prevLabel.text;
22592
- prevText.animate().to(text.attribute, duration, easing);
22603
+ const { duration, easing } = this._animationConfig.update;
22604
+ updateAnimation(prevText, text, this._animationConfig.update);
22593
22605
  if (prevLabel.labelLine) {
22594
22606
  prevLabel.labelLine.animate().to(vutils.merge({}, prevLabel.labelLine.attribute, {
22595
22607
  visible: (_f = (_d = (((_b = (_a = text.attribute) === null || _a === void 0 ? void 0 : _a.line) === null || _b === void 0 ? void 0 : _b.visible) && ((_c = text.attribute) === null || _c === void 0 ? void 0 : _c.visible))) !== null && _d !== void 0 ? _d : (_e = text.attribute) === null || _e === void 0 ? void 0 : _e.visible) !== null && _f !== void 0 ? _f : true,
22596
22608
  points: (_g = text.attribute) === null || _g === void 0 ? void 0 : _g.points
22597
22609
  }), duration, easing);
22598
22610
  }
22599
- if (animationConfig.increaseEffect !== false &&
22600
- ((_h = prevText.attribute) === null || _h === void 0 ? void 0 : _h.text) !== ((_j = text.attribute) === null || _j === void 0 ? void 0 : _j.text) &&
22601
- vutils.isValidNumber(Number((_k = prevText.attribute) === null || _k === void 0 ? void 0 : _k.text) * Number((_l = text.attribute) === null || _l === void 0 ? void 0 : _l.text))) {
22602
- prevText
22603
- .animate()
22604
- .play(new IncreaseCount({ text: (_m = prevText.attribute) === null || _m === void 0 ? void 0 : _m.text }, { text: (_o = text.attribute) === null || _o === void 0 ? void 0 : _o.text }, duration, easing));
22605
- }
22606
22611
  }
22607
22612
  });
22608
22613
  prevTextMap.forEach(label => {
22609
22614
  var _a;
22610
- (_a = label.text) === null || _a === void 0 ? void 0 : _a.animate().to(getAnimationAttributes(label.text.attribute, 'fadeOut').to, duration, easing).onEnd(() => {
22615
+ (_a = label.text) === null || _a === void 0 ? void 0 : _a.animate().to(getAnimationAttributes(label.text.attribute, 'fadeOut').to, this._animationConfig.exit.duration, this._animationConfig.exit.easing).onEnd(() => {
22611
22616
  this.removeChild(label.text);
22612
22617
  if (label === null || label === void 0 ? void 0 : label.labelLine) {
22613
22618
  this.removeChild(label.labelLine);
@@ -22656,7 +22661,7 @@
22656
22661
  relatedGraphic.on('afterAttributeUpdate', this._handleRelatedGraphicSetState);
22657
22662
  }
22658
22663
  }
22659
- _afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, { mode, duration, easing, to, delay }) {
22664
+ _afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, to, { mode, duration, easing, delay }) {
22660
22665
  const listener = (event) => {
22661
22666
  var _a, _b;
22662
22667
  const { detail } = event;
@@ -22674,7 +22679,7 @@
22674
22679
  text.setAttributes(to);
22675
22680
  return;
22676
22681
  }
22677
- const onEnd = () => {
22682
+ const onStart = () => {
22678
22683
  if (relatedGraphic) {
22679
22684
  relatedGraphic.onAnimateBind = undefined;
22680
22685
  relatedGraphic.removeEventListener('afterAttributeUpdate', listener);
@@ -22683,14 +22688,14 @@
22683
22688
  switch (mode) {
22684
22689
  case 'after':
22685
22690
  if (detail.animationState.end) {
22686
- text.animate({ onEnd }).wait(delay).to(to, duration, easing);
22691
+ text.animate({ onStart }).wait(delay).to(to, duration, easing);
22687
22692
  }
22688
22693
  break;
22689
22694
  case 'after-all':
22690
22695
  if (index === texts.length - 1) {
22691
22696
  if (detail.animationState.end) {
22692
22697
  texts.forEach(t => {
22693
- t.animate({ onEnd }).wait(delay).to(to, duration, easing);
22698
+ t.animate({ onStart }).wait(delay).to(to, duration, easing);
22694
22699
  });
22695
22700
  }
22696
22701
  }
@@ -22701,12 +22706,12 @@
22701
22706
  const point = this._idToPoint.get(text.attribute.id);
22702
22707
  if (point &&
22703
22708
  (!text.animates || !text.animates.has('label-animate')) &&
22704
- this._baseMarks[0].containsPoint(point.x, point.y, IContainPointMode.LOCAL, (_b = this.stage) === null || _b === void 0 ? void 0 : _b.pickerService)) {
22705
- text.animate({ onEnd }).wait(delay).to(to, duration, easing);
22709
+ relatedGraphic.containsPoint(point.x, point.y, IContainPointMode.LOCAL, (_b = this.stage) === null || _b === void 0 ? void 0 : _b.pickerService)) {
22710
+ text.animate({ onStart }).wait(delay).to(to, duration, easing);
22706
22711
  }
22707
22712
  }
22708
22713
  else if (detail.animationState.isFirstFrameOfStep) {
22709
- text.animate({ onEnd }).wait(delay).to(to, duration, easing);
22714
+ text.animate({ onStart }).wait(delay).to(to, duration, easing);
22710
22715
  }
22711
22716
  break;
22712
22717
  }
@@ -22940,22 +22945,7 @@
22940
22945
  };
22941
22946
  }
22942
22947
  labeling(textBounds, graphicBounds, position = 'end', offset = 0) {
22943
- if (!textBounds || !graphicBounds) {
22944
- return;
22945
- }
22946
- const { x1, x2 } = textBounds;
22947
- const width = Math.abs(x2 - x1);
22948
- const anchorX = graphicBounds.x1;
22949
- const anchorY = graphicBounds.y1;
22950
- let x = anchorX;
22951
- const y = anchorY;
22952
- if (position === 'end') {
22953
- x = anchorX + width / 2 + offset;
22954
- }
22955
- else if (position === 'start') {
22956
- x = anchorX - width / 2 - offset;
22957
- }
22958
- return { x, y };
22948
+ return labelingLineOrArea(textBounds, graphicBounds, position, offset);
22959
22949
  }
22960
22950
  }
22961
22951
  LineLabel.defaultAttributes = {
@@ -23717,10 +23707,49 @@
23717
23707
  pickable: false
23718
23708
  };
23719
23709
 
23710
+ class AreaLabel extends LabelBase {
23711
+ constructor(attributes) {
23712
+ super(vutils.merge({}, AreaLabel.defaultAttributes, attributes));
23713
+ this.name = 'line-label';
23714
+ }
23715
+ getGraphicBounds(graphic, point = {}) {
23716
+ var _a;
23717
+ if (graphic.type !== 'area') {
23718
+ return super.getGraphicBounds(graphic, point);
23719
+ }
23720
+ const { position = 'end' } = this.attribute;
23721
+ const points = ((_a = graphic === null || graphic === void 0 ? void 0 : graphic.attribute) === null || _a === void 0 ? void 0 : _a.points) || [point];
23722
+ const index = position === 'start' ? 0 : points.length - 1;
23723
+ return {
23724
+ x1: points[index].x,
23725
+ x2: points[index].x,
23726
+ y1: points[index].y,
23727
+ y2: points[index].y
23728
+ };
23729
+ }
23730
+ labeling(textBounds, graphicBounds, position = 'end', offset = 0) {
23731
+ return labelingLineOrArea(textBounds, graphicBounds, position, offset);
23732
+ }
23733
+ }
23734
+ AreaLabel.defaultAttributes = {
23735
+ textStyle: {
23736
+ fontSize: 12,
23737
+ fill: '#000',
23738
+ textAlign: 'center',
23739
+ textBaseline: 'middle',
23740
+ boundsPadding: [-1, 0, -1, 0]
23741
+ },
23742
+ position: 'end',
23743
+ offset: 6,
23744
+ pickable: false
23745
+ };
23746
+
23720
23747
  const labelComponentMap = {
23721
23748
  rect: RectLabel,
23722
23749
  symbol: SymbolLabel,
23723
23750
  arc: ArcLabel,
23751
+ line: LineLabel,
23752
+ area: AreaLabel,
23724
23753
  'line-data': LineDataLabel
23725
23754
  };
23726
23755
  class DataLabel extends AbstractComponent {
@@ -23729,6 +23758,7 @@
23729
23758
  this.name = 'data-label';
23730
23759
  }
23731
23760
  render() {
23761
+ var _a;
23732
23762
  const { dataLabels, size } = this.attribute;
23733
23763
  if (!dataLabels || dataLabels.length === 0) {
23734
23764
  return;
@@ -23748,20 +23778,21 @@
23748
23778
  const dataLabel = dataLabels[i];
23749
23779
  const labelComponent = labelComponentMap[dataLabel.type] || LabelBase;
23750
23780
  if (labelComponent) {
23751
- const { baseMarkGroupName } = dataLabel;
23752
- let component = this._componentMap.get(baseMarkGroupName);
23781
+ const { baseMarkGroupName, type } = dataLabel;
23782
+ const id = (_a = dataLabel.id) !== null && _a !== void 0 ? _a : `${baseMarkGroupName}-${type}-${i}`;
23783
+ let component = this._componentMap.get(id);
23753
23784
  if (component) {
23754
23785
  component.setBitmapTool(tool);
23755
23786
  component.setBitmap(bitmap);
23756
23787
  component.setAttributes(dataLabel);
23757
- currentComponentMap.set(baseMarkGroupName, component);
23788
+ currentComponentMap.set(id, component);
23758
23789
  }
23759
23790
  else {
23760
23791
  component = new labelComponent(dataLabel);
23761
23792
  component.setBitmap(bitmap);
23762
23793
  component.setBitmapTool(tool);
23763
23794
  this.add(component);
23764
- currentComponentMap.set(baseMarkGroupName, component);
23795
+ currentComponentMap.set(id, component);
23765
23796
  }
23766
23797
  }
23767
23798
  }
@@ -24273,26 +24304,12 @@
24273
24304
  let textAlign = 'center';
24274
24305
  let textBaseline = 'middle';
24275
24306
  data.forEach((item, index) => {
24276
- var _a, _b, _c, _d;
24307
+ var _a, _b;
24277
24308
  const labelStyle = this._getLabelAttribute(item, index, data, layer);
24278
- let text;
24279
- if ((labelStyle === null || labelStyle === void 0 ? void 0 : labelStyle.type) === 'rich') {
24280
- labelStyle.textConfig = labelStyle.text;
24281
- labelStyle.width = (_a = labelStyle.width) !== null && _a !== void 0 ? _a : 0;
24282
- labelStyle.height = (_b = labelStyle.height) !== null && _b !== void 0 ? _b : 0;
24283
- text = createRichText(labelStyle);
24284
- }
24285
- else if ((labelStyle === null || labelStyle === void 0 ? void 0 : labelStyle.type) === 'html') {
24286
- labelStyle.textConfig = [];
24287
- labelStyle.html = Object.assign({ dom: labelStyle.text, container: '', width: 30, height: 30, style: {} }, labelStyle);
24288
- text = createRichText(labelStyle);
24289
- }
24290
- else {
24291
- text = createText(labelStyle);
24292
- }
24309
+ const text = createText(labelStyle);
24293
24310
  text.name = exports.AXIS_ELEMENT_NAME.label;
24294
24311
  text.id = this._getNodeId(`layer${layer}-label-${item.id}`);
24295
- if (vutils.isEmpty((_c = this.attribute.label) === null || _c === void 0 ? void 0 : _c.state)) {
24312
+ if (vutils.isEmpty((_a = this.attribute.label) === null || _a === void 0 ? void 0 : _a.state)) {
24296
24313
  text.states = DEFAULT_STATES$2;
24297
24314
  }
24298
24315
  else {
@@ -24305,7 +24322,7 @@
24305
24322
  text.states = labelState;
24306
24323
  }
24307
24324
  labelGroup.add(text);
24308
- const angle = (_d = labelStyle.angle) !== null && _d !== void 0 ? _d : 0;
24325
+ const angle = (_b = labelStyle.angle) !== null && _b !== void 0 ? _b : 0;
24309
24326
  maxTextWidth = Math.max(maxTextWidth, text.AABBBounds.width());
24310
24327
  maxTextHeight = Math.max(maxTextHeight, text.AABBBounds.height());
24311
24328
  if (angle) {
@@ -24454,7 +24471,7 @@
24454
24471
  }
24455
24472
  _getLabelAttribute(tickDatum, index, tickData, layer) {
24456
24473
  var _a, _b, _c, _d, _e, _f;
24457
- const _g = this.attribute.label, { space = 4, inside = false, formatMethod, type = 'text', text } = _g, tagAttributes = __rest(_g, ["space", "inside", "formatMethod", "type", "text"]);
24474
+ const _g = this.attribute.label, { space = 4, inside = false, formatMethod } = _g, tagAttributes = __rest(_g, ["space", "inside", "formatMethod"]);
24458
24475
  let offset = space;
24459
24476
  let tickLength = 0;
24460
24477
  if (((_a = this.attribute.tick) === null || _a === void 0 ? void 0 : _a.visible) && ((_b = this.attribute.tick) === null || _b === void 0 ? void 0 : _b.inside) === inside) {
@@ -24475,9 +24492,7 @@
24475
24492
  }
24476
24493
  const point = this.getVerticalCoord(tickDatum.point, offset, inside);
24477
24494
  const vector = this.getVerticalVector(offset, inside, point);
24478
- const textContent = formatMethod
24479
- ? formatMethod(`${tickDatum.label}`, tickDatum, index, tickData, layer)
24480
- : tickDatum.label;
24495
+ const text = formatMethod ? formatMethod(`${tickDatum.label}`, tickDatum, index, tickData, layer) : tickDatum.label;
24481
24496
  let { style: textStyle } = tagAttributes;
24482
24497
  textStyle = vutils.isFunction(textStyle)
24483
24498
  ? vutils.merge({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer))
@@ -24492,7 +24507,7 @@
24492
24507
  layer
24493
24508
  });
24494
24509
  }
24495
- return Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), { text: text !== null && text !== void 0 ? text : textContent, lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize, type }), textStyle);
24510
+ return Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, text, textStyle)), { text, lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize }), textStyle);
24496
24511
  }
24497
24512
  getLabelPosition(point, vector, text, style) {
24498
24513
  return point;
@@ -25230,7 +25245,7 @@
25230
25245
  let titleSpacing = 0;
25231
25246
  const axisLineWidth = (line === null || line === void 0 ? void 0 : line.visible) ? (_b = line.style.lineWidth) !== null && _b !== void 0 ? _b : 1 : 0;
25232
25247
  const tickLength = (tick === null || tick === void 0 ? void 0 : tick.visible) ? (_c = tick.length) !== null && _c !== void 0 ? _c : 4 : 0;
25233
- if ((title === null || title === void 0 ? void 0 : title.visible) && typeof title.text === 'string') {
25248
+ if (title === null || title === void 0 ? void 0 : title.visible) {
25234
25249
  titleHeight = measureTextSize(title.text, title.textStyle).height;
25235
25250
  const padding = vutils.normalizePadding(title.padding);
25236
25251
  titleSpacing = title.space + padding[0] + padding[2];
@@ -26025,13 +26040,6 @@
26025
26040
  }
26026
26041
  vutils.mixin(CircleAxisGrid, CircleAxisMixin);
26027
26042
 
26028
- var DataZoomActiveTag;
26029
- (function (DataZoomActiveTag) {
26030
- DataZoomActiveTag["startHandler"] = "startHandler";
26031
- DataZoomActiveTag["endHandler"] = "endHandler";
26032
- DataZoomActiveTag["middleHandler"] = "middleHandler";
26033
- DataZoomActiveTag["background"] = "background";
26034
- })(DataZoomActiveTag || (DataZoomActiveTag = {}));
26035
26043
  const DEFAULT_DATA_ZOOM_ATTRIBUTES = {
26036
26044
  orient: 'bottom',
26037
26045
  showDetail: 'auto',
@@ -26130,6 +26138,14 @@
26130
26138
  }
26131
26139
  };
26132
26140
 
26141
+ exports.DataZoomActiveTag = void 0;
26142
+ (function (DataZoomActiveTag) {
26143
+ DataZoomActiveTag["startHandler"] = "startHandler";
26144
+ DataZoomActiveTag["endHandler"] = "endHandler";
26145
+ DataZoomActiveTag["middleHandler"] = "middleHandler";
26146
+ DataZoomActiveTag["background"] = "background";
26147
+ })(exports.DataZoomActiveTag || (exports.DataZoomActiveTag = {}));
26148
+
26133
26149
  const delayMap$1 = {
26134
26150
  debounce: vutils.debounce,
26135
26151
  throttle: vutils.throttle
@@ -26157,23 +26173,23 @@
26157
26173
  this._onHandlerPointerDown = (e, tag) => {
26158
26174
  e.stopPropagation();
26159
26175
  if (tag === 'start') {
26160
- this._activeTag = DataZoomActiveTag.startHandler;
26176
+ this._activeTag = exports.DataZoomActiveTag.startHandler;
26161
26177
  this._activeItem = this._startHandler;
26162
26178
  }
26163
26179
  else if (tag === 'end') {
26164
- this._activeTag = DataZoomActiveTag.endHandler;
26180
+ this._activeTag = exports.DataZoomActiveTag.endHandler;
26165
26181
  this._activeItem = this._endHandler;
26166
26182
  }
26167
26183
  else if (tag === 'middleRect') {
26168
- this._activeTag = DataZoomActiveTag.middleHandler;
26184
+ this._activeTag = exports.DataZoomActiveTag.middleHandler;
26169
26185
  this._activeItem = this._middleHandlerRect;
26170
26186
  }
26171
26187
  else if (tag === 'middleSymbol') {
26172
- this._activeTag = DataZoomActiveTag.middleHandler;
26188
+ this._activeTag = exports.DataZoomActiveTag.middleHandler;
26173
26189
  this._activeItem = this._middleHandlerSymbol;
26174
26190
  }
26175
26191
  else if (tag === 'background') {
26176
- this._activeTag = DataZoomActiveTag.background;
26192
+ this._activeTag = exports.DataZoomActiveTag.background;
26177
26193
  this._activeItem = this._background;
26178
26194
  }
26179
26195
  this._activeState = true;
@@ -26181,6 +26197,7 @@
26181
26197
  this._activeCache.lastPos = this.eventPosToStagePos(e);
26182
26198
  };
26183
26199
  this._onHandlerPointerMove = (e) => {
26200
+ var _a;
26184
26201
  e.stopPropagation();
26185
26202
  const { start: startAttr, end: endAttr, brushSelect, realTime = true } = this.attribute;
26186
26203
  const pos = this.eventPosToStagePos(e);
@@ -26188,24 +26205,24 @@
26188
26205
  const dis = (pos[attPos] - this._activeCache.lastPos[attPos]) / max;
26189
26206
  let { start, end } = this.state;
26190
26207
  if (this._activeState) {
26191
- if (this._activeTag === DataZoomActiveTag.middleHandler) {
26208
+ if (this._activeTag === exports.DataZoomActiveTag.middleHandler) {
26192
26209
  this.moveZoomWithMiddle((this.state.start + this.state.end) / 2 + dis);
26193
26210
  }
26194
- else if (this._activeTag === DataZoomActiveTag.startHandler) {
26211
+ else if (this._activeTag === exports.DataZoomActiveTag.startHandler) {
26195
26212
  if (start + dis > end) {
26196
26213
  start = end;
26197
26214
  end = start + dis;
26198
- this._activeTag = DataZoomActiveTag.endHandler;
26215
+ this._activeTag = exports.DataZoomActiveTag.endHandler;
26199
26216
  }
26200
26217
  else {
26201
26218
  start = start + dis;
26202
26219
  }
26203
26220
  }
26204
- else if (this._activeTag === DataZoomActiveTag.endHandler) {
26221
+ else if (this._activeTag === exports.DataZoomActiveTag.endHandler) {
26205
26222
  if (end + dis < start) {
26206
26223
  end = start;
26207
26224
  start = end + dis;
26208
- this._activeTag = DataZoomActiveTag.startHandler;
26225
+ this._activeTag = exports.DataZoomActiveTag.startHandler;
26209
26226
  }
26210
26227
  else {
26211
26228
  end = end + dis;
@@ -26218,7 +26235,7 @@
26218
26235
  end = Math.min(Math.max(end, 0), 1);
26219
26236
  if (startAttr !== start || endAttr !== end) {
26220
26237
  this.setStateAttr(start, end, true);
26221
- realTime && this._updateStateCallback && this._updateStateCallback(start, end);
26238
+ realTime && ((_a = this._updateStateCallback) === null || _a === void 0 ? void 0 : _a.call(this, start, end, this._activeTag));
26222
26239
  this._dispatchChangeEvent(start, end);
26223
26240
  }
26224
26241
  };
@@ -26323,10 +26340,11 @@
26323
26340
  };
26324
26341
  }
26325
26342
  _onHandlerPointerUp(e) {
26343
+ var _a;
26326
26344
  e.preventDefault();
26327
26345
  const { start, end, brushSelect, realTime = true } = this.attribute;
26328
26346
  if (this._activeState) {
26329
- if (this._activeTag === DataZoomActiveTag.background) {
26347
+ if (this._activeTag === exports.DataZoomActiveTag.background) {
26330
26348
  const pos = this.eventPosToStagePos(e);
26331
26349
  this.backgroundDragZoom(this._activeCache.startPos, pos);
26332
26350
  }
@@ -26335,7 +26353,7 @@
26335
26353
  brushSelect && this.renderDragMask();
26336
26354
  if (!realTime || start !== this.state.start || end !== this.state.end) {
26337
26355
  this.setStateAttr(this.state.start, this.state.end, true);
26338
- this._updateStateCallback && this._updateStateCallback(this.state.start, this.state.end);
26356
+ (_a = this._updateStateCallback) === null || _a === void 0 ? void 0 : _a.call(this, this.state.start, this.state.end, this._activeTag);
26339
26357
  this._dispatchChangeEvent(this.state.start, this.state.end);
26340
26358
  }
26341
26359
  }
@@ -26385,11 +26403,11 @@
26385
26403
  const { dragMaskStyle } = this.attribute;
26386
26404
  const { position, width, height } = this.getLayoutAttrFromConfig();
26387
26405
  if (this._isHorizontal) {
26388
- this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.x : this._activeCache.startPos.x, position.x, position.x + width), y: position.y, width: (this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
26406
+ this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.x : this._activeCache.startPos.x, position.x, position.x + width), y: position.y, width: (this._activeState && this._activeTag === exports.DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
26389
26407
  0, height }, dragMaskStyle), 'rect');
26390
26408
  }
26391
26409
  else {
26392
- this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: position.x, y: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.y : this._activeCache.startPos.y, position.y, position.y + height), width, height: (this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
26410
+ this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: position.x, y: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.y : this._activeCache.startPos.y, position.y, position.y + height), width, height: (this._activeState && this._activeTag === exports.DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
26393
26411
  0 }, dragMaskStyle), 'rect');
26394
26412
  }
26395
26413
  }
@@ -26708,13 +26726,14 @@
26708
26726
  this.dispatchEvent(changeEvent);
26709
26727
  }
26710
26728
  setStartAndEnd(start, end) {
26729
+ var _a;
26711
26730
  const { start: startAttr, end: endAttr } = this.attribute;
26712
26731
  if (vutils.isValid(start) && vutils.isValid(end) && (start !== this.state.start || end !== this.state.end)) {
26713
26732
  this.state.start = start;
26714
26733
  this.state.end = end;
26715
26734
  if (startAttr !== this.state.start || endAttr !== this.state.end) {
26716
26735
  this.setStateAttr(start, end, true);
26717
- this._updateStateCallback && this._updateStateCallback(start, end);
26736
+ (_a = this._updateStateCallback) === null || _a === void 0 ? void 0 : _a.call(this, start, end, this._activeTag);
26718
26737
  this._dispatchChangeEvent(start, end);
26719
26738
  }
26720
26739
  }
@@ -29438,27 +29457,19 @@
29438
29457
  this.name = 'title';
29439
29458
  }
29440
29459
  render() {
29441
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69;
29442
- const { textType, text, subtextType, textStyle, subtext, subtextStyle, width, height, minWidth, maxWidth, minHeight, maxHeight, align, verticalAlign, padding = 0 } = this.attribute;
29460
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37;
29461
+ const { text, textStyle, subtext, subtextStyle, width, height, minWidth, maxWidth, minHeight, maxHeight, align, verticalAlign, padding = 0 } = this.attribute;
29443
29462
  const parsedPadding = vutils.normalizePadding(padding);
29444
29463
  const group = this.createOrUpdateChild('title-container', { x: parsedPadding[3], y: parsedPadding[0], zIndex: 1 }, 'group');
29445
29464
  if (((_a = this.attribute) === null || _a === void 0 ? void 0 : _a.visible) !== false && (textStyle === null || textStyle === void 0 ? void 0 : textStyle.visible) !== false) {
29446
- if (textType === 'rich') {
29447
- const attr = Object.assign({ x: (_b = textStyle.x) !== null && _b !== void 0 ? _b : 0, y: (_c = textStyle.y) !== null && _c !== void 0 ? _c : 0, width: (_e = (_d = textStyle.width) !== null && _d !== void 0 ? _d : width) !== null && _e !== void 0 ? _e : 0, height: (_g = (_f = textStyle.height) !== null && _f !== void 0 ? _f : height) !== null && _g !== void 0 ? _g : 0, ellipsis: (_h = textStyle.ellipsis) !== null && _h !== void 0 ? _h : true, wordBreak: (_j = textStyle.wordBreak) !== null && _j !== void 0 ? _j : 'break-word', maxHeight: textStyle.maxHeight, maxWidth: textStyle.maxWidth, textConfig: text }, textStyle);
29448
- this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
29449
- }
29450
- else if (textType === 'html') {
29451
- const attr = Object.assign({ html: Object.assign({ dom: text, container: '', width: 30, height: 30, style: '' }, textStyle), x: (_k = textStyle.x) !== null && _k !== void 0 ? _k : 0, y: (_l = textStyle.y) !== null && _l !== void 0 ? _l : 0, width: (_o = (_m = textStyle.width) !== null && _m !== void 0 ? _m : width) !== null && _o !== void 0 ? _o : 0, height: (_q = (_p = textStyle.height) !== null && _p !== void 0 ? _p : height) !== null && _q !== void 0 ? _q : 0, ellipsis: (_r = textStyle.ellipsis) !== null && _r !== void 0 ? _r : true, wordBreak: (_s = textStyle.wordBreak) !== null && _s !== void 0 ? _s : 'break-word', maxHeight: textStyle.maxHeight, maxWidth: textStyle.maxWidth, textConfig: [] }, textStyle);
29452
- this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
29453
- }
29454
- else if (textStyle && vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.character)) {
29465
+ if (textStyle && vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.character)) {
29455
29466
  const attr = {
29456
- x: (_t = textStyle.x) !== null && _t !== void 0 ? _t : 0,
29457
- y: (_u = textStyle.y) !== null && _u !== void 0 ? _u : 0,
29458
- width: (_w = (_v = textStyle.width) !== null && _v !== void 0 ? _v : width) !== null && _w !== void 0 ? _w : 0,
29459
- height: (_y = (_x = textStyle.height) !== null && _x !== void 0 ? _x : height) !== null && _y !== void 0 ? _y : 0,
29460
- ellipsis: (_z = textStyle.ellipsis) !== null && _z !== void 0 ? _z : true,
29461
- wordBreak: (_0 = textStyle.wordBreak) !== null && _0 !== void 0 ? _0 : 'break-word',
29467
+ x: (_b = textStyle.x) !== null && _b !== void 0 ? _b : 0,
29468
+ y: (_c = textStyle.y) !== null && _c !== void 0 ? _c : 0,
29469
+ width: (_e = (_d = textStyle.width) !== null && _d !== void 0 ? _d : width) !== null && _e !== void 0 ? _e : 0,
29470
+ height: (_g = (_f = textStyle.height) !== null && _f !== void 0 ? _f : height) !== null && _g !== void 0 ? _g : 0,
29471
+ ellipsis: (_h = textStyle.ellipsis) !== null && _h !== void 0 ? _h : true,
29472
+ wordBreak: (_j = textStyle.wordBreak) !== null && _j !== void 0 ? _j : 'break-word',
29462
29473
  maxHeight: textStyle.maxHeight,
29463
29474
  maxWidth: textStyle.maxWidth,
29464
29475
  textConfig: textStyle.character
@@ -29466,28 +29477,20 @@
29466
29477
  this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
29467
29478
  }
29468
29479
  else if (vutils.isValid(text)) {
29469
- this._mainTitle = group.createOrUpdateChild('mainTitle', Object.assign(Object.assign({ text: [text] }, textStyle), { maxLineWidth: (_1 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.maxLineWidth) !== null && _1 !== void 0 ? _1 : width, heightLimit: textStyle === null || textStyle === void 0 ? void 0 : textStyle.heightLimit, lineClamp: textStyle === null || textStyle === void 0 ? void 0 : textStyle.lineClamp, ellipsis: (_2 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.ellipsis) !== null && _2 !== void 0 ? _2 : true, x: 0, y: 0 }), 'wrapText');
29480
+ this._mainTitle = group.createOrUpdateChild('mainTitle', Object.assign(Object.assign({ text: [text] }, textStyle), { maxLineWidth: (_k = textStyle === null || textStyle === void 0 ? void 0 : textStyle.maxLineWidth) !== null && _k !== void 0 ? _k : width, heightLimit: textStyle === null || textStyle === void 0 ? void 0 : textStyle.heightLimit, lineClamp: textStyle === null || textStyle === void 0 ? void 0 : textStyle.lineClamp, ellipsis: (_l = textStyle === null || textStyle === void 0 ? void 0 : textStyle.ellipsis) !== null && _l !== void 0 ? _l : true, x: 0, y: 0 }), 'wrapText');
29470
29481
  }
29471
29482
  }
29472
- const maintextHeight = this._mainTitle ? (_3 = this._mainTitle) === null || _3 === void 0 ? void 0 : _3.AABBBounds.height() : 0;
29473
- const maintextWidth = this._mainTitle ? (_4 = this._mainTitle) === null || _4 === void 0 ? void 0 : _4.AABBBounds.width() : 0;
29474
- if (((_5 = this.attribute) === null || _5 === void 0 ? void 0 : _5.visible) !== false && (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.visible) !== false) {
29475
- if (subtextType === 'rich') {
29476
- const attr = Object.assign({ x: (_6 = subtextStyle.x) !== null && _6 !== void 0 ? _6 : 0, y: (_7 = subtextStyle.y) !== null && _7 !== void 0 ? _7 : 0, width: (_9 = (_8 = subtextStyle.width) !== null && _8 !== void 0 ? _8 : width) !== null && _9 !== void 0 ? _9 : 0, height: (_11 = (_10 = subtextStyle.height) !== null && _10 !== void 0 ? _10 : height) !== null && _11 !== void 0 ? _11 : 0, ellipsis: (_12 = subtextStyle.ellipsis) !== null && _12 !== void 0 ? _12 : true, wordBreak: (_13 = subtextStyle.wordBreak) !== null && _13 !== void 0 ? _13 : 'break-word', maxHeight: subtextStyle.maxHeight, maxWidth: subtextStyle.maxWidth, textConfig: subtext }, subtextStyle);
29477
- this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
29478
- }
29479
- else if (textType === 'html') {
29480
- const attr = Object.assign({ html: Object.assign({ dom: subtext, container: '', width: 30, height: 30, style: {} }, subtextStyle), x: (_14 = subtextStyle.x) !== null && _14 !== void 0 ? _14 : 0, y: (_15 = subtextStyle.y) !== null && _15 !== void 0 ? _15 : 0, width: (_17 = (_16 = subtextStyle.width) !== null && _16 !== void 0 ? _16 : width) !== null && _17 !== void 0 ? _17 : 0, height: (_19 = (_18 = subtextStyle.height) !== null && _18 !== void 0 ? _18 : height) !== null && _19 !== void 0 ? _19 : 0, ellipsis: (_20 = subtextStyle.ellipsis) !== null && _20 !== void 0 ? _20 : true, wordBreak: (_21 = subtextStyle.wordBreak) !== null && _21 !== void 0 ? _21 : 'break-word', maxHeight: subtextStyle.maxHeight, maxWidth: subtextStyle.maxWidth, textConfig: [] }, subtextStyle);
29481
- this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
29482
- }
29483
- else if (subtextStyle && vutils.isValid(subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.character)) {
29483
+ const maintextHeight = this._mainTitle ? (_m = this._mainTitle) === null || _m === void 0 ? void 0 : _m.AABBBounds.height() : 0;
29484
+ const maintextWidth = this._mainTitle ? (_o = this._mainTitle) === null || _o === void 0 ? void 0 : _o.AABBBounds.width() : 0;
29485
+ if (((_p = this.attribute) === null || _p === void 0 ? void 0 : _p.visible) !== false && (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.visible) !== false) {
29486
+ if (subtextStyle && vutils.isValid(subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.character)) {
29484
29487
  const attr = {
29485
- x: (_22 = subtextStyle.x) !== null && _22 !== void 0 ? _22 : 0,
29486
- y: (_23 = subtextStyle.y) !== null && _23 !== void 0 ? _23 : maintextHeight,
29487
- width: (_25 = (_24 = subtextStyle.width) !== null && _24 !== void 0 ? _24 : width) !== null && _25 !== void 0 ? _25 : 0,
29488
- height: (_27 = (_26 = subtextStyle.height) !== null && _26 !== void 0 ? _26 : height) !== null && _27 !== void 0 ? _27 : 0,
29489
- ellipsis: (_28 = subtextStyle.ellipsis) !== null && _28 !== void 0 ? _28 : true,
29490
- wordBreak: (_29 = subtextStyle.wordBreak) !== null && _29 !== void 0 ? _29 : 'break-word',
29488
+ x: (_q = subtextStyle.x) !== null && _q !== void 0 ? _q : 0,
29489
+ y: (_r = subtextStyle.y) !== null && _r !== void 0 ? _r : maintextHeight,
29490
+ width: (_t = (_s = subtextStyle.width) !== null && _s !== void 0 ? _s : width) !== null && _t !== void 0 ? _t : 0,
29491
+ height: (_v = (_u = subtextStyle.height) !== null && _u !== void 0 ? _u : height) !== null && _v !== void 0 ? _v : 0,
29492
+ ellipsis: (_w = subtextStyle.ellipsis) !== null && _w !== void 0 ? _w : true,
29493
+ wordBreak: (_x = subtextStyle.wordBreak) !== null && _x !== void 0 ? _x : 'break-word',
29491
29494
  maxHeight: subtextStyle.maxHeight,
29492
29495
  maxWidth: subtextStyle.maxWidth,
29493
29496
  textConfig: subtextStyle.character
@@ -29495,17 +29498,17 @@
29495
29498
  this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
29496
29499
  }
29497
29500
  else if (vutils.isValid(subtext)) {
29498
- this._subTitle = group.createOrUpdateChild('subTitle', Object.assign(Object.assign({ text: [subtext] }, subtextStyle), { maxLineWidth: (_30 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.maxLineWidth) !== null && _30 !== void 0 ? _30 : width, heightLimit: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.heightLimit, lineClamp: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.lineClamp, ellipsis: (_31 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.ellipsis) !== null && _31 !== void 0 ? _31 : true, x: 0, y: maintextHeight }), 'wrapText');
29501
+ this._subTitle = group.createOrUpdateChild('subTitle', Object.assign(Object.assign({ text: [subtext] }, subtextStyle), { maxLineWidth: (_y = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.maxLineWidth) !== null && _y !== void 0 ? _y : width, heightLimit: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.heightLimit, lineClamp: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.lineClamp, ellipsis: (_z = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.ellipsis) !== null && _z !== void 0 ? _z : true, x: 0, y: maintextHeight }), 'wrapText');
29499
29502
  }
29500
29503
  }
29501
- const subtextHeight = this._subTitle ? (_32 = this._subTitle) === null || _32 === void 0 ? void 0 : _32.AABBBounds.height() : 0;
29502
- const subtextWidth = this._subTitle ? (_33 = this._subTitle) === null || _33 === void 0 ? void 0 : _33.AABBBounds.width() : 0;
29504
+ const subtextHeight = this._subTitle ? (_0 = this._subTitle) === null || _0 === void 0 ? void 0 : _0.AABBBounds.height() : 0;
29505
+ const subtextWidth = this._subTitle ? (_1 = this._subTitle) === null || _1 === void 0 ? void 0 : _1.AABBBounds.width() : 0;
29503
29506
  let titleWidth = Math.max(maintextWidth, subtextWidth);
29504
- let titleHeight = maintextHeight + ((_34 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _34 !== void 0 ? _34 : subtextHeight);
29507
+ let titleHeight = maintextHeight + ((_2 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _2 !== void 0 ? _2 : subtextHeight);
29505
29508
  if (vutils.isValid(width)) {
29506
29509
  titleWidth = width;
29507
- (_35 = this._mainTitle) === null || _35 === void 0 ? void 0 : _35.setAttribute('maxLineWidth', width);
29508
- (_36 = this._subTitle) === null || _36 === void 0 ? void 0 : _36.setAttribute('maxLineWidth', width);
29510
+ (_3 = this._mainTitle) === null || _3 === void 0 ? void 0 : _3.setAttribute('maxLineWidth', width);
29511
+ (_4 = this._subTitle) === null || _4 === void 0 ? void 0 : _4.setAttribute('maxLineWidth', width);
29509
29512
  }
29510
29513
  if (vutils.isValid(height)) {
29511
29514
  titleHeight = height;
@@ -29514,10 +29517,10 @@
29514
29517
  titleWidth = minWidth;
29515
29518
  }
29516
29519
  if (vutils.isValid(maxWidth)) {
29517
- (_37 = this._mainTitle) === null || _37 === void 0 ? void 0 : _37.setAttribute('maxLineWidth', maxWidth);
29518
- (_38 = this._subTitle) === null || _38 === void 0 ? void 0 : _38.setAttribute('maxLineWidth', maxWidth);
29519
- (_39 = this._mainTitle) === null || _39 === void 0 ? void 0 : _39.setAttribute('maxWidth', maxWidth);
29520
- (_40 = this._subTitle) === null || _40 === void 0 ? void 0 : _40.setAttribute('maxWidth', maxWidth);
29520
+ (_5 = this._mainTitle) === null || _5 === void 0 ? void 0 : _5.setAttribute('maxLineWidth', maxWidth);
29521
+ (_6 = this._subTitle) === null || _6 === void 0 ? void 0 : _6.setAttribute('maxLineWidth', maxWidth);
29522
+ (_7 = this._mainTitle) === null || _7 === void 0 ? void 0 : _7.setAttribute('maxWidth', maxWidth);
29523
+ (_8 = this._subTitle) === null || _8 === void 0 ? void 0 : _8.setAttribute('maxWidth', maxWidth);
29521
29524
  if (titleWidth > maxWidth) {
29522
29525
  titleWidth = maxWidth;
29523
29526
  }
@@ -29526,8 +29529,8 @@
29526
29529
  titleHeight = minHeight;
29527
29530
  }
29528
29531
  if (vutils.isValid(maxHeight)) {
29529
- (_41 = this._mainTitle) === null || _41 === void 0 ? void 0 : _41.setAttribute('maxHeight', maxHeight);
29530
- (_42 = this._subTitle) === null || _42 === void 0 ? void 0 : _42.setAttribute('maxHeight', maxHeight - maintextHeight);
29532
+ (_9 = this._mainTitle) === null || _9 === void 0 ? void 0 : _9.setAttribute('maxHeight', maxHeight);
29533
+ (_10 = this._subTitle) === null || _10 === void 0 ? void 0 : _10.setAttribute('maxHeight', maxHeight - maintextHeight);
29531
29534
  if (titleHeight > maxHeight) {
29532
29535
  titleHeight = maxHeight;
29533
29536
  }
@@ -29537,67 +29540,67 @@
29537
29540
  group.attribute.boundsPadding = parsedPadding;
29538
29541
  if (vutils.isValid(align) || vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.align)) {
29539
29542
  const mainTitleAlign = (textStyle === null || textStyle === void 0 ? void 0 : textStyle.align) ? textStyle === null || textStyle === void 0 ? void 0 : textStyle.align : align;
29540
- const mainTitleWidth = (_43 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.width) !== null && _43 !== void 0 ? _43 : maintextWidth;
29543
+ const mainTitleWidth = (_11 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.width) !== null && _11 !== void 0 ? _11 : maintextWidth;
29541
29544
  if (mainTitleAlign === 'left') {
29542
- (_44 = this._mainTitle) === null || _44 === void 0 ? void 0 : _44.setAttribute('x', 0);
29543
- (_45 = this._mainTitle) === null || _45 === void 0 ? void 0 : _45.setAttribute('textAlign', 'left');
29545
+ (_12 = this._mainTitle) === null || _12 === void 0 ? void 0 : _12.setAttribute('x', 0);
29546
+ (_13 = this._mainTitle) === null || _13 === void 0 ? void 0 : _13.setAttribute('textAlign', 'left');
29544
29547
  }
29545
29548
  else if (mainTitleAlign === 'center') {
29546
- (_46 = this._mainTitle) === null || _46 === void 0 ? void 0 : _46.setAttribute('x', mainTitleWidth / 2);
29547
- (_47 = this._mainTitle) === null || _47 === void 0 ? void 0 : _47.setAttribute('textAlign', 'center');
29549
+ (_14 = this._mainTitle) === null || _14 === void 0 ? void 0 : _14.setAttribute('x', mainTitleWidth / 2);
29550
+ (_15 = this._mainTitle) === null || _15 === void 0 ? void 0 : _15.setAttribute('textAlign', 'center');
29548
29551
  }
29549
29552
  else if (mainTitleAlign === 'right') {
29550
- (_48 = this._mainTitle) === null || _48 === void 0 ? void 0 : _48.setAttribute('x', mainTitleWidth);
29551
- (_49 = this._mainTitle) === null || _49 === void 0 ? void 0 : _49.setAttribute('textAlign', 'right');
29553
+ (_16 = this._mainTitle) === null || _16 === void 0 ? void 0 : _16.setAttribute('x', mainTitleWidth);
29554
+ (_17 = this._mainTitle) === null || _17 === void 0 ? void 0 : _17.setAttribute('textAlign', 'right');
29552
29555
  }
29553
29556
  }
29554
29557
  if (vutils.isValid(verticalAlign) || vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign)) {
29555
29558
  const mainTitleVerticalAlign = (textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign) ? textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign : verticalAlign;
29556
29559
  const mainTitleHeight = (textStyle === null || textStyle === void 0 ? void 0 : textStyle.height) ? textStyle === null || textStyle === void 0 ? void 0 : textStyle.height : titleHeight;
29557
29560
  if (mainTitleVerticalAlign === 'top') {
29558
- (_50 = this._mainTitle) === null || _50 === void 0 ? void 0 : _50.setAttribute('y', 0);
29559
- (_51 = this._mainTitle) === null || _51 === void 0 ? void 0 : _51.setAttribute('textBaseline', 'top');
29561
+ (_18 = this._mainTitle) === null || _18 === void 0 ? void 0 : _18.setAttribute('y', 0);
29562
+ (_19 = this._mainTitle) === null || _19 === void 0 ? void 0 : _19.setAttribute('textBaseline', 'top');
29560
29563
  }
29561
29564
  else if (mainTitleVerticalAlign === 'middle') {
29562
- (_52 = this._mainTitle) === null || _52 === void 0 ? void 0 : _52.setAttribute('y', mainTitleHeight / 2);
29563
- (_53 = this._mainTitle) === null || _53 === void 0 ? void 0 : _53.setAttribute('textBaseline', 'middle');
29565
+ (_20 = this._mainTitle) === null || _20 === void 0 ? void 0 : _20.setAttribute('y', mainTitleHeight / 2);
29566
+ (_21 = this._mainTitle) === null || _21 === void 0 ? void 0 : _21.setAttribute('textBaseline', 'middle');
29564
29567
  }
29565
29568
  else if (mainTitleVerticalAlign === 'bottom') {
29566
- (_54 = this._mainTitle) === null || _54 === void 0 ? void 0 : _54.setAttribute('y', mainTitleHeight);
29567
- (_55 = this._mainTitle) === null || _55 === void 0 ? void 0 : _55.setAttribute('textBaseline', 'bottom');
29569
+ (_22 = this._mainTitle) === null || _22 === void 0 ? void 0 : _22.setAttribute('y', mainTitleHeight);
29570
+ (_23 = this._mainTitle) === null || _23 === void 0 ? void 0 : _23.setAttribute('textBaseline', 'bottom');
29568
29571
  }
29569
29572
  }
29570
29573
  if (vutils.isValid(align) || vutils.isValid(subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.align)) {
29571
29574
  const subTitleAlign = (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.align) ? subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.align : align;
29572
- const subTitleWidth = (_56 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.width) !== null && _56 !== void 0 ? _56 : subtextWidth;
29575
+ const subTitleWidth = (_24 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.width) !== null && _24 !== void 0 ? _24 : subtextWidth;
29573
29576
  if (subTitleAlign === 'left') {
29574
- (_57 = this._subTitle) === null || _57 === void 0 ? void 0 : _57.setAttribute('x', 0);
29575
- (_58 = this._subTitle) === null || _58 === void 0 ? void 0 : _58.setAttribute('textAlign', 'left');
29577
+ (_25 = this._subTitle) === null || _25 === void 0 ? void 0 : _25.setAttribute('x', 0);
29578
+ (_26 = this._subTitle) === null || _26 === void 0 ? void 0 : _26.setAttribute('textAlign', 'left');
29576
29579
  }
29577
29580
  else if (subTitleAlign === 'center') {
29578
- (_59 = this._subTitle) === null || _59 === void 0 ? void 0 : _59.setAttribute('x', subTitleWidth / 2);
29579
- (_60 = this._subTitle) === null || _60 === void 0 ? void 0 : _60.setAttribute('textAlign', 'center');
29581
+ (_27 = this._subTitle) === null || _27 === void 0 ? void 0 : _27.setAttribute('x', subTitleWidth / 2);
29582
+ (_28 = this._subTitle) === null || _28 === void 0 ? void 0 : _28.setAttribute('textAlign', 'center');
29580
29583
  }
29581
29584
  else if (subTitleAlign === 'right') {
29582
- (_61 = this._subTitle) === null || _61 === void 0 ? void 0 : _61.setAttribute('x', subTitleWidth);
29583
- (_62 = this._subTitle) === null || _62 === void 0 ? void 0 : _62.setAttribute('textAlign', 'right');
29585
+ (_29 = this._subTitle) === null || _29 === void 0 ? void 0 : _29.setAttribute('x', subTitleWidth);
29586
+ (_30 = this._subTitle) === null || _30 === void 0 ? void 0 : _30.setAttribute('textAlign', 'right');
29584
29587
  }
29585
29588
  }
29586
29589
  if (vutils.isValid(verticalAlign) || vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign)) {
29587
29590
  const subTitleVerticalAlign = (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.verticalAlign) ? subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.verticalAlign : verticalAlign;
29588
29591
  const subTitleYStart = maintextHeight;
29589
- const subTitleHeight = (_63 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _63 !== void 0 ? _63 : 0;
29592
+ const subTitleHeight = (_31 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _31 !== void 0 ? _31 : 0;
29590
29593
  if (subTitleVerticalAlign === 'top') {
29591
- (_64 = this._subTitle) === null || _64 === void 0 ? void 0 : _64.setAttribute('y', subTitleYStart);
29592
- (_65 = this._subTitle) === null || _65 === void 0 ? void 0 : _65.setAttribute('textBaseline', 'top');
29594
+ (_32 = this._subTitle) === null || _32 === void 0 ? void 0 : _32.setAttribute('y', subTitleYStart);
29595
+ (_33 = this._subTitle) === null || _33 === void 0 ? void 0 : _33.setAttribute('textBaseline', 'top');
29593
29596
  }
29594
29597
  else if (subTitleVerticalAlign === 'middle') {
29595
- (_66 = this._subTitle) === null || _66 === void 0 ? void 0 : _66.setAttribute('y', subTitleYStart + subTitleHeight / 2);
29596
- (_67 = this._subTitle) === null || _67 === void 0 ? void 0 : _67.setAttribute('textBaseline', 'middle');
29598
+ (_34 = this._subTitle) === null || _34 === void 0 ? void 0 : _34.setAttribute('y', subTitleYStart + subTitleHeight / 2);
29599
+ (_35 = this._subTitle) === null || _35 === void 0 ? void 0 : _35.setAttribute('textBaseline', 'middle');
29597
29600
  }
29598
29601
  else if (subTitleVerticalAlign === 'bottom') {
29599
- (_68 = this._subTitle) === null || _68 === void 0 ? void 0 : _68.setAttribute('y', subTitleYStart + subTitleHeight);
29600
- (_69 = this._subTitle) === null || _69 === void 0 ? void 0 : _69.setAttribute('textBaseline', 'bottom');
29602
+ (_36 = this._subTitle) === null || _36 === void 0 ? void 0 : _36.setAttribute('y', subTitleYStart + subTitleHeight);
29603
+ (_37 = this._subTitle) === null || _37 === void 0 ? void 0 : _37.setAttribute('textBaseline', 'bottom');
29601
29604
  }
29602
29605
  }
29603
29606
  }
@@ -29652,7 +29655,7 @@
29652
29655
  this.name = 'indicator';
29653
29656
  }
29654
29657
  render() {
29655
- var _a, _b, _c;
29658
+ var _a;
29656
29659
  const { visible, title, content, size, limitRatio = Infinity } = this.attribute;
29657
29660
  const limit = Math.min(size.width, size.height) * limitRatio;
29658
29661
  const group = this.createOrUpdateChild('indicator-container', { x: 0, y: 0, zIndex: 1 }, 'group');
@@ -29663,15 +29666,7 @@
29663
29666
  if (vutils.isValid(title)) {
29664
29667
  if (title.visible !== false) {
29665
29668
  const titleStyle = vutils.merge({}, vutils.get(DEFAULT_INDICATOR_THEME, 'title.style'), title.style);
29666
- if (titleStyle.type === 'rich') {
29667
- this._title = group.createOrUpdateChild('indicator-title', Object.assign(Object.assign({ textConfig: titleStyle.text }, titleStyle), { visible: title.visible, x: 0, y: 0, width: (_a = titleStyle.width) !== null && _a !== void 0 ? _a : 0, height: (_b = titleStyle.height) !== null && _b !== void 0 ? _b : 0 }), 'richtext');
29668
- }
29669
- else if (titleStyle.type === 'html') {
29670
- this._title = group.createOrUpdateChild('indicator-title', Object.assign(Object.assign({ textConfig: [], html: Object.assign({ dom: titleStyle.text, container: '', width: 30, height: 30, style: {} }, titleStyle) }, titleStyle), { visible: title.visible, x: 0, y: 0 }), 'richtext');
29671
- }
29672
- else {
29673
- this._title = group.createOrUpdateChild('indicator-title', Object.assign(Object.assign({}, titleStyle), { lineHeight: vutils.isValid(titleStyle.lineHeight) ? titleStyle.lineHeight : titleStyle.fontSize, visible: title.visible, x: 0, y: 0 }), 'text');
29674
- }
29669
+ this._title = group.createOrUpdateChild('indicator-title', Object.assign(Object.assign({}, titleStyle), { lineHeight: vutils.isValid(titleStyle.lineHeight) ? titleStyle.lineHeight : titleStyle.fontSize, visible: title.visible, x: 0, y: 0 }), 'text');
29675
29670
  if (title.autoFit && vutils.isValidNumber(limit)) {
29676
29671
  this._setAutoFit(limit, this._title, title);
29677
29672
  }
@@ -29692,19 +29687,9 @@
29692
29687
  const contentComponents = [];
29693
29688
  let lastContentHeight = 0;
29694
29689
  contents.forEach((contentItem, i) => {
29695
- var _a, _b;
29696
29690
  if (contentItem.visible !== false) {
29697
29691
  const contentStyle = vutils.merge({}, vutils.get(DEFAULT_INDICATOR_THEME, 'content.style'), contentItem.style);
29698
- let contentComponent;
29699
- if (contentStyle.type === 'rich') {
29700
- contentComponent = group.createOrUpdateChild('indicator-content-' + i, Object.assign(Object.assign({ textConfig: contentStyle.text }, contentStyle), { visible: title.visible, x: 0, y: titleHeight + titleSpace + lastContentHeight, width: (_a = contentStyle.width) !== null && _a !== void 0 ? _a : 0, height: (_b = contentStyle.height) !== null && _b !== void 0 ? _b : 0 }), 'richtext');
29701
- }
29702
- else if (contentStyle.type === 'html') {
29703
- contentComponent = group.createOrUpdateChild('indicator-content-' + i, Object.assign(Object.assign({ textConfig: [], html: Object.assign({ dom: contentStyle.text, container: '', width: 30, height: 30, style: {} }, contentStyle) }, contentStyle), { visible: title.visible, x: 0, y: titleHeight + titleSpace + lastContentHeight }), 'richtext');
29704
- }
29705
- else {
29706
- contentComponent = group.createOrUpdateChild('indicator-content-' + i, Object.assign(Object.assign({}, contentStyle), { lineHeight: vutils.isValid(contentStyle.lineHeight) ? contentStyle.lineHeight : contentStyle.fontSize, visible: contentItem.visible, x: 0, y: titleHeight + titleSpace + lastContentHeight }), 'text');
29707
- }
29692
+ const contentComponent = group.createOrUpdateChild('indicator-content-' + i, Object.assign(Object.assign({}, contentStyle), { lineHeight: vutils.isValid(contentStyle.lineHeight) ? contentStyle.lineHeight : contentStyle.fontSize, visible: contentItem.visible, x: 0, y: titleHeight + titleSpace + lastContentHeight }), 'text');
29708
29693
  if (contentItem.autoFit && vutils.isValidNumber(limit)) {
29709
29694
  this._setAutoFit(limit, contentComponent, contentItem);
29710
29695
  }
@@ -29722,7 +29707,7 @@
29722
29707
  });
29723
29708
  this._content = contentComponents;
29724
29709
  }
29725
- const totalHeight = (_c = group === null || group === void 0 ? void 0 : group.AABBBounds.height()) !== null && _c !== void 0 ? _c : 0;
29710
+ const totalHeight = (_a = group === null || group === void 0 ? void 0 : group.AABBBounds.height()) !== null && _a !== void 0 ? _a : 0;
29726
29711
  group.setAttribute('y', size.height / 2 - totalHeight / 2);
29727
29712
  group.setAttribute('x', size.width / 2);
29728
29713
  }
@@ -31081,13 +31066,7 @@
31081
31066
  this._tooltipTitleSymbol = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_SHAPE_NAME_SUFFIX}`, vutils.merge({ symbolType: 'circle' }, titleAttr.shape, {
31082
31067
  visible: isVisible(titleAttr) && isVisible(titleAttr.shape)
31083
31068
  }), 'symbol');
31084
- if (titleAttr.value.type === 'rich') {
31085
- this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign({ visible: isVisible(titleAttr) && isVisible(titleAttr.value), width: titleAttr.value.width, height: titleAttr.value.height, wordBreak: titleAttr.value.wordBreak, textAlign: titleAttr.value.textAlign, textBaseline: titleAttr.value.textBaseline, singleLine: false, textConfig: titleAttr.value.text }, titleAttr.value), 'richtext');
31086
- }
31087
- else if (titleAttr.value.type === 'html') {
31088
- this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign({ html: Object.assign({ dom: titleAttr.value.text, container: '', width: 30, height: 30, style: {} }, titleAttr.value), visible: isVisible(titleAttr) && isVisible(titleAttr.value), width: titleAttr.value.width, height: titleAttr.value.height, wordBreak: titleAttr.value.wordBreak, textAlign: titleAttr.value.textAlign, textBaseline: titleAttr.value.textBaseline, singleLine: false, textConfig: [] }, titleAttr.value), 'richtext');
31089
- }
31090
- else if (titleAttr.value.multiLine) {
31069
+ if (titleAttr.value.multiLine) {
31091
31070
  this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign({ visible: isVisible(titleAttr) && isVisible(titleAttr.value) }, getRichTextAttribute(titleAttr.value)), 'richtext');
31092
31071
  }
31093
31072
  else {
@@ -31515,7 +31494,7 @@
31515
31494
  }
31516
31495
  };
31517
31496
 
31518
- const version = "0.16.14-alpha.7";
31497
+ const version = "0.16.14";
31519
31498
 
31520
31499
  exports.AbstractComponent = AbstractComponent;
31521
31500
  exports.ArcInfo = ArcInfo;