@visactor/vrender-components 0.16.14-alpha.5 → 0.16.14-alpha.6

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 (71) hide show
  1. package/cjs/axis/base.js +22 -11
  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 +6 -3
  6. package/cjs/axis/type.js.map +1 -1
  7. package/cjs/index.d.ts +1 -1
  8. package/cjs/index.js +1 -1
  9. package/cjs/index.js.map +1 -1
  10. package/cjs/indicator/indicator.js +50 -6
  11. package/cjs/indicator/indicator.js.map +1 -1
  12. package/cjs/indicator/type.d.ts +5 -2
  13. package/cjs/indicator/type.js.map +1 -1
  14. package/cjs/label/arc.d.ts +4 -3
  15. package/cjs/label/arc.js.map +1 -1
  16. package/cjs/label/base.d.ts +11 -11
  17. package/cjs/label/base.js +23 -5
  18. package/cjs/label/base.js.map +1 -1
  19. package/cjs/label/type.d.ts +8 -4
  20. package/cjs/label/type.js.map +1 -1
  21. package/cjs/marker/point.d.ts +1 -1
  22. package/cjs/marker/type.js.map +1 -1
  23. package/cjs/tag/tag.js +90 -40
  24. package/cjs/tag/tag.js.map +1 -1
  25. package/cjs/tag/type.d.ts +4 -3
  26. package/cjs/tag/type.js.map +1 -1
  27. package/cjs/title/title.js +111 -47
  28. package/cjs/title/title.js.map +1 -1
  29. package/cjs/title/type.d.ts +10 -5
  30. package/cjs/title/type.js.map +1 -1
  31. package/cjs/tooltip/tooltip.js +27 -2
  32. package/cjs/tooltip/tooltip.js.map +1 -1
  33. package/cjs/tooltip/type.d.ts +3 -1
  34. package/cjs/tooltip/type.js.map +1 -1
  35. package/dist/index.js +267 -292
  36. package/dist/index.min.js +1 -1
  37. package/es/axis/base.js +23 -11
  38. package/es/axis/base.js.map +1 -1
  39. package/es/axis/line.js +1 -1
  40. package/es/axis/line.js.map +1 -1
  41. package/es/axis/type.d.ts +6 -3
  42. package/es/axis/type.js.map +1 -1
  43. package/es/index.d.ts +1 -1
  44. package/es/index.js +1 -1
  45. package/es/index.js.map +1 -1
  46. package/es/indicator/indicator.js +50 -6
  47. package/es/indicator/indicator.js.map +1 -1
  48. package/es/indicator/type.d.ts +5 -2
  49. package/es/indicator/type.js.map +1 -1
  50. package/es/label/arc.d.ts +4 -3
  51. package/es/label/arc.js.map +1 -1
  52. package/es/label/base.d.ts +11 -11
  53. package/es/label/base.js +23 -5
  54. package/es/label/base.js.map +1 -1
  55. package/es/label/type.d.ts +8 -4
  56. package/es/label/type.js.map +1 -1
  57. package/es/marker/point.d.ts +1 -1
  58. package/es/marker/type.js.map +1 -1
  59. package/es/tag/tag.js +88 -38
  60. package/es/tag/tag.js.map +1 -1
  61. package/es/tag/type.d.ts +4 -3
  62. package/es/tag/type.js.map +1 -1
  63. package/es/title/title.js +111 -45
  64. package/es/title/title.js.map +1 -1
  65. package/es/title/type.d.ts +10 -5
  66. package/es/title/type.js.map +1 -1
  67. package/es/tooltip/tooltip.js +28 -3
  68. package/es/tooltip/tooltip.js.map +1 -1
  69. package/es/tooltip/type.d.ts +3 -1
  70. package/es/tooltip/type.js.map +1 -1
  71. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -4470,10 +4470,7 @@
4470
4470
  direction: "horizontal",
4471
4471
  wordBreak: "break-all",
4472
4472
  ignoreBuf: !1,
4473
- verticalMode: 0,
4474
- whiteSpace: "no-wrap",
4475
- heightLimit: 1 / 0,
4476
- lineClamp: 1 / 0
4473
+ verticalMode: 0
4477
4474
  };
4478
4475
  var DefaultStyle = Object.assign(Object.assign(Object.assign({
4479
4476
  opacity: 1,
@@ -7463,12 +7460,6 @@
7463
7460
  }();
7464
7461
  RafBasedSTO.TimeOut = 1e3 / 60;
7465
7462
  new RafBasedSTO();
7466
- var calculateLineHeight = function calculateLineHeight(lineHeight, fontSize) {
7467
- if (vutils.isString(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
7468
- return fontSize * (Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100);
7469
- }
7470
- return lineHeight;
7471
- };
7472
7463
 
7473
7464
  var IncreaseCount = /*#__PURE__*/function (_ACustomAnimate) {
7474
7465
  _inherits(IncreaseCount, _ACustomAnimate);
@@ -9972,7 +9963,7 @@
9972
9963
  return CanvasTextLayout;
9973
9964
  }();
9974
9965
 
9975
- var TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
9966
+ var TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
9976
9967
  var Text = /*#__PURE__*/function (_Graphic) {
9977
9968
  _inherits(Text, _Graphic);
9978
9969
  var _super = _createSuper(Text);
@@ -10046,117 +10037,6 @@
10046
10037
  paddingArray = parsePadding(boundsPadding);
10047
10038
  return paddingArray && bounds.expand(paddingArray), this.clearUpdateBoundTag(), bounds;
10048
10039
  }
10049
- }, {
10050
- key: "updateWrapAABBBounds",
10051
- value: function updateWrapAABBBounds(text) {
10052
- var _a, _b, _c, _d;
10053
- var textTheme = getTheme(this).text,
10054
- _this$attribute = this.attribute,
10055
- _this$attribute$fontF = _this$attribute.fontFamily,
10056
- fontFamily = _this$attribute$fontF === void 0 ? textTheme.fontFamily : _this$attribute$fontF,
10057
- _this$attribute$textA = _this$attribute.textAlign,
10058
- textAlign = _this$attribute$textA === void 0 ? textTheme.textAlign : _this$attribute$textA,
10059
- _this$attribute$textB = _this$attribute.textBaseline,
10060
- textBaseline = _this$attribute$textB === void 0 ? textTheme.textBaseline : _this$attribute$textB,
10061
- _this$attribute$fontS = _this$attribute.fontSize,
10062
- fontSize = _this$attribute$fontS === void 0 ? textTheme.fontSize : _this$attribute$fontS,
10063
- _this$attribute$ellip = _this$attribute.ellipsis,
10064
- ellipsis = _this$attribute$ellip === void 0 ? textTheme.ellipsis : _this$attribute$ellip,
10065
- maxLineWidth = _this$attribute.maxLineWidth,
10066
- _this$attribute$strok = _this$attribute.stroke,
10067
- stroke = _this$attribute$strok === void 0 ? textTheme.stroke : _this$attribute$strok,
10068
- _this$attribute$lineW = _this$attribute.lineWidth,
10069
- lineWidth = _this$attribute$lineW === void 0 ? textTheme.lineWidth : _this$attribute$lineW,
10070
- _this$attribute$wordB = _this$attribute.wordBreak,
10071
- wordBreak = _this$attribute$wordB === void 0 ? textTheme.wordBreak : _this$attribute$wordB,
10072
- _this$attribute$fontW = _this$attribute.fontWeight,
10073
- fontWeight = _this$attribute$fontW === void 0 ? textTheme.fontWeight : _this$attribute$fontW,
10074
- _this$attribute$ignor = _this$attribute.ignoreBuf,
10075
- ignoreBuf = _this$attribute$ignor === void 0 ? textTheme.ignoreBuf : _this$attribute$ignor,
10076
- _this$attribute$heigh = _this$attribute.heightLimit,
10077
- heightLimit = _this$attribute$heigh === void 0 ? 0 : _this$attribute$heigh,
10078
- lineClamp = _this$attribute.lineClamp,
10079
- lineHeight = null !== (_a = calculateLineHeight(this.attribute.lineHeight, this.attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : this.attribute.fontSize || textTheme.fontSize,
10080
- buf = ignoreBuf ? 0 : 2;
10081
- if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
10082
- var _bbox = this.cache.layoutData.bbox;
10083
- return this._AABBBounds.set(_bbox.xOffset, _bbox.yOffset, _bbox.xOffset + _bbox.width, _bbox.yOffset + _bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
10084
- }
10085
- var textMeasure = application.graphicUtil.textMeasure,
10086
- layoutObj = new CanvasTextLayout(fontFamily, {
10087
- fontSize: fontSize,
10088
- fontWeight: fontWeight,
10089
- fontFamily: fontFamily
10090
- }, textMeasure),
10091
- lines = vutils.isArray(text) ? text.map(function (l) {
10092
- return l.toString();
10093
- }) : [text.toString()],
10094
- linesLayout = [],
10095
- bboxWH = [0, 0];
10096
- var lineCountLimit = 1 / 0;
10097
- if (heightLimit > 0 && (lineCountLimit = Math.max(Math.floor(heightLimit / lineHeight), 1)), lineClamp && (lineCountLimit = Math.min(lineCountLimit, lineClamp)), "number" == typeof maxLineWidth && maxLineWidth !== 1 / 0) {
10098
- if (maxLineWidth > 0) for (var i = 0; i < lines.length; i++) {
10099
- var str = lines[i];
10100
- var needCut = !0;
10101
- if (i === lineCountLimit - 1) {
10102
- var _clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
10103
- linesLayout.push({
10104
- str: _clip.str,
10105
- width: _clip.width
10106
- });
10107
- break;
10108
- }
10109
- var clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
10110
- if ("" !== str && "" === clip.str) {
10111
- if (ellipsis) {
10112
- var clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
10113
- clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
10114
- } else clip.str = "", clip.width = 0;
10115
- needCut = !1;
10116
- }
10117
- if (linesLayout.push({
10118
- str: clip.str,
10119
- width: clip.width
10120
- }), clip.str.length === str.length) ;else if (needCut) {
10121
- var newStr = str.substring(clip.str.length);
10122
- lines.splice(i + 1, 0, newStr);
10123
- }
10124
- }
10125
- var maxWidth = 0;
10126
- linesLayout.forEach(function (layout) {
10127
- maxWidth = Math.max(maxWidth, layout.width);
10128
- }), bboxWH[0] = maxWidth;
10129
- } else {
10130
- var width,
10131
- _text,
10132
- _lineWidth = 0;
10133
- for (var _i = 0, len = lines.length; _i < len; _i++) {
10134
- if (_i === lineCountLimit - 1) {
10135
- var _clip2 = layoutObj.textMeasure.clipTextWithSuffix(lines[_i], layoutObj.textOptions, maxLineWidth, ellipsis, !1);
10136
- linesLayout.push({
10137
- str: _clip2.str,
10138
- width: _clip2.width
10139
- }), _lineWidth = Math.max(_lineWidth, _clip2.width);
10140
- break;
10141
- }
10142
- _text = lines[_i], width = layoutObj.textMeasure.measureTextWidth(_text, layoutObj.textOptions, "break-word" === wordBreak), _lineWidth = Math.max(_lineWidth, width), linesLayout.push({
10143
- str: _text,
10144
- width: width
10145
- });
10146
- }
10147
- bboxWH[0] = _lineWidth;
10148
- }
10149
- bboxWH[1] = linesLayout.length * (lineHeight + buf);
10150
- var bbox = {
10151
- xOffset: 0,
10152
- yOffset: 0,
10153
- width: bboxWH[0],
10154
- height: bboxWH[1]
10155
- };
10156
- layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
10157
- var layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
10158
- return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
10159
- }
10160
10040
  }, {
10161
10041
  key: "updateSingallineAABBBounds",
10162
10042
  value: function updateSingallineAABBBounds(text) {
@@ -10203,12 +10083,9 @@
10203
10083
  _attribute$wordBreak === void 0 ? textTheme.wordBreak : _attribute$wordBreak;
10204
10084
  var _attribute$ignoreBuf = attribute.ignoreBuf,
10205
10085
  ignoreBuf = _attribute$ignoreBuf === void 0 ? textTheme.ignoreBuf : _attribute$ignoreBuf,
10206
- _attribute$whiteSpace = attribute.whiteSpace,
10207
- whiteSpace = _attribute$whiteSpace === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace;
10208
- if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
10209
- var buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
10210
- textFontSize = attribute.fontSize || textTheme.fontSize,
10211
- lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, textFontSize)) && void 0 !== _a ? _a : textFontSize + buf;
10086
+ buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
10087
+ _attribute$lineHeight = attribute.lineHeight,
10088
+ lineHeight = _attribute$lineHeight === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight;
10212
10089
  if (!this.shouldUpdateShape() && this.cache) {
10213
10090
  width = null !== (_b = this.cache.clipedWidth) && void 0 !== _b ? _b : 0;
10214
10091
  var _dx = textDrawOffsetX(textAlign, width),
@@ -10278,11 +10155,12 @@
10278
10155
  fontFamily = _attribute$fontFamily2 === void 0 ? textTheme.fontFamily : _attribute$fontFamily2,
10279
10156
  _attribute$stroke2 = attribute.stroke,
10280
10157
  stroke = _attribute$stroke2 === void 0 ? textTheme.stroke : _attribute$stroke2,
10158
+ _attribute$lineHeight2 = attribute.lineHeight,
10159
+ lineHeight = _attribute$lineHeight2 === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight2,
10281
10160
  _attribute$lineWidth2 = attribute.lineWidth,
10282
10161
  lineWidth = _attribute$lineWidth2 === void 0 ? textTheme.lineWidth : _attribute$lineWidth2,
10283
10162
  _attribute$verticalMo = attribute.verticalMode,
10284
- verticalMode = _attribute$verticalMo === void 0 ? textTheme.verticalMode : _attribute$verticalMo,
10285
- lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
10163
+ verticalMode = _attribute$verticalMo === void 0 ? textTheme.verticalMode : _attribute$verticalMo;
10286
10164
  var _attribute$textAlign2 = attribute.textAlign,
10287
10165
  textAlign = _attribute$textAlign2 === void 0 ? textTheme.textAlign : _attribute$textAlign2,
10288
10166
  _attribute$textBaseli2 = attribute.textBaseline,
@@ -10332,7 +10210,7 @@
10332
10210
  }, {
10333
10211
  key: "updateHorizontalMultilineAABBBounds",
10334
10212
  value: function updateHorizontalMultilineAABBBounds(text) {
10335
- var _a, _b;
10213
+ var _a;
10336
10214
  var textTheme = getTheme(this).text,
10337
10215
  attribute = this.attribute,
10338
10216
  _attribute$fontFamily3 = attribute.fontFamily,
@@ -10345,6 +10223,8 @@
10345
10223
  fontSize = _attribute$fontSize3 === void 0 ? textTheme.fontSize : _attribute$fontSize3,
10346
10224
  _attribute$fontWeight3 = attribute.fontWeight,
10347
10225
  fontWeight = _attribute$fontWeight3 === void 0 ? textTheme.fontWeight : _attribute$fontWeight3,
10226
+ _attribute$lineHeight3 = attribute.lineHeight,
10227
+ lineHeight = _attribute$lineHeight3 === void 0 ? attribute.lineHeight || attribute.fontSize || textTheme.fontSize : _attribute$lineHeight3,
10348
10228
  _attribute$ellipsis3 = attribute.ellipsis,
10349
10229
  ellipsis = _attribute$ellipsis3 === void 0 ? textTheme.ellipsis : _attribute$ellipsis3,
10350
10230
  maxLineWidth = attribute.maxLineWidth,
@@ -10352,13 +10232,11 @@
10352
10232
  stroke = _attribute$stroke3 === void 0 ? textTheme.stroke : _attribute$stroke3,
10353
10233
  _attribute$lineWidth3 = attribute.lineWidth,
10354
10234
  lineWidth = _attribute$lineWidth3 === void 0 ? textTheme.lineWidth : _attribute$lineWidth3,
10355
- _attribute$whiteSpace2 = attribute.whiteSpace,
10356
- whiteSpace = _attribute$whiteSpace2 === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace2,
10357
- lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize;
10358
- if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
10359
- if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
10360
- var _bbox2 = this.cache.layoutData.bbox;
10361
- return this._AABBBounds.set(_bbox2.xOffset, _bbox2.yOffset, _bbox2.xOffset + _bbox2.width, _bbox2.yOffset + _bbox2.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
10235
+ _attribute$wordBreak2 = attribute.wordBreak;
10236
+ _attribute$wordBreak2 === void 0 ? textTheme.wordBreak : _attribute$wordBreak2;
10237
+ if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
10238
+ var _bbox = this.cache.layoutData.bbox;
10239
+ return this._AABBBounds.set(_bbox.xOffset, _bbox.yOffset, _bbox.xOffset + _bbox.width, _bbox.yOffset + _bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
10362
10240
  }
10363
10241
  var textMeasure = application.graphicUtil.textMeasure,
10364
10242
  layoutData = new CanvasTextLayout(fontFamily, {
@@ -10392,11 +10270,12 @@
10392
10270
  fontWeight = _attribute$fontWeight4 === void 0 ? textTheme.fontWeight : _attribute$fontWeight4,
10393
10271
  _attribute$stroke4 = attribute.stroke,
10394
10272
  stroke = _attribute$stroke4 === void 0 ? textTheme.stroke : _attribute$stroke4,
10273
+ _attribute$lineHeight4 = attribute.lineHeight,
10274
+ lineHeight = _attribute$lineHeight4 === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight4,
10395
10275
  _attribute$lineWidth4 = attribute.lineWidth,
10396
10276
  lineWidth = _attribute$lineWidth4 === void 0 ? textTheme.lineWidth : _attribute$lineWidth4,
10397
10277
  _attribute$verticalMo2 = attribute.verticalMode,
10398
- verticalMode = _attribute$verticalMo2 === void 0 ? textTheme.verticalMode : _attribute$verticalMo2,
10399
- lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
10278
+ verticalMode = _attribute$verticalMo2 === void 0 ? textTheme.verticalMode : _attribute$verticalMo2;
10400
10279
  var _attribute$textAlign4 = attribute.textAlign,
10401
10280
  textAlign = _attribute$textAlign4 === void 0 ? textTheme.textAlign : _attribute$textAlign4,
10402
10281
  _attribute$textBaseli4 = attribute.textBaseline,
@@ -10529,7 +10408,7 @@
10529
10408
  }, {
10530
10409
  key: "updateMultilineAABBBounds",
10531
10410
  value: function updateMultilineAABBBounds(text) {
10532
- var _a, _b, _c, _d;
10411
+ var _a, _b, _c;
10533
10412
  var textTheme = getTheme(this).text,
10534
10413
  _this$attribute = this.attribute,
10535
10414
  _this$attribute$fontF = _this$attribute.fontFamily,
@@ -10540,6 +10419,8 @@
10540
10419
  textBaseline = _this$attribute$textB === void 0 ? textTheme.textBaseline : _this$attribute$textB,
10541
10420
  _this$attribute$fontS = _this$attribute.fontSize,
10542
10421
  fontSize = _this$attribute$fontS === void 0 ? textTheme.fontSize : _this$attribute$fontS,
10422
+ _this$attribute$lineH = _this$attribute.lineHeight,
10423
+ lineHeight = _this$attribute$lineH === void 0 ? this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize : _this$attribute$lineH,
10543
10424
  _this$attribute$ellip = _this$attribute.ellipsis,
10544
10425
  ellipsis = _this$attribute$ellip === void 0 ? textTheme.ellipsis : _this$attribute$ellip,
10545
10426
  maxLineWidth = _this$attribute.maxLineWidth,
@@ -10556,9 +10437,8 @@
10556
10437
  _this$attribute$heigh = _this$attribute.heightLimit,
10557
10438
  heightLimit = _this$attribute$heigh === void 0 ? 0 : _this$attribute$heigh,
10558
10439
  lineClamp = _this$attribute.lineClamp,
10559
- lineHeight = null !== (_a = calculateLineHeight(this.attribute.lineHeight, this.attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : this.attribute.fontSize || textTheme.fontSize,
10560
10440
  buf = ignoreBuf ? 0 : 2;
10561
- if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
10441
+ if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
10562
10442
  var _bbox = this.cache.layoutData.bbox;
10563
10443
  return this._AABBBounds.set(_bbox.xOffset, _bbox.yOffset, _bbox.xOffset + _bbox.width, _bbox.yOffset + _bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
10564
10444
  }
@@ -10590,7 +10470,7 @@
10590
10470
  if ("" !== str && "" === clip.str) {
10591
10471
  if (ellipsis) {
10592
10472
  var clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
10593
- clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
10473
+ clip.str = null !== (_b = clipEllipsis.str) && void 0 !== _b ? _b : "", clip.width = null !== (_c = clipEllipsis.width) && void 0 !== _c ? _c : 0;
10594
10474
  } else clip.str = "", clip.width = 0;
10595
10475
  needCut = !1;
10596
10476
  }
@@ -11930,9 +11810,7 @@
11930
11810
  var Paragraph = /*#__PURE__*/function () {
11931
11811
  function Paragraph(text, newLine, character) {
11932
11812
  _classCallCheck(this, Paragraph);
11933
- this.fontSize = character.fontSize || 16, this.textBaseline = character.textBaseline || "alphabetic";
11934
- var lineHeight = calculateLineHeight(character.lineHeight, this.fontSize);
11935
- this.lineHeight = "number" == typeof lineHeight ? lineHeight > this.fontSize ? lineHeight : this.fontSize : Math.floor(1.2 * this.fontSize), this.height = this.lineHeight;
11813
+ this.fontSize = character.fontSize || 16, this.textBaseline = character.textBaseline || "alphabetic", "number" == typeof character.lineHeight ? this.lineHeight = character.lineHeight > this.fontSize ? character.lineHeight : this.fontSize : this.lineHeight = Math.floor(1.2 * this.fontSize), this.height = this.lineHeight;
11936
11814
  var _measureTextCanvas = measureTextCanvas(text, character),
11937
11815
  ascent = _measureTextCanvas.ascent,
11938
11816
  height = _measureTextCanvas.height,
@@ -15463,7 +15341,7 @@
15463
15341
  var t = textAlign;
15464
15342
  textAlign = null !== (_a = text.getBaselineMapAlign()[textBaseline]) && void 0 !== _a ? _a : "left", textBaseline = null !== (_b = text.getAlignMapBaseline()[t]) && void 0 !== _b ? _b : "top";
15465
15343
  }
15466
- var lineHeight = null !== (_c = calculateLineHeight(text.attribute.lineHeight, fontSize)) && void 0 !== _c ? _c : fontSize,
15344
+ var lineHeight = null !== (_c = text.attribute.lineHeight) && void 0 !== _c ? _c : fontSize,
15467
15345
  data = this.valid(text, textAttribute, fillCb, strokeCb);
15468
15346
  if (!data) return;
15469
15347
  var fVisible = data.fVisible,
@@ -20974,8 +20852,8 @@
20974
20852
  this.name = 'tag';
20975
20853
  }
20976
20854
  render() {
20977
- var _a;
20978
- const { text = '', textStyle = {}, shape = {}, panel = {}, space = 4, minWidth, maxWidth, padding = 4, visible, state } = this.attribute;
20855
+ var _a, _b, _c;
20856
+ const { text = '', textStyle = {}, shape = {}, panel = {}, space = 4, minWidth, maxWidth, padding = 4, visible, state, type = 'text' } = this.attribute;
20979
20857
  const parsedPadding = vutils.normalizePadding(padding);
20980
20858
  const group = this.createOrUpdateChild('tag-content', { x: 0, y: 0, zIndex: 1 }, 'group');
20981
20859
  let symbol;
@@ -20997,75 +20875,100 @@
20997
20875
  }
20998
20876
  tagWidth += symbolPlaceWidth;
20999
20877
  textX += symbolPlaceWidth;
21000
- 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 });
21001
- if (vutils.isNil(textAttrs.lineHeight)) {
21002
- textAttrs.lineHeight = textAttrs.fontSize;
21003
- }
21004
- const textShape = group.createOrUpdateChild('tag-text', textAttrs, 'text');
21005
- if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.text)) {
21006
- textShape.states = state.text;
21007
- }
21008
- const textBounds = measureTextSize(textAttrs.text, textStyle);
21009
- const textWidth = textBounds.width;
21010
- const textHeight = textBounds.height;
21011
- tagWidth += textWidth;
21012
- const size = (_a = shape.size) !== null && _a !== void 0 ? _a : 10;
21013
- const maxSize = vutils.isNumber(size) ? size : Math.max(size[0], size[1]);
21014
- tagHeight += Math.max(textHeight, (shape === null || shape === void 0 ? void 0 : shape.visible) ? maxSize : 0);
21015
- const { textAlign, textBaseline } = textStyle;
21016
- if (vutils.isValid(minWidth) || vutils.isValid(maxWidth)) {
21017
- if (vutils.isValid(minWidth) && tagWidth < minWidth) {
21018
- tagWidth = minWidth;
21019
- }
21020
- if (vutils.isValid(maxWidth) && tagWidth > maxWidth) {
21021
- tagWidth = maxWidth;
21022
- textShape.setAttribute('maxLineWidth', maxWidth - parsedPadding[1] - parsedPadding[2]);
21023
- }
21024
- }
21025
- let x = 0;
21026
- let y = 0;
21027
- if (textAlign === 'center') {
21028
- x -= tagWidth / 2;
21029
- if (symbol) {
21030
- symbol.setAttribute('x', (symbol.attribute.x || 0) - textWidth / 2);
20878
+ let textShape;
20879
+ if (type === 'rich') {
20880
+ 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 });
20881
+ textShape = group.createOrUpdateChild('tag-text', richTextAttrs, 'richtext');
20882
+ const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
20883
+ if (visible && vutils.isBoolean(bgVisible)) {
20884
+ 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');
20885
+ if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
20886
+ bgRect.states = state.panel;
20887
+ }
21031
20888
  }
21032
- group.setAttribute('x', -symbolPlaceWidth / 2);
21033
20889
  }
21034
- else if (textAlign === 'right' || textAlign === 'end') {
21035
- x -= tagWidth;
21036
- if (symbol) {
21037
- symbol.setAttribute('x', (symbol.attribute.x || 0) - textWidth);
20890
+ else if (type === 'html') {
20891
+ 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 });
20892
+ textShape = group.createOrUpdateChild('tag-text', richTextAttrs, 'richtext');
20893
+ const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
20894
+ if (visible && vutils.isBoolean(bgVisible)) {
20895
+ 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');
20896
+ if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
20897
+ bgRect.states = state.panel;
20898
+ }
21038
20899
  }
21039
- group.setAttribute('x', -parsedPadding[1] - symbolPlaceWidth);
21040
- }
21041
- else if (textAlign === 'left' || textAlign === 'start') {
21042
- group.setAttribute('x', parsedPadding[3]);
21043
20900
  }
21044
- if (textBaseline === 'middle') {
21045
- y -= tagHeight / 2;
21046
- if (symbol) {
21047
- symbol.setAttribute('y', 0);
20901
+ else {
20902
+ 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 });
20903
+ if (vutils.isNil(textAttrs.lineHeight)) {
20904
+ textAttrs.lineHeight = textStyle.fontSize;
20905
+ }
20906
+ textShape = group.createOrUpdateChild('tag-text', textAttrs, 'text');
20907
+ if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.text)) {
20908
+ textShape.states = state.text;
20909
+ }
20910
+ const textBounds = measureTextSize(textAttrs.text, textStyle);
20911
+ const textWidth = textBounds.width;
20912
+ const textHeight = textBounds.height;
20913
+ tagWidth += textWidth;
20914
+ const size = (_c = shape.size) !== null && _c !== void 0 ? _c : 10;
20915
+ const maxSize = vutils.isNumber(size) ? size : Math.max(size[0], size[1]);
20916
+ tagHeight += Math.max(textHeight, (shape === null || shape === void 0 ? void 0 : shape.visible) ? maxSize : 0);
20917
+ const { textAlign, textBaseline } = textStyle;
20918
+ if (vutils.isValid(minWidth) || vutils.isValid(maxWidth)) {
20919
+ if (vutils.isValid(minWidth) && tagWidth < minWidth) {
20920
+ tagWidth = minWidth;
20921
+ }
20922
+ if (vutils.isValid(maxWidth) && tagWidth > maxWidth) {
20923
+ tagWidth = maxWidth;
20924
+ textShape.setAttribute('maxLineWidth', maxWidth - parsedPadding[1] - parsedPadding[2]);
20925
+ }
21048
20926
  }
21049
- }
21050
- else if (textBaseline === 'bottom') {
21051
- y -= tagHeight;
21052
- if (symbol) {
21053
- symbol.setAttribute('y', -textHeight / 2);
20927
+ let x = 0;
20928
+ let y = 0;
20929
+ if (textAlign === 'center') {
20930
+ x -= tagWidth / 2;
20931
+ if (symbol) {
20932
+ symbol.setAttribute('x', (symbol.attribute.x || 0) - textWidth / 2);
20933
+ }
20934
+ group.setAttribute('x', -symbolPlaceWidth / 2);
21054
20935
  }
21055
- group.setAttribute('y', -parsedPadding[2]);
21056
- }
21057
- else if (textBaseline === 'top') {
21058
- group.setAttribute('y', parsedPadding[0]);
21059
- if (symbol) {
21060
- symbol.setAttribute('y', textHeight / 2);
20936
+ else if (textAlign === 'right' || textAlign === 'end') {
20937
+ x -= tagWidth;
20938
+ if (symbol) {
20939
+ symbol.setAttribute('x', (symbol.attribute.x || 0) - textWidth);
20940
+ }
20941
+ group.setAttribute('x', -parsedPadding[1] - symbolPlaceWidth);
21061
20942
  }
21062
- }
21063
- const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
21064
- if (visible && vutils.isBoolean(bgVisible)) {
21065
- const bgRect = this.createOrUpdateChild('tag-panel', Object.assign(Object.assign({}, backgroundStyle), { visible: bgVisible && !!text, x,
21066
- y, width: tagWidth, height: tagHeight }), 'rect');
21067
- if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
21068
- bgRect.states = state.panel;
20943
+ else if (textAlign === 'left' || textAlign === 'start') {
20944
+ group.setAttribute('x', parsedPadding[3]);
20945
+ }
20946
+ if (textBaseline === 'middle') {
20947
+ y -= tagHeight / 2;
20948
+ if (symbol) {
20949
+ symbol.setAttribute('y', 0);
20950
+ }
20951
+ }
20952
+ else if (textBaseline === 'bottom') {
20953
+ y -= tagHeight;
20954
+ if (symbol) {
20955
+ symbol.setAttribute('y', -textHeight / 2);
20956
+ }
20957
+ group.setAttribute('y', -parsedPadding[2]);
20958
+ }
20959
+ else if (textBaseline === 'top') {
20960
+ group.setAttribute('y', parsedPadding[0]);
20961
+ if (symbol) {
20962
+ symbol.setAttribute('y', textHeight / 2);
20963
+ }
20964
+ }
20965
+ const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
20966
+ if (visible && vutils.isBoolean(bgVisible)) {
20967
+ const bgRect = this.createOrUpdateChild('tag-panel', Object.assign(Object.assign({}, backgroundStyle), { visible: bgVisible && !!text, x,
20968
+ y, width: tagWidth, height: tagHeight }), 'rect');
20969
+ if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
20970
+ bgRect.states = state.panel;
20971
+ }
21069
20972
  }
21070
20973
  }
21071
20974
  }
@@ -22277,6 +22180,24 @@
22277
22180
  target.states = state;
22278
22181
  }
22279
22182
  _createLabelText(attributes) {
22183
+ var _a, _b;
22184
+ if (attributes.type === 'rich') {
22185
+ attributes.textConfig = attributes.text;
22186
+ attributes.width = (_a = attributes.width) !== null && _a !== void 0 ? _a : 0;
22187
+ attributes.height = (_b = attributes.height) !== null && _b !== void 0 ? _b : 0;
22188
+ const text = createRichText(attributes);
22189
+ this._bindEvent(text);
22190
+ this._setStatesOfText(text);
22191
+ return text;
22192
+ }
22193
+ else if (attributes.type === 'html') {
22194
+ attributes.textConfig = [];
22195
+ attributes.html = Object.assign({ dom: attributes.text, container: '', width: 30, height: 30, style: {} }, attributes);
22196
+ const text = createRichText(attributes);
22197
+ this._bindEvent(text);
22198
+ this._setStatesOfText(text);
22199
+ return text;
22200
+ }
22280
22201
  const text = createText(attributes);
22281
22202
  this._bindEvent(text);
22282
22203
  this._setStatesOfText(text);
@@ -22503,7 +22424,7 @@
22503
22424
  const prevTextMap = this._graphicToText || new Map();
22504
22425
  const texts = [];
22505
22426
  labels.forEach((text, index) => {
22506
- var _a, _b, _c, _d, _e, _f, _g;
22427
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
22507
22428
  const labelLine = this._labelLine(text);
22508
22429
  const relatedGraphic = this.getRelatedGrphic(text.attribute);
22509
22430
  const textId = text.attribute.id;
@@ -22546,11 +22467,11 @@
22546
22467
  }), duration, easing);
22547
22468
  }
22548
22469
  if (animationConfig.increaseEffect !== false &&
22549
- prevText.attribute.text !== text.attribute.text &&
22550
- vutils.isValidNumber(Number(prevText.attribute.text) * Number(text.attribute.text))) {
22470
+ ((_h = prevText.attribute) === null || _h === void 0 ? void 0 : _h.text) !== ((_j = text.attribute) === null || _j === void 0 ? void 0 : _j.text) &&
22471
+ 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))) {
22551
22472
  prevText
22552
22473
  .animate()
22553
- .play(new IncreaseCount({ text: prevText.attribute.text }, { text: text.attribute.text }, duration, easing));
22474
+ .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));
22554
22475
  }
22555
22476
  }
22556
22477
  });
@@ -24222,12 +24143,26 @@
24222
24143
  let textAlign = 'center';
24223
24144
  let textBaseline = 'middle';
24224
24145
  data.forEach((item, index) => {
24225
- var _a, _b;
24146
+ var _a, _b, _c, _d;
24226
24147
  const labelStyle = this._getLabelAttribute(item, index, data, layer);
24227
- const text = createText(labelStyle);
24148
+ let text;
24149
+ if ((labelStyle === null || labelStyle === void 0 ? void 0 : labelStyle.type) === 'rich') {
24150
+ labelStyle.textConfig = labelStyle.text;
24151
+ labelStyle.width = (_a = labelStyle.width) !== null && _a !== void 0 ? _a : 0;
24152
+ labelStyle.height = (_b = labelStyle.height) !== null && _b !== void 0 ? _b : 0;
24153
+ text = createRichText(labelStyle);
24154
+ }
24155
+ else if ((labelStyle === null || labelStyle === void 0 ? void 0 : labelStyle.type) === 'html') {
24156
+ labelStyle.textConfig = [];
24157
+ labelStyle.html = Object.assign({ dom: labelStyle.text, container: '', width: 30, height: 30, style: {} }, labelStyle);
24158
+ text = createRichText(labelStyle);
24159
+ }
24160
+ else {
24161
+ text = createText(labelStyle);
24162
+ }
24228
24163
  text.name = exports.AXIS_ELEMENT_NAME.label;
24229
24164
  text.id = this._getNodeId(`layer${layer}-label-${item.id}`);
24230
- if (vutils.isEmpty((_a = this.attribute.label) === null || _a === void 0 ? void 0 : _a.state)) {
24165
+ if (vutils.isEmpty((_c = this.attribute.label) === null || _c === void 0 ? void 0 : _c.state)) {
24231
24166
  text.states = DEFAULT_STATES$2;
24232
24167
  }
24233
24168
  else {
@@ -24240,7 +24175,7 @@
24240
24175
  text.states = labelState;
24241
24176
  }
24242
24177
  labelGroup.add(text);
24243
- const angle = (_b = labelStyle.angle) !== null && _b !== void 0 ? _b : 0;
24178
+ const angle = (_d = labelStyle.angle) !== null && _d !== void 0 ? _d : 0;
24244
24179
  maxTextWidth = Math.max(maxTextWidth, text.AABBBounds.width());
24245
24180
  maxTextHeight = Math.max(maxTextHeight, text.AABBBounds.height());
24246
24181
  if (angle) {
@@ -24389,7 +24324,7 @@
24389
24324
  }
24390
24325
  _getLabelAttribute(tickDatum, index, tickData, layer) {
24391
24326
  var _a, _b, _c, _d, _e, _f;
24392
- const _g = this.attribute.label, { space = 4, inside = false, formatMethod } = _g, tagAttributes = __rest(_g, ["space", "inside", "formatMethod"]);
24327
+ const _g = this.attribute.label, { space = 4, inside = false, formatMethod, type = 'text', text } = _g, tagAttributes = __rest(_g, ["space", "inside", "formatMethod", "type", "text"]);
24393
24328
  let offset = space;
24394
24329
  let tickLength = 0;
24395
24330
  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) {
@@ -24410,7 +24345,9 @@
24410
24345
  }
24411
24346
  const point = this.getVerticalCoord(tickDatum.point, offset, inside);
24412
24347
  const vector = this.getVerticalVector(offset, inside, point);
24413
- const text = formatMethod ? formatMethod(`${tickDatum.label}`, tickDatum, index, tickData, layer) : tickDatum.label;
24348
+ const textContent = formatMethod
24349
+ ? formatMethod(`${tickDatum.label}`, tickDatum, index, tickData, layer)
24350
+ : tickDatum.label;
24414
24351
  let { style: textStyle } = tagAttributes;
24415
24352
  textStyle = vutils.isFunction(textStyle)
24416
24353
  ? vutils.merge({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer))
@@ -24425,7 +24362,7 @@
24425
24362
  layer
24426
24363
  });
24427
24364
  }
24428
- 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);
24365
+ 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);
24429
24366
  }
24430
24367
  getLabelPosition(point, vector, text, style) {
24431
24368
  return point;
@@ -25163,7 +25100,7 @@
25163
25100
  let titleSpacing = 0;
25164
25101
  const axisLineWidth = (line === null || line === void 0 ? void 0 : line.visible) ? (_b = line.style.lineWidth) !== null && _b !== void 0 ? _b : 1 : 0;
25165
25102
  const tickLength = (tick === null || tick === void 0 ? void 0 : tick.visible) ? (_c = tick.length) !== null && _c !== void 0 ? _c : 4 : 0;
25166
- if (title === null || title === void 0 ? void 0 : title.visible) {
25103
+ if ((title === null || title === void 0 ? void 0 : title.visible) && typeof title.text === 'string') {
25167
25104
  titleHeight = measureTextSize(title.text, title.textStyle).height;
25168
25105
  const padding = vutils.normalizePadding(title.padding);
25169
25106
  titleSpacing = title.space + padding[0] + padding[2];
@@ -29371,19 +29308,27 @@
29371
29308
  this.name = 'title';
29372
29309
  }
29373
29310
  render() {
29374
- 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;
29375
- const { text, textStyle, subtext, subtextStyle, width, height, minWidth, maxWidth, minHeight, maxHeight, align, verticalAlign, padding = 0 } = this.attribute;
29311
+ 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;
29312
+ const { textType, text, subtextType, textStyle, subtext, subtextStyle, width, height, minWidth, maxWidth, minHeight, maxHeight, align, verticalAlign, padding = 0 } = this.attribute;
29376
29313
  const parsedPadding = vutils.normalizePadding(padding);
29377
29314
  const group = this.createOrUpdateChild('title-container', { x: parsedPadding[3], y: parsedPadding[0], zIndex: 1 }, 'group');
29378
29315
  if (((_a = this.attribute) === null || _a === void 0 ? void 0 : _a.visible) !== false && (textStyle === null || textStyle === void 0 ? void 0 : textStyle.visible) !== false) {
29379
- if (textStyle && vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.character)) {
29316
+ if (textType === 'rich') {
29317
+ 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);
29318
+ this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
29319
+ }
29320
+ else if (textType === 'html') {
29321
+ 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);
29322
+ this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
29323
+ }
29324
+ else if (textStyle && vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.character)) {
29380
29325
  const attr = {
29381
- x: (_b = textStyle.x) !== null && _b !== void 0 ? _b : 0,
29382
- y: (_c = textStyle.y) !== null && _c !== void 0 ? _c : 0,
29383
- width: (_e = (_d = textStyle.width) !== null && _d !== void 0 ? _d : width) !== null && _e !== void 0 ? _e : 0,
29384
- height: (_g = (_f = textStyle.height) !== null && _f !== void 0 ? _f : height) !== null && _g !== void 0 ? _g : 0,
29385
- ellipsis: (_h = textStyle.ellipsis) !== null && _h !== void 0 ? _h : true,
29386
- wordBreak: (_j = textStyle.wordBreak) !== null && _j !== void 0 ? _j : 'break-word',
29326
+ x: (_t = textStyle.x) !== null && _t !== void 0 ? _t : 0,
29327
+ y: (_u = textStyle.y) !== null && _u !== void 0 ? _u : 0,
29328
+ width: (_w = (_v = textStyle.width) !== null && _v !== void 0 ? _v : width) !== null && _w !== void 0 ? _w : 0,
29329
+ height: (_y = (_x = textStyle.height) !== null && _x !== void 0 ? _x : height) !== null && _y !== void 0 ? _y : 0,
29330
+ ellipsis: (_z = textStyle.ellipsis) !== null && _z !== void 0 ? _z : true,
29331
+ wordBreak: (_0 = textStyle.wordBreak) !== null && _0 !== void 0 ? _0 : 'break-word',
29387
29332
  maxHeight: textStyle.maxHeight,
29388
29333
  maxWidth: textStyle.maxWidth,
29389
29334
  textConfig: textStyle.character
@@ -29391,20 +29336,28 @@
29391
29336
  this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
29392
29337
  }
29393
29338
  else if (vutils.isValid(text)) {
29394
- 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');
29339
+ 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');
29395
29340
  }
29396
29341
  }
29397
- const maintextHeight = this._mainTitle ? (_m = this._mainTitle) === null || _m === void 0 ? void 0 : _m.AABBBounds.height() : 0;
29398
- const maintextWidth = this._mainTitle ? (_o = this._mainTitle) === null || _o === void 0 ? void 0 : _o.AABBBounds.width() : 0;
29399
- if (((_p = this.attribute) === null || _p === void 0 ? void 0 : _p.visible) !== false && (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.visible) !== false) {
29400
- if (subtextStyle && vutils.isValid(subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.character)) {
29342
+ const maintextHeight = this._mainTitle ? (_3 = this._mainTitle) === null || _3 === void 0 ? void 0 : _3.AABBBounds.height() : 0;
29343
+ const maintextWidth = this._mainTitle ? (_4 = this._mainTitle) === null || _4 === void 0 ? void 0 : _4.AABBBounds.width() : 0;
29344
+ if (((_5 = this.attribute) === null || _5 === void 0 ? void 0 : _5.visible) !== false && (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.visible) !== false) {
29345
+ if (subtextType === 'rich') {
29346
+ 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);
29347
+ this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
29348
+ }
29349
+ else if (textType === 'html') {
29350
+ 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);
29351
+ this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
29352
+ }
29353
+ else if (subtextStyle && vutils.isValid(subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.character)) {
29401
29354
  const attr = {
29402
- x: (_q = subtextStyle.x) !== null && _q !== void 0 ? _q : 0,
29403
- y: (_r = subtextStyle.y) !== null && _r !== void 0 ? _r : maintextHeight,
29404
- width: (_t = (_s = subtextStyle.width) !== null && _s !== void 0 ? _s : width) !== null && _t !== void 0 ? _t : 0,
29405
- height: (_v = (_u = subtextStyle.height) !== null && _u !== void 0 ? _u : height) !== null && _v !== void 0 ? _v : 0,
29406
- ellipsis: (_w = subtextStyle.ellipsis) !== null && _w !== void 0 ? _w : true,
29407
- wordBreak: (_x = subtextStyle.wordBreak) !== null && _x !== void 0 ? _x : 'break-word',
29355
+ x: (_22 = subtextStyle.x) !== null && _22 !== void 0 ? _22 : 0,
29356
+ y: (_23 = subtextStyle.y) !== null && _23 !== void 0 ? _23 : maintextHeight,
29357
+ width: (_25 = (_24 = subtextStyle.width) !== null && _24 !== void 0 ? _24 : width) !== null && _25 !== void 0 ? _25 : 0,
29358
+ height: (_27 = (_26 = subtextStyle.height) !== null && _26 !== void 0 ? _26 : height) !== null && _27 !== void 0 ? _27 : 0,
29359
+ ellipsis: (_28 = subtextStyle.ellipsis) !== null && _28 !== void 0 ? _28 : true,
29360
+ wordBreak: (_29 = subtextStyle.wordBreak) !== null && _29 !== void 0 ? _29 : 'break-word',
29408
29361
  maxHeight: subtextStyle.maxHeight,
29409
29362
  maxWidth: subtextStyle.maxWidth,
29410
29363
  textConfig: subtextStyle.character
@@ -29412,17 +29365,17 @@
29412
29365
  this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
29413
29366
  }
29414
29367
  else if (vutils.isValid(subtext)) {
29415
- 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');
29368
+ 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');
29416
29369
  }
29417
29370
  }
29418
- const subtextHeight = this._subTitle ? (_0 = this._subTitle) === null || _0 === void 0 ? void 0 : _0.AABBBounds.height() : 0;
29419
- const subtextWidth = this._subTitle ? (_1 = this._subTitle) === null || _1 === void 0 ? void 0 : _1.AABBBounds.width() : 0;
29371
+ const subtextHeight = this._subTitle ? (_32 = this._subTitle) === null || _32 === void 0 ? void 0 : _32.AABBBounds.height() : 0;
29372
+ const subtextWidth = this._subTitle ? (_33 = this._subTitle) === null || _33 === void 0 ? void 0 : _33.AABBBounds.width() : 0;
29420
29373
  let titleWidth = Math.max(maintextWidth, subtextWidth);
29421
- let titleHeight = maintextHeight + ((_2 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _2 !== void 0 ? _2 : subtextHeight);
29374
+ let titleHeight = maintextHeight + ((_34 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _34 !== void 0 ? _34 : subtextHeight);
29422
29375
  if (vutils.isValid(width)) {
29423
29376
  titleWidth = width;
29424
- (_3 = this._mainTitle) === null || _3 === void 0 ? void 0 : _3.setAttribute('maxLineWidth', width);
29425
- (_4 = this._subTitle) === null || _4 === void 0 ? void 0 : _4.setAttribute('maxLineWidth', width);
29377
+ (_35 = this._mainTitle) === null || _35 === void 0 ? void 0 : _35.setAttribute('maxLineWidth', width);
29378
+ (_36 = this._subTitle) === null || _36 === void 0 ? void 0 : _36.setAttribute('maxLineWidth', width);
29426
29379
  }
29427
29380
  if (vutils.isValid(height)) {
29428
29381
  titleHeight = height;
@@ -29431,10 +29384,10 @@
29431
29384
  titleWidth = minWidth;
29432
29385
  }
29433
29386
  if (vutils.isValid(maxWidth)) {
29434
- (_5 = this._mainTitle) === null || _5 === void 0 ? void 0 : _5.setAttribute('maxLineWidth', maxWidth);
29435
- (_6 = this._subTitle) === null || _6 === void 0 ? void 0 : _6.setAttribute('maxLineWidth', maxWidth);
29436
- (_7 = this._mainTitle) === null || _7 === void 0 ? void 0 : _7.setAttribute('maxWidth', maxWidth);
29437
- (_8 = this._subTitle) === null || _8 === void 0 ? void 0 : _8.setAttribute('maxWidth', maxWidth);
29387
+ (_37 = this._mainTitle) === null || _37 === void 0 ? void 0 : _37.setAttribute('maxLineWidth', maxWidth);
29388
+ (_38 = this._subTitle) === null || _38 === void 0 ? void 0 : _38.setAttribute('maxLineWidth', maxWidth);
29389
+ (_39 = this._mainTitle) === null || _39 === void 0 ? void 0 : _39.setAttribute('maxWidth', maxWidth);
29390
+ (_40 = this._subTitle) === null || _40 === void 0 ? void 0 : _40.setAttribute('maxWidth', maxWidth);
29438
29391
  if (titleWidth > maxWidth) {
29439
29392
  titleWidth = maxWidth;
29440
29393
  }
@@ -29443,8 +29396,8 @@
29443
29396
  titleHeight = minHeight;
29444
29397
  }
29445
29398
  if (vutils.isValid(maxHeight)) {
29446
- (_9 = this._mainTitle) === null || _9 === void 0 ? void 0 : _9.setAttribute('maxHeight', maxHeight);
29447
- (_10 = this._subTitle) === null || _10 === void 0 ? void 0 : _10.setAttribute('maxHeight', maxHeight - maintextHeight);
29399
+ (_41 = this._mainTitle) === null || _41 === void 0 ? void 0 : _41.setAttribute('maxHeight', maxHeight);
29400
+ (_42 = this._subTitle) === null || _42 === void 0 ? void 0 : _42.setAttribute('maxHeight', maxHeight - maintextHeight);
29448
29401
  if (titleHeight > maxHeight) {
29449
29402
  titleHeight = maxHeight;
29450
29403
  }
@@ -29454,67 +29407,67 @@
29454
29407
  group.attribute.boundsPadding = parsedPadding;
29455
29408
  if (vutils.isValid(align) || vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.align)) {
29456
29409
  const mainTitleAlign = (textStyle === null || textStyle === void 0 ? void 0 : textStyle.align) ? textStyle === null || textStyle === void 0 ? void 0 : textStyle.align : align;
29457
- const mainTitleWidth = (_11 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.width) !== null && _11 !== void 0 ? _11 : maintextWidth;
29410
+ const mainTitleWidth = (_43 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.width) !== null && _43 !== void 0 ? _43 : maintextWidth;
29458
29411
  if (mainTitleAlign === 'left') {
29459
- (_12 = this._mainTitle) === null || _12 === void 0 ? void 0 : _12.setAttribute('x', 0);
29460
- (_13 = this._mainTitle) === null || _13 === void 0 ? void 0 : _13.setAttribute('textAlign', 'left');
29412
+ (_44 = this._mainTitle) === null || _44 === void 0 ? void 0 : _44.setAttribute('x', 0);
29413
+ (_45 = this._mainTitle) === null || _45 === void 0 ? void 0 : _45.setAttribute('textAlign', 'left');
29461
29414
  }
29462
29415
  else if (mainTitleAlign === 'center') {
29463
- (_14 = this._mainTitle) === null || _14 === void 0 ? void 0 : _14.setAttribute('x', mainTitleWidth / 2);
29464
- (_15 = this._mainTitle) === null || _15 === void 0 ? void 0 : _15.setAttribute('textAlign', 'center');
29416
+ (_46 = this._mainTitle) === null || _46 === void 0 ? void 0 : _46.setAttribute('x', mainTitleWidth / 2);
29417
+ (_47 = this._mainTitle) === null || _47 === void 0 ? void 0 : _47.setAttribute('textAlign', 'center');
29465
29418
  }
29466
29419
  else if (mainTitleAlign === 'right') {
29467
- (_16 = this._mainTitle) === null || _16 === void 0 ? void 0 : _16.setAttribute('x', mainTitleWidth);
29468
- (_17 = this._mainTitle) === null || _17 === void 0 ? void 0 : _17.setAttribute('textAlign', 'right');
29420
+ (_48 = this._mainTitle) === null || _48 === void 0 ? void 0 : _48.setAttribute('x', mainTitleWidth);
29421
+ (_49 = this._mainTitle) === null || _49 === void 0 ? void 0 : _49.setAttribute('textAlign', 'right');
29469
29422
  }
29470
29423
  }
29471
29424
  if (vutils.isValid(verticalAlign) || vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign)) {
29472
29425
  const mainTitleVerticalAlign = (textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign) ? textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign : verticalAlign;
29473
29426
  const mainTitleHeight = (textStyle === null || textStyle === void 0 ? void 0 : textStyle.height) ? textStyle === null || textStyle === void 0 ? void 0 : textStyle.height : titleHeight;
29474
29427
  if (mainTitleVerticalAlign === 'top') {
29475
- (_18 = this._mainTitle) === null || _18 === void 0 ? void 0 : _18.setAttribute('y', 0);
29476
- (_19 = this._mainTitle) === null || _19 === void 0 ? void 0 : _19.setAttribute('textBaseline', 'top');
29428
+ (_50 = this._mainTitle) === null || _50 === void 0 ? void 0 : _50.setAttribute('y', 0);
29429
+ (_51 = this._mainTitle) === null || _51 === void 0 ? void 0 : _51.setAttribute('textBaseline', 'top');
29477
29430
  }
29478
29431
  else if (mainTitleVerticalAlign === 'middle') {
29479
- (_20 = this._mainTitle) === null || _20 === void 0 ? void 0 : _20.setAttribute('y', mainTitleHeight / 2);
29480
- (_21 = this._mainTitle) === null || _21 === void 0 ? void 0 : _21.setAttribute('textBaseline', 'middle');
29432
+ (_52 = this._mainTitle) === null || _52 === void 0 ? void 0 : _52.setAttribute('y', mainTitleHeight / 2);
29433
+ (_53 = this._mainTitle) === null || _53 === void 0 ? void 0 : _53.setAttribute('textBaseline', 'middle');
29481
29434
  }
29482
29435
  else if (mainTitleVerticalAlign === 'bottom') {
29483
- (_22 = this._mainTitle) === null || _22 === void 0 ? void 0 : _22.setAttribute('y', mainTitleHeight);
29484
- (_23 = this._mainTitle) === null || _23 === void 0 ? void 0 : _23.setAttribute('textBaseline', 'bottom');
29436
+ (_54 = this._mainTitle) === null || _54 === void 0 ? void 0 : _54.setAttribute('y', mainTitleHeight);
29437
+ (_55 = this._mainTitle) === null || _55 === void 0 ? void 0 : _55.setAttribute('textBaseline', 'bottom');
29485
29438
  }
29486
29439
  }
29487
29440
  if (vutils.isValid(align) || vutils.isValid(subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.align)) {
29488
29441
  const subTitleAlign = (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.align) ? subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.align : align;
29489
- const subTitleWidth = (_24 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.width) !== null && _24 !== void 0 ? _24 : subtextWidth;
29442
+ const subTitleWidth = (_56 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.width) !== null && _56 !== void 0 ? _56 : subtextWidth;
29490
29443
  if (subTitleAlign === 'left') {
29491
- (_25 = this._subTitle) === null || _25 === void 0 ? void 0 : _25.setAttribute('x', 0);
29492
- (_26 = this._subTitle) === null || _26 === void 0 ? void 0 : _26.setAttribute('textAlign', 'left');
29444
+ (_57 = this._subTitle) === null || _57 === void 0 ? void 0 : _57.setAttribute('x', 0);
29445
+ (_58 = this._subTitle) === null || _58 === void 0 ? void 0 : _58.setAttribute('textAlign', 'left');
29493
29446
  }
29494
29447
  else if (subTitleAlign === 'center') {
29495
- (_27 = this._subTitle) === null || _27 === void 0 ? void 0 : _27.setAttribute('x', subTitleWidth / 2);
29496
- (_28 = this._subTitle) === null || _28 === void 0 ? void 0 : _28.setAttribute('textAlign', 'center');
29448
+ (_59 = this._subTitle) === null || _59 === void 0 ? void 0 : _59.setAttribute('x', subTitleWidth / 2);
29449
+ (_60 = this._subTitle) === null || _60 === void 0 ? void 0 : _60.setAttribute('textAlign', 'center');
29497
29450
  }
29498
29451
  else if (subTitleAlign === 'right') {
29499
- (_29 = this._subTitle) === null || _29 === void 0 ? void 0 : _29.setAttribute('x', subTitleWidth);
29500
- (_30 = this._subTitle) === null || _30 === void 0 ? void 0 : _30.setAttribute('textAlign', 'right');
29452
+ (_61 = this._subTitle) === null || _61 === void 0 ? void 0 : _61.setAttribute('x', subTitleWidth);
29453
+ (_62 = this._subTitle) === null || _62 === void 0 ? void 0 : _62.setAttribute('textAlign', 'right');
29501
29454
  }
29502
29455
  }
29503
29456
  if (vutils.isValid(verticalAlign) || vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign)) {
29504
29457
  const subTitleVerticalAlign = (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.verticalAlign) ? subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.verticalAlign : verticalAlign;
29505
29458
  const subTitleYStart = maintextHeight;
29506
- const subTitleHeight = (_31 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _31 !== void 0 ? _31 : 0;
29459
+ const subTitleHeight = (_63 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _63 !== void 0 ? _63 : 0;
29507
29460
  if (subTitleVerticalAlign === 'top') {
29508
- (_32 = this._subTitle) === null || _32 === void 0 ? void 0 : _32.setAttribute('y', subTitleYStart);
29509
- (_33 = this._subTitle) === null || _33 === void 0 ? void 0 : _33.setAttribute('textBaseline', 'top');
29461
+ (_64 = this._subTitle) === null || _64 === void 0 ? void 0 : _64.setAttribute('y', subTitleYStart);
29462
+ (_65 = this._subTitle) === null || _65 === void 0 ? void 0 : _65.setAttribute('textBaseline', 'top');
29510
29463
  }
29511
29464
  else if (subTitleVerticalAlign === 'middle') {
29512
- (_34 = this._subTitle) === null || _34 === void 0 ? void 0 : _34.setAttribute('y', subTitleYStart + subTitleHeight / 2);
29513
- (_35 = this._subTitle) === null || _35 === void 0 ? void 0 : _35.setAttribute('textBaseline', 'middle');
29465
+ (_66 = this._subTitle) === null || _66 === void 0 ? void 0 : _66.setAttribute('y', subTitleYStart + subTitleHeight / 2);
29466
+ (_67 = this._subTitle) === null || _67 === void 0 ? void 0 : _67.setAttribute('textBaseline', 'middle');
29514
29467
  }
29515
29468
  else if (subTitleVerticalAlign === 'bottom') {
29516
- (_36 = this._subTitle) === null || _36 === void 0 ? void 0 : _36.setAttribute('y', subTitleYStart + subTitleHeight);
29517
- (_37 = this._subTitle) === null || _37 === void 0 ? void 0 : _37.setAttribute('textBaseline', 'bottom');
29469
+ (_68 = this._subTitle) === null || _68 === void 0 ? void 0 : _68.setAttribute('y', subTitleYStart + subTitleHeight);
29470
+ (_69 = this._subTitle) === null || _69 === void 0 ? void 0 : _69.setAttribute('textBaseline', 'bottom');
29518
29471
  }
29519
29472
  }
29520
29473
  }
@@ -29569,7 +29522,7 @@
29569
29522
  this.name = 'indicator';
29570
29523
  }
29571
29524
  render() {
29572
- var _a;
29525
+ var _a, _b, _c;
29573
29526
  const { visible, title, content, size, limitRatio = Infinity } = this.attribute;
29574
29527
  const limit = Math.min(size.width, size.height) * limitRatio;
29575
29528
  const group = this.createOrUpdateChild('indicator-container', { x: 0, y: 0, zIndex: 1 }, 'group');
@@ -29580,7 +29533,15 @@
29580
29533
  if (vutils.isValid(title)) {
29581
29534
  if (title.visible !== false) {
29582
29535
  const titleStyle = vutils.merge({}, vutils.get(DEFAULT_INDICATOR_THEME, 'title.style'), title.style);
29583
- 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');
29536
+ if (titleStyle.type === 'rich') {
29537
+ 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');
29538
+ }
29539
+ else if (titleStyle.type === 'html') {
29540
+ 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');
29541
+ }
29542
+ else {
29543
+ 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');
29544
+ }
29584
29545
  if (title.autoFit && vutils.isValidNumber(limit)) {
29585
29546
  this._setAutoFit(limit, this._title, title);
29586
29547
  }
@@ -29601,9 +29562,19 @@
29601
29562
  const contentComponents = [];
29602
29563
  let lastContentHeight = 0;
29603
29564
  contents.forEach((contentItem, i) => {
29565
+ var _a, _b;
29604
29566
  if (contentItem.visible !== false) {
29605
29567
  const contentStyle = vutils.merge({}, vutils.get(DEFAULT_INDICATOR_THEME, 'content.style'), contentItem.style);
29606
- 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');
29568
+ let contentComponent;
29569
+ if (contentStyle.type === 'rich') {
29570
+ 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');
29571
+ }
29572
+ else if (contentStyle.type === 'html') {
29573
+ 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');
29574
+ }
29575
+ else {
29576
+ 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');
29577
+ }
29607
29578
  if (contentItem.autoFit && vutils.isValidNumber(limit)) {
29608
29579
  this._setAutoFit(limit, contentComponent, contentItem);
29609
29580
  }
@@ -29621,7 +29592,7 @@
29621
29592
  });
29622
29593
  this._content = contentComponents;
29623
29594
  }
29624
- const totalHeight = (_a = group === null || group === void 0 ? void 0 : group.AABBBounds.height()) !== null && _a !== void 0 ? _a : 0;
29595
+ const totalHeight = (_c = group === null || group === void 0 ? void 0 : group.AABBBounds.height()) !== null && _c !== void 0 ? _c : 0;
29625
29596
  group.setAttribute('y', size.height / 2 - totalHeight / 2);
29626
29597
  group.setAttribute('x', size.width / 2);
29627
29598
  }
@@ -30980,7 +30951,13 @@
30980
30951
  this._tooltipTitleSymbol = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_SHAPE_NAME_SUFFIX}`, vutils.merge({ symbolType: 'circle' }, titleAttr.shape, {
30981
30952
  visible: isVisible(titleAttr) && isVisible(titleAttr.shape)
30982
30953
  }), 'symbol');
30983
- if (titleAttr.value.multiLine) {
30954
+ if (titleAttr.value.type === 'rich') {
30955
+ 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');
30956
+ }
30957
+ else if (titleAttr.value.type === 'html') {
30958
+ 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');
30959
+ }
30960
+ else if (titleAttr.value.multiLine) {
30984
30961
  this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign({ visible: isVisible(titleAttr) && isVisible(titleAttr.value) }, getRichTextAttribute(titleAttr.value)), 'richtext');
30985
30962
  }
30986
30963
  else {
@@ -31025,9 +31002,7 @@
31025
31002
  let x = 0;
31026
31003
  if (isVisible(itemAttr.shape)) {
31027
31004
  itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_SHAPE_NAME_SUFFIX}`, Object.assign({ visible: true, x: itemAttr.shape.size / 2, y: itemAttr.shape.size / 2 +
31028
- (((_a = calculateLineHeight(itemAttr.key.lineHeight, itemAttr.key.fontSize)) !== null && _a !== void 0 ? _a : itemAttr.key.fontSize) -
31029
- itemAttr.shape.size) /
31030
- 2 }, itemAttr.shape), 'symbol');
31005
+ (((_a = itemAttr.key.lineHeight) !== null && _a !== void 0 ? _a : itemAttr.key.fontSize) - itemAttr.shape.size) / 2 }, itemAttr.shape), 'symbol');
31031
31006
  }
31032
31007
  if (hasContentShape) {
31033
31008
  x += itemAttr.shape.size + itemAttr.shape.spacing;
@@ -31408,7 +31383,7 @@
31408
31383
  }
31409
31384
  };
31410
31385
 
31411
- const version = "0.16.14-alpha.5";
31386
+ const version = "0.16.14-alpha.6";
31412
31387
 
31413
31388
  exports.AbstractComponent = AbstractComponent;
31414
31389
  exports.ArcInfo = ArcInfo;