@visactor/vchart 1.11.11 → 1.11.12-alpha.0

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 (87) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +162 -116
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/chart/base/base-chart.js +1 -1
  6. package/cjs/chart/base/base-chart.js.map +1 -1
  7. package/cjs/chart/stack.js +1 -2
  8. package/cjs/chart/util.js +2 -1
  9. package/cjs/chart/util.js.map +1 -1
  10. package/cjs/compile/grammar-item.js +2 -1
  11. package/cjs/component/axis/mixin/linear-axis-mixin.js +1 -1
  12. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  13. package/cjs/component/brush/brush.js +2 -1
  14. package/cjs/component/brush/brush.js.map +1 -1
  15. package/cjs/component/legend/base-legend.js +2 -1
  16. package/cjs/component/legend/base-legend.js.map +1 -1
  17. package/cjs/core/index.d.ts +1 -1
  18. package/cjs/core/index.js +1 -1
  19. package/cjs/core/index.js.map +1 -1
  20. package/cjs/core/interface.d.ts +15 -3
  21. package/cjs/core/interface.js.map +1 -1
  22. package/cjs/core/vchart.js +9 -8
  23. package/cjs/core/vchart.js.map +1 -1
  24. package/cjs/data/transforms/pie.d.ts +4 -4
  25. package/cjs/data/transforms/pie.js +1 -1
  26. package/cjs/data/transforms/pie.js.map +1 -1
  27. package/cjs/event/events/dimension/util/cartesian.js +1 -2
  28. package/cjs/event/events/dimension/util/cartesian.js.map +1 -1
  29. package/cjs/event/events/dimension/util/polar.js +1 -2
  30. package/cjs/event/events/dimension/util/polar.js.map +1 -1
  31. package/cjs/layout/base-layout.js +3 -2
  32. package/cjs/layout/base-layout.js.map +1 -1
  33. package/cjs/model/interface.d.ts +1 -0
  34. package/cjs/model/interface.js.map +1 -1
  35. package/cjs/series/funnel/funnel.js +1 -1
  36. package/cjs/series/funnel/funnel.js.map +1 -1
  37. package/cjs/series/gauge/gauge.js +3 -3
  38. package/cjs/series/gauge/gauge.js.map +1 -1
  39. package/cjs/series/pie/pie.js +12 -10
  40. package/cjs/series/pie/pie.js.map +1 -1
  41. package/cjs/util/env.js +1 -1
  42. package/cjs/util/env.js.map +1 -1
  43. package/cjs/util/math.d.ts +1 -0
  44. package/cjs/util/math.js +9 -2
  45. package/cjs/util/math.js.map +1 -1
  46. package/esm/chart/base/base-chart.js +2 -2
  47. package/esm/chart/base/base-chart.js.map +1 -1
  48. package/esm/chart/stack.js +1 -2
  49. package/esm/chart/util.js +2 -1
  50. package/esm/chart/util.js.map +1 -1
  51. package/esm/compile/grammar-item.js +2 -1
  52. package/esm/component/axis/mixin/linear-axis-mixin.js +1 -1
  53. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  54. package/esm/component/brush/brush.js +2 -1
  55. package/esm/component/brush/brush.js.map +1 -1
  56. package/esm/component/legend/base-legend.js +2 -1
  57. package/esm/component/legend/base-legend.js.map +1 -1
  58. package/esm/core/index.d.ts +1 -1
  59. package/esm/core/index.js +1 -1
  60. package/esm/core/index.js.map +1 -1
  61. package/esm/core/interface.d.ts +15 -3
  62. package/esm/core/interface.js.map +1 -1
  63. package/esm/core/vchart.js +9 -8
  64. package/esm/core/vchart.js.map +1 -1
  65. package/esm/data/transforms/pie.d.ts +4 -4
  66. package/esm/data/transforms/pie.js +1 -1
  67. package/esm/data/transforms/pie.js.map +1 -1
  68. package/esm/event/events/dimension/util/cartesian.js +0 -3
  69. package/esm/event/events/dimension/util/cartesian.js.map +1 -1
  70. package/esm/event/events/dimension/util/polar.js +0 -3
  71. package/esm/event/events/dimension/util/polar.js.map +1 -1
  72. package/esm/layout/base-layout.js +3 -2
  73. package/esm/layout/base-layout.js.map +1 -1
  74. package/esm/model/interface.d.ts +1 -0
  75. package/esm/model/interface.js.map +1 -1
  76. package/esm/series/funnel/funnel.js +1 -1
  77. package/esm/series/funnel/funnel.js.map +1 -1
  78. package/esm/series/gauge/gauge.js +4 -2
  79. package/esm/series/gauge/gauge.js.map +1 -1
  80. package/esm/series/pie/pie.js +12 -10
  81. package/esm/series/pie/pie.js.map +1 -1
  82. package/esm/util/env.js +1 -1
  83. package/esm/util/env.js.map +1 -1
  84. package/esm/util/math.d.ts +1 -0
  85. package/esm/util/math.js +6 -0
  86. package/esm/util/math.js.map +1 -1
  87. package/package.json +16 -16
package/build/index.js CHANGED
@@ -17531,20 +17531,21 @@
17531
17531
  this.frame.lines.push(line), this.frame.actualHeight += line.height, this.y += line.height, this.lineBuffer.length = 0, this.lineWidth = this.maxAscent = this.maxDescent = this.maxAscentForBlank = this.maxDescentForBlank = 0;
17532
17532
  }
17533
17533
  deal(paragraph) {
17534
- paragraph instanceof RichTextIcon ? "horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : 0 === this.lineBuffer.length ? (this.store(paragraph), this.send()) : (this.send(), this.deal(paragraph)) : "number" != typeof this.width || this.width < 0 || (paragraph.newLine && this.send(), 0 !== paragraph.text.length && ("horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : this.lineWidth === this[this.directionKey.width] ? (this.send(), this.deal(paragraph)) : this.cut(paragraph)));
17534
+ let singleLine = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
17535
+ paragraph instanceof RichTextIcon ? "horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : 0 === this.lineBuffer.length ? (this.store(paragraph), this.send()) : (this.send(), this.deal(paragraph)) : "number" != typeof this.width || this.width < 0 || (paragraph.newLine && this.send(), 0 !== paragraph.text.length && ("horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : this.lineWidth === this[this.directionKey.width] ? (this.send(), this.deal(paragraph)) : this.cut(paragraph, singleLine)));
17535
17536
  }
17536
- cut(paragraph) {
17537
+ cut(paragraph, singleLine) {
17537
17538
  const availableWidth = this[this.directionKey.width] - this.lineWidth || 0,
17538
17539
  guessIndex = Math.ceil(availableWidth / paragraph[this.directionKey.width] * paragraph.length) || 0,
17539
17540
  index = getStrByWithCanvas(paragraph.text, availableWidth, paragraph.character, guessIndex, "break-word" === this.frame.wordBreak);
17540
17541
  if (0 !== index) {
17541
17542
  const [p1, p2] = seperateParagraph(paragraph, index);
17542
- this.store(p1), this.deal(p2);
17543
+ this.store(p1), singleLine ? this.send() : this.deal(p2);
17543
17544
  } else 0 !== this.lineBuffer.length && (this.send(), this.deal(paragraph));
17544
17545
  }
17545
17546
  }
17546
17547
 
17547
- const RICHTEXT_UPDATE_TAG_KEY = ["width", "height", "ellipsis", "wordBreak", "verticalDirection", "maxHeight", "maxWidth", "textAlign", "textBaseline", "textConfig", "layoutDirection", ...GRAPHIC_UPDATE_TAG_KEY];
17548
+ const RICHTEXT_UPDATE_TAG_KEY = ["width", "height", "ellipsis", "wordBreak", "verticalDirection", "maxHeight", "maxWidth", "textAlign", "textBaseline", "textConfig", "layoutDirection", "fill", "stroke", "fontSize", ...GRAPHIC_UPDATE_TAG_KEY];
17548
17549
  class RichText extends Graphic {
17549
17550
  constructor(params) {
17550
17551
  super(params), this.type = "richtext", this._currentHoverIcon = null, this.numberType = RICHTEXT_NUMBER_TYPE;
@@ -17716,7 +17717,7 @@
17716
17717
  skip = !1;
17717
17718
  for (let i = 0; i < paragraphs.length; i++) {
17718
17719
  const p = paragraphs[i];
17719
- skip ? (p.overflow = !0, p.left = 1 / 0, p.top = 1 / 0, !p.newLine && frame.lines[frame.lines.length - 1].paragraphs.push(p)) : wrapper.deal(p), frame.lines.length !== lineCount && (lineCount = frame.lines.length, wrapper.lineBuffer.length = 0, p.overflow = !0, p.left = 1e3, p.top = 1e3, frame.lines[frame.lines.length - 1].paragraphs.push(p), skip = !0), p.newLine && (skip = !1, wrapper.lineWidth = 0);
17720
+ skip ? (p.overflow = !0, p.left = 1 / 0, p.top = 1 / 0, !p.newLine && frame.lines[frame.lines.length - 1].paragraphs.push(p)) : wrapper.deal(p, !0), frame.lines.length !== lineCount && (lineCount = frame.lines.length, wrapper.lineBuffer.length = 0, p.overflow = !0, p.left = 1e3, p.top = 1e3, frame.lines[frame.lines.length - 1].paragraphs.push(p), skip = !0), p.newLine && (skip = !1, wrapper.lineWidth = 0), wrapper.send();
17720
17721
  }
17721
17722
  } else for (let i = 0; i < paragraphs.length; i++) wrapper.deal(paragraphs[i]);
17722
17723
  wrapper.send();
@@ -17757,10 +17758,11 @@
17757
17758
  let pickIcon;
17758
17759
  return frameCache.icons.forEach(icon => {
17759
17760
  var _a, _b;
17760
- icon.AABBBounds.containsPoint({
17761
+ const bounds = icon.AABBBounds.clone();
17762
+ bounds.translate(icon._marginArray[3], icon._marginArray[0]), bounds.containsPoint({
17761
17763
  x: point.x - x,
17762
17764
  y: point.y - y
17763
- }) && (pickIcon = icon, pickIcon.globalX = (null !== (_a = pickIcon.attribute.x) && void 0 !== _a ? _a : 0) + x, pickIcon.globalY = (null !== (_b = pickIcon.attribute.y) && void 0 !== _b ? _b : 0) + y);
17765
+ }) && (pickIcon = icon, pickIcon.globalX = (null !== (_a = pickIcon.attribute.x) && void 0 !== _a ? _a : 0) + x + icon._marginArray[3], pickIcon.globalY = (null !== (_b = pickIcon.attribute.y) && void 0 !== _b ? _b : 0) + y + icon._marginArray[0]);
17764
17766
  }), pickIcon;
17765
17767
  }
17766
17768
  getNoWorkAnimateAttr() {
@@ -19864,7 +19866,7 @@
19864
19866
  const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
19865
19867
 
19866
19868
  const halfPi = pi$1 / 2;
19867
- function createRectPath(path, x, y, width, height, rectCornerRadius) {
19869
+ function createRectPath(path, x, y, width, height, rectCornerRadius, edgeCb) {
19868
19870
  let cornerRadius;
19869
19871
  if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs$1(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
19870
19872
  const cornerRadiusArr = rectCornerRadius;
@@ -19896,27 +19898,28 @@
19896
19898
  rightBottomPoint2 = [rightBottom[0], rightBottom[1] - _cornerRadius[2]],
19897
19899
  leftBottomPoint1 = [leftBottom[0] + _cornerRadius[3], leftBottom[1]],
19898
19900
  leftBottomPoint2 = [leftBottom[0], leftBottom[1] - _cornerRadius[3]];
19899
- if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
19901
+ if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
19902
+ edgeCb && edgeCb[0] && path.moveTo(rightTopPoint1[0], rightTopPoint1[1]);
19900
19903
  const centerX = rightTopPoint1[0],
19901
19904
  centerY = rightTopPoint1[1] + _cornerRadius[1];
19902
19905
  path.arc(centerX, centerY, _cornerRadius[1], -halfPi, 0, !1);
19903
19906
  }
19904
- if (path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
19907
+ if (edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint2[0], rightTopPoint2[1], rightBottomPoint2[0], rightBottomPoint2[1]) : path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
19905
19908
  const centerX = rightBottomPoint2[0] - _cornerRadius[2],
19906
19909
  centerY = rightBottomPoint2[1];
19907
- path.arc(centerX, centerY, _cornerRadius[2], 0, halfPi, !1);
19910
+ edgeCb && edgeCb[1] && path.moveTo(rightBottomPoint2[0], rightBottomPoint2[1]), path.arc(centerX, centerY, _cornerRadius[2], 0, halfPi, !1);
19908
19911
  }
19909
- if (path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
19912
+ if (edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint1[0], rightBottomPoint1[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
19910
19913
  const centerX = leftBottomPoint1[0],
19911
19914
  centerY = leftBottomPoint1[1] - _cornerRadius[3];
19912
- path.arc(centerX, centerY, _cornerRadius[3], halfPi, pi$1, !1);
19915
+ edgeCb && edgeCb[2] && path.moveTo(leftBottomPoint1[0], leftBottomPoint1[1]), path.arc(centerX, centerY, _cornerRadius[3], halfPi, pi$1, !1);
19913
19916
  }
19914
- if (path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
19917
+ if (edgeCb && edgeCb[3] ? edgeCb[3](leftBottomPoint2[0], leftBottomPoint2[1], leftTopPoint2[0], leftTopPoint2[1]) : path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
19915
19918
  const centerX = leftTopPoint1[0],
19916
19919
  centerY = leftTopPoint1[1] + _cornerRadius[0];
19917
- path.arc(centerX, centerY, _cornerRadius[0], pi$1, pi$1 + halfPi, !1);
19920
+ edgeCb && edgeCb[3] && path.moveTo(leftTopPoint2[0], leftTopPoint2[1]), path.arc(centerX, centerY, _cornerRadius[0], pi$1, pi$1 + halfPi, !1);
19918
19921
  }
19919
- return path.closePath(), path;
19922
+ return !edgeCb && path.closePath(), path;
19920
19923
  }
19921
19924
 
19922
19925
  var __decorate$1w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
@@ -20005,14 +20008,24 @@
20005
20008
  y1: y1,
20006
20009
  x: originX = groupAttribute.x,
20007
20010
  y: originY = groupAttribute.y,
20008
- stroke = groupAttribute.stroke
20011
+ stroke = groupAttribute.stroke,
20012
+ cornerRadius = groupAttribute.cornerRadius
20009
20013
  } = rect.attribute;
20010
20014
  let {
20011
20015
  width: width,
20012
20016
  height: height
20013
20017
  } = rect.attribute;
20014
20018
  if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) {
20015
- if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), context.beginPath(), context.moveTo(x, y), stroke[0] ? context.lineTo(x + width, y) : context.moveTo(x + width, y), stroke[1] ? context.lineTo(x + width, y + height) : context.moveTo(x + width, y + height), stroke[2] ? context.lineTo(x, y + height) : context.moveTo(x, y + height), stroke[3]) {
20019
+ if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num))) {
20020
+ let lastStroke,
20021
+ lastStrokeI = 0;
20022
+ return createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
20023
+ stroke[i] && (lastStrokeI === i - 1 && stroke[i] === lastStroke || (context.setStrokeStyle(rect, Object.assign(Object.assign({}, rect.attribute), {
20024
+ stroke: stroke[i]
20025
+ }), x, y, groupAttribute), context.beginPath(), context.moveTo(x1, y1), lastStroke = stroke[i]), lastStrokeI = i, context.lineTo(x2, y2), context.stroke(), 3 === i && context.beginPath());
20026
+ })), void context.stroke();
20027
+ }
20028
+ if (context.beginPath(), context.moveTo(x, y), stroke[0] ? context.lineTo(x + width, y) : context.moveTo(x + width, y), stroke[1] ? context.lineTo(x + width, y + height) : context.moveTo(x + width, y + height), stroke[2] ? context.lineTo(x, y + height) : context.moveTo(x, y + height), stroke[3]) {
20016
20029
  const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;
20017
20030
  context.lineTo(x, adjustY);
20018
20031
  } else context.moveTo(x, y);
@@ -20921,9 +20934,9 @@
20921
20934
  data = this.valid(area, areaAttribute, fillCb, strokeCb);
20922
20935
  if (!data) return;
20923
20936
  const {
20924
- doFill: doFill,
20925
- doStroke: doStroke
20937
+ doFill: doFill
20926
20938
  } = data,
20939
+ doStroke = data.doStroke && data.sVisible,
20927
20940
  {
20928
20941
  clipRange = areaAttribute.clipRange,
20929
20942
  closePath: closePath,
@@ -21740,7 +21753,9 @@
21740
21753
  clip: clip,
21741
21754
  baseOpacity = 1
21742
21755
  } = group.attribute;
21743
- clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
21756
+ clip ? context.save() : context.highPerformanceSave();
21757
+ const baseGlobalAlpha = context.baseGlobalAlpha;
21758
+ context.baseGlobalAlpha *= baseOpacity;
21744
21759
  const groupAttribute = getTheme$1(group, null == params ? void 0 : params.theme).group,
21745
21760
  lastModelMatrix = context.modelMatrix;
21746
21761
  if (context.camera) {
@@ -21754,7 +21769,7 @@
21754
21769
  scrollY = groupAttribute.scrollY
21755
21770
  } = group.attribute;
21756
21771
  let p;
21757
- (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(() => {
21772
+ (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha = baseGlobalAlpha, p && p.then ? p.then(() => {
21758
21773
  clip ? context.restore() : context.highPerformanceRestore();
21759
21774
  }) : clip ? context.restore() : context.highPerformanceRestore();
21760
21775
  }
@@ -21887,7 +21902,7 @@
21887
21902
  const m = graphic.globalTransMatrix.getInverse();
21888
21903
  drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m), drawContribution.backupDirtyBounds.copy(drawContribution.dirtyBounds);
21889
21904
  }
21890
- return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && (drawContribution.dirtyBounds.copy(tempDirtyBounds), drawContribution.backupDirtyBounds.copy(tempBackupDirtyBounds)), !0;
21905
+ return drawContribution.renderGroup(graphic.shadowRoot, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0)), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && (drawContribution.dirtyBounds.copy(tempDirtyBounds), drawContribution.backupDirtyBounds.copy(tempBackupDirtyBounds)), !0;
21891
21906
  }
21892
21907
  }
21893
21908
  class DebugDrawItemInterceptorContribution {
@@ -25564,7 +25579,7 @@
25564
25579
  return isMiniAppLikeMode(mode) || mode === 'mobile-browser';
25565
25580
  }
25566
25581
  function isMiniAppLikeMode(mode) {
25567
- return mode.includes('miniApp') || mode === 'lynx' || mode === 'wx';
25582
+ return mode.includes('miniApp') || mode === 'lynx' || mode === 'wx' || mode === 'harmony';
25568
25583
  }
25569
25584
 
25570
25585
  let VChartId = 0;
@@ -26486,7 +26501,7 @@
26486
26501
  opacity = defaultParams.opacity,
26487
26502
  fill = defaultParams.fill
26488
26503
  } = attribute;
26489
- fillOpacity > 1e-12 && opacity > 1e-12 ? (_context.globalAlpha = fillOpacity * opacity * this.baseGlobalAlpha, _context.fillStyle = createColor(this, fill, params, offsetX, offsetY)) : _context.globalAlpha = fillOpacity * opacity * this.baseGlobalAlpha;
26504
+ _context.globalAlpha = fillOpacity * opacity * this.baseGlobalAlpha, fillOpacity > 1e-12 && opacity > 1e-12 && (_context.fillStyle = createColor(this, fill, params, offsetX, offsetY));
26490
26505
  }
26491
26506
  setShadowBlendStyle(params, attribute, defaultParams) {
26492
26507
  if (Array.isArray(defaultParams)) {
@@ -26529,7 +26544,7 @@
26529
26544
  strokeOpacity = defaultParams.strokeOpacity,
26530
26545
  opacity = defaultParams.opacity
26531
26546
  } = attribute;
26532
- if (strokeOpacity > 1e-12 && opacity > 1e-12) {
26547
+ if (_context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, strokeOpacity > 1e-12 && opacity > 1e-12) {
26533
26548
  const {
26534
26549
  lineWidth = defaultParams.lineWidth,
26535
26550
  stroke = defaultParams.stroke,
@@ -26538,7 +26553,7 @@
26538
26553
  lineCap = defaultParams.lineCap,
26539
26554
  miterLimit = defaultParams.miterLimit
26540
26555
  } = attribute;
26541
- _context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
26556
+ _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
26542
26557
  }
26543
26558
  }
26544
26559
  setTextStyleWithoutAlignBaseline(params, defaultParams, z) {
@@ -34531,6 +34546,21 @@
34531
34546
  labelPoint = getVerticalCoord(point, getCircleVerticalVector(labelOffset, point, center, inside));
34532
34547
  return getCircleLabelPosition(labelPoint, getCircleVerticalVector(labelOffset || 1, labelPoint, center, inside), text, style);
34533
34548
  }
34549
+ function getCirclePoints(center, count, radius, startAngle, endAngle) {
34550
+ const points = [],
34551
+ range = endAngle - startAngle;
34552
+ for (let i = 0; i < count; i++) {
34553
+ const angle = startAngle + i * range / count;
34554
+ points.push(polarToCartesian$1(center, radius, angle));
34555
+ }
34556
+ return points;
34557
+ }
34558
+ function getPolygonPath(points, closed) {
34559
+ let path = "";
34560
+ return 0 === points.length || (points.forEach((point, index) => {
34561
+ 0 === index ? path = `M${point.x},${point.y}` : path += `L${point.x},${point.y}`;
34562
+ }), closed && (path += "Z")), path;
34563
+ }
34534
34564
 
34535
34565
  const dispatchHoverState = (e, container, lastHover) => {
34536
34566
  const target = e.target;
@@ -34601,7 +34631,8 @@
34601
34631
  axisContainer = graphicCreator.group({
34602
34632
  x: 0,
34603
34633
  y: 0,
34604
- zIndex: 1
34634
+ zIndex: 1,
34635
+ pickable: !1
34605
34636
  });
34606
34637
  if (axisContainer.name = AXIS_ELEMENT_NAME.axisContainer, axisContainer.id = this._getNodeId("container"), axisContainer.setMode(this.mode), this.axisContainer = axisContainer, container.add(axisContainer), line && line.visible && this.renderLine(axisContainer), items && items.length && (this.data = this._transformItems(items[0]), tick && tick.visible && this.renderTicks(axisContainer), label && label.visible)) {
34607
34638
  const labelGroup = graphicCreator.group({
@@ -35552,19 +35583,27 @@
35552
35583
  center: center,
35553
35584
  innerRadius = 0,
35554
35585
  line = {},
35555
- inside = !1
35586
+ inside = !1,
35587
+ sides: sides
35556
35588
  } = this.attribute;
35557
- let arcRadius = radius,
35589
+ let lineGraphic,
35590
+ arcRadius = radius,
35558
35591
  arcInnerRadius = innerRadius;
35559
- inside && innerRadius > 0 && (arcRadius = innerRadius, arcInnerRadius = 0);
35560
- const arcAttrs = Object.assign(Object.assign(Object.assign({}, center), {
35592
+ if (inside && innerRadius > 0 && (arcRadius = innerRadius, arcInnerRadius = 0), isValidNumber$1(sides) && sides >= 3) {
35593
+ const gridPoints = getCirclePoints(center, sides, arcRadius, startAngle, endAngle);
35594
+ lineGraphic = graphicCreator.path(Object.assign(Object.assign({}, line.style), {
35595
+ path: getPolygonPath(gridPoints, !0)
35596
+ }));
35597
+ } else {
35598
+ const arcAttrs = Object.assign(Object.assign(Object.assign({}, center), {
35561
35599
  startAngle: startAngle,
35562
35600
  endAngle: endAngle,
35563
35601
  radius: arcRadius,
35564
35602
  innerRadius: arcInnerRadius
35565
- }), line.style),
35566
- axisLine = graphicCreator.circle(arcAttrs);
35567
- axisLine.name = AXIS_ELEMENT_NAME.line, axisLine.id = this._getNodeId("line"), isEmpty(line.state) || (axisLine.states = merge$2({}, DEFAULT_STATES$1, line.state)), container.add(axisLine);
35603
+ }), line.style);
35604
+ lineGraphic = graphicCreator.circle(arcAttrs);
35605
+ }
35606
+ lineGraphic.name = AXIS_ELEMENT_NAME.line, lineGraphic.id = this._getNodeId("line"), isEmpty(line.state) || (lineGraphic.states = merge$2({}, DEFAULT_STATES$1, line.state)), container.add(lineGraphic);
35568
35607
  }
35569
35608
  getTitleAttribute() {
35570
35609
  var _a, _b, _c;
@@ -35718,7 +35757,7 @@
35718
35757
  onStart() {
35719
35758
  let duration = this.duration,
35720
35759
  easing = this.easing;
35721
- Object.keys(this._newElementAttrMap).forEach(id => {
35760
+ this._newElementAttrMap && Object.keys(this._newElementAttrMap).forEach(id => {
35722
35761
  var _a;
35723
35762
  const {
35724
35763
  node: node,
@@ -37120,12 +37159,6 @@
37120
37159
  return convertDomainToTickData(scale.domain());
37121
37160
  };
37122
37161
 
37123
- function getLinePath(points, closed) {
37124
- let path = "";
37125
- return 0 === points.length || (points.forEach((point, index) => {
37126
- 0 === index ? path = `M${point.x},${point.y}` : path += `L${point.x},${point.y}`;
37127
- }), closed && (path += "Z")), path;
37128
- }
37129
37162
  function getArcPath(center, points, reverse, closed) {
37130
37163
  let path = "";
37131
37164
  if (!center || 0 === points.length) return path;
@@ -37148,7 +37181,7 @@
37148
37181
  const fromStart = from[0],
37149
37182
  toEnd = reversePoints[0],
37150
37183
  center = attribute.center;
37151
- regionPath = getLinePath(from, !!closed), nextPath = getLinePath(reversePoints, !!closed);
37184
+ regionPath = getPolygonPath(from, !!closed), nextPath = getPolygonPath(reversePoints, !!closed);
37152
37185
  const toEndRadius = PointService.distancePP(toEnd, center),
37153
37186
  fromStartRadius = PointService.distancePP(fromStart, center);
37154
37187
  regionPath += `A${toEndRadius},${toEndRadius},0,0,1,${toEnd.x},${toEnd.y}L${toEnd.x},${toEnd.y}`, nextPath += `A${fromStartRadius},${fromStartRadius},0,0,0,${fromStart.x},${fromStart.y}`;
@@ -37157,7 +37190,7 @@
37157
37190
  center: center
37158
37191
  } = attribute;
37159
37192
  regionPath = getArcPath(center, from, !1, !!closed), nextPath = getArcPath(center, reversePoints, !0, !!closed);
37160
- } else "line" !== type && "polygon" !== type || (regionPath = getLinePath(from, !!closed), nextPath = getLinePath(reversePoints, !!closed));
37193
+ } else "line" !== type && "polygon" !== type || (regionPath = getPolygonPath(from, !!closed), nextPath = getPolygonPath(reversePoints, !!closed));
37161
37194
  return closed ? regionPath += nextPath : (nextPath = "L" + nextPath.substring(1), regionPath += nextPath, regionPath += "Z"), regionPath;
37162
37195
  }
37163
37196
  class BaseGrid extends AbstractComponent {
@@ -37218,7 +37251,7 @@
37218
37251
  points: points
37219
37252
  } = item;
37220
37253
  let path = "";
37221
- if ("line" === type || "polygon" === type) path = getLinePath(points, !!closed);else if ("circle" === type) {
37254
+ if ("line" === type || "polygon" === type) path = getPolygonPath(points, !!closed);else if ("circle" === type) {
37222
37255
  const {
37223
37256
  center: center
37224
37257
  } = this.attribute;
@@ -37244,7 +37277,7 @@
37244
37277
  x: points[0].x + dir_x * ratio,
37245
37278
  y: points[0].y + dir_y * ratio
37246
37279
  });
37247
- const path = getLinePath(nextPoints, !!closed),
37280
+ const path = getPolygonPath(nextPoints, !!closed),
37248
37281
  deltaX = abs$1(nextPoints[0].x - nextPoints[1].x),
37249
37282
  deltaY = abs$1(nextPoints[0].y - nextPoints[1].y),
37250
37283
  shape = graphicCreator.path(Object.assign({
@@ -37294,15 +37327,6 @@
37294
37327
  }
37295
37328
  };
37296
37329
 
37297
- function getCirclePoints(center, count, radius, startAngle, endAngle) {
37298
- const points = [],
37299
- range = endAngle - startAngle;
37300
- for (let i = 0; i < count; i++) {
37301
- const angle = startAngle + i * range / count;
37302
- points.push(polarToCartesian$1(center, radius, angle));
37303
- }
37304
- return points;
37305
- }
37306
37330
  loadLineAxisGridComponent();
37307
37331
  class LineAxisGrid extends BaseGrid {
37308
37332
  constructor(attributes, options) {
@@ -37317,12 +37341,13 @@
37317
37341
  gridPoints = [point, this.getVerticalCoord(point, length, !0)];
37318
37342
  } else if ("circle" === gridType || "polygon" === gridType) {
37319
37343
  const {
37320
- center: center,
37321
- sides = 6,
37322
- startAngle = POLAR_START_ANGLE$1,
37323
- endAngle = POLAR_END_ANGLE$1
37324
- } = this.attribute;
37325
- gridPoints = getCirclePoints(center, sides, PointService.distancePP(center, point), startAngle, endAngle);
37344
+ center: center,
37345
+ sides = 6,
37346
+ startAngle = POLAR_START_ANGLE$1,
37347
+ endAngle = POLAR_END_ANGLE$1
37348
+ } = this.attribute,
37349
+ distance = PointService.distancePP(center, point);
37350
+ gridPoints = getCirclePoints(center, sides, distance, startAngle, endAngle);
37326
37351
  }
37327
37352
  return gridPoints;
37328
37353
  }
@@ -40709,12 +40734,13 @@
40709
40734
  _createPager(compStyle) {
40710
40735
  var _a, _b;
40711
40736
  const {
40712
- disableTriggerEvent: disableTriggerEvent,
40713
- maxRow: maxRow
40714
- } = this.attribute;
40737
+ disableTriggerEvent: disableTriggerEvent,
40738
+ maxRow: maxRow
40739
+ } = this.attribute,
40740
+ estimateTotal = num => num <= 99 ? 99 : num <= 999 ? 999 : 9999;
40715
40741
  return this._itemContext.isHorizontal ? new Pager(Object.assign(Object.assign({
40716
40742
  layout: 1 === maxRow ? "horizontal" : "vertical",
40717
- total: 99
40743
+ total: estimateTotal(this._itemContext.pages)
40718
40744
  }, merge$2({
40719
40745
  handler: {
40720
40746
  preShape: "triangleUp",
@@ -40725,7 +40751,7 @@
40725
40751
  disableTriggerEvent: disableTriggerEvent
40726
40752
  })) : new Pager(Object.assign({
40727
40753
  layout: "horizontal",
40728
- total: 99,
40754
+ total: estimateTotal(this._itemContext.pages),
40729
40755
  disableTriggerEvent: disableTriggerEvent,
40730
40756
  defaultCurrent: null === (_b = this.attribute.pager) || void 0 === _b ? void 0 : _b.defaultCurrent
40731
40757
  }, compStyle));
@@ -43762,6 +43788,14 @@
43762
43788
  }
43763
43789
  return seats.map(entry => entry / digits);
43764
43790
  }
43791
+ function valueInRange(v, range) {
43792
+ if (!range) {
43793
+ return v;
43794
+ }
43795
+ const min = Math.min(range[0], range[range.length - 1]);
43796
+ const max = Math.max(range[0], range[range.length - 1]);
43797
+ return Math.min(Math.max(min, v), max);
43798
+ }
43765
43799
 
43766
43800
  function eachSeries(regions, callback, filter) {
43767
43801
  let flag = false;
@@ -55877,10 +55911,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
55877
55911
  if (!chart) {
55878
55912
  return null;
55879
55913
  }
55880
- const series = getFirstSeries(chart.getRegionsInIndex(), 'polar');
55881
- if (!series) {
55882
- return null;
55883
- }
55884
55914
  const { x, y } = pos;
55885
55915
  const angleAxisList = getAxis(chart, (cmp) => cmp.getOrient() === 'angle', pos);
55886
55916
  const radiusAxisList = getAxis(chart, (cmp) => cmp.getOrient() === 'radius', pos);
@@ -56025,10 +56055,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
56025
56055
  if (!chart) {
56026
56056
  return null;
56027
56057
  }
56028
- const series = getFirstSeries(chart.getRegionsInIndex(), 'cartesian');
56029
- if (!series) {
56030
- return null;
56031
- }
56032
56058
  const { x, y } = pos;
56033
56059
  const xAxisList = (_a = getAxis(chart, (cmp) => isXAxis(cmp.getOrient()), pos)) !== null && _a !== void 0 ? _a : [];
56034
56060
  const yAxisList = (_b = getAxis(chart, (cmp) => isYAxis(cmp.getOrient()), pos)) !== null && _b !== void 0 ? _b : [];
@@ -57556,7 +57582,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
57556
57582
  reRender: merge('reRender'),
57557
57583
  reSize: merge('reSize'),
57558
57584
  reTransformSpec: merge('reTransformSpec'),
57559
- changeTheme: merge('changeTheme')
57585
+ changeTheme: merge('changeTheme'),
57586
+ changeBackground: merge('changeBackground')
57560
57587
  });
57561
57588
  return target;
57562
57589
  }
@@ -59684,9 +59711,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59684
59711
  const regionWidth = Math.max(Math.min(regionRelativeTotalWidth, ...regionItems.map(region => { var _a; return (_a = region.maxWidth) !== null && _a !== void 0 ? _a : Number.MAX_VALUE; })), 0);
59685
59712
  const regionHeight = Math.max(Math.min(regionRelativeTotalHeight, ...regionItems.map(region => { var _a; return (_a = region.maxHeight) !== null && _a !== void 0 ? _a : Number.MAX_VALUE; })), 0);
59686
59713
  regionItems.forEach(region => {
59714
+ const width = regionWidth - region.layoutPaddingLeft - region.layoutPaddingRight;
59715
+ const height = regionHeight - region.layoutPaddingTop - region.layoutPaddingBottom;
59687
59716
  region.setLayoutRect({
59688
- width: regionWidth,
59689
- height: regionHeight
59717
+ width: width,
59718
+ height: height
59690
59719
  });
59691
59720
  region.setLayoutStartPosition({
59692
59721
  x: this.leftCurrent + region.layoutOffsetX + region.layoutPaddingLeft,
@@ -61610,7 +61639,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61610
61639
  return this._beforeRender(option);
61611
61640
  }
61612
61641
  _reCompile(updateResult, morphConfig) {
61613
- var _a, _b, _c, _d, _e, _f, _g, _h;
61642
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
61614
61643
  if (updateResult.reMake) {
61615
61644
  this._releaseData();
61616
61645
  this._initDataSet();
@@ -61621,7 +61650,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61621
61650
  this._setCurrentTheme();
61622
61651
  this._setFontFamilyTheme((_b = this._currentTheme) === null || _b === void 0 ? void 0 : _b.fontFamily);
61623
61652
  }
61624
- (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.releaseGrammar(((_d = this._option) === null || _d === void 0 ? void 0 : _d.animation) === false || ((_e = this._spec) === null || _e === void 0 ? void 0 : _e.animation) === false);
61653
+ else if (updateResult.changeBackground) {
61654
+ (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.setBackground(this._getBackground());
61655
+ }
61656
+ (_d = this._compiler) === null || _d === void 0 ? void 0 : _d.releaseGrammar(((_e = this._option) === null || _e === void 0 ? void 0 : _e.animation) === false || ((_f = this._spec) === null || _f === void 0 ? void 0 : _f.animation) === false);
61625
61657
  this._userEvents.forEach(e => { var _a; return (_a = this._event) === null || _a === void 0 ? void 0 : _a.on(e.eType, e.query, e.handler); });
61626
61658
  if (updateResult.reSize) {
61627
61659
  this._doResize();
@@ -61630,11 +61662,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61630
61662
  else {
61631
61663
  if (updateResult.changeTheme) {
61632
61664
  this._setCurrentTheme();
61633
- this._setFontFamilyTheme((_f = this._currentTheme) === null || _f === void 0 ? void 0 : _f.fontFamily);
61665
+ this._setFontFamilyTheme((_g = this._currentTheme) === null || _g === void 0 ? void 0 : _g.fontFamily);
61666
+ }
61667
+ else if (updateResult.changeBackground) {
61668
+ (_h = this._compiler) === null || _h === void 0 ? void 0 : _h.setBackground(this._getBackground());
61634
61669
  }
61635
61670
  if (updateResult.reCompile) {
61636
- (_g = this._compiler) === null || _g === void 0 ? void 0 : _g.clear({ chart: this._chart, vChart: this }, !this._option.animation || !this._spec.animation);
61637
- (_h = this._compiler) === null || _h === void 0 ? void 0 : _h.compile({ chart: this._chart, vChart: this }, {});
61671
+ (_j = this._compiler) === null || _j === void 0 ? void 0 : _j.clear({ chart: this._chart, vChart: this }, !this._option.animation || !this._spec.animation);
61672
+ (_k = this._compiler) === null || _k === void 0 ? void 0 : _k.compile({ chart: this._chart, vChart: this }, {});
61638
61673
  }
61639
61674
  if (updateResult.reSize) {
61640
61675
  const { width, height } = this.getCurrentSize();
@@ -61905,6 +61940,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61905
61940
  if (!isEqual$1(lastSpec.theme, this._spec.theme)) {
61906
61941
  result.changeTheme = true;
61907
61942
  }
61943
+ else if (!isEqual$1(this._spec.background, lastSpec.background)) {
61944
+ result.reMake = true;
61945
+ result.changeBackground = true;
61946
+ }
61908
61947
  const reSize = this._shouldChartResize(lastSpec);
61909
61948
  result.reSize = reSize;
61910
61949
  (_b = (_a = this._compiler) === null || _a === void 0 ? void 0 : _a.getVGrammarView()) === null || _b === void 0 ? void 0 : _b.updateLayoutTag();
@@ -66824,7 +66863,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66824
66863
  registerComponentPlugin(CanvasTooltipHandler);
66825
66864
  };
66826
66865
 
66827
- const version = "1.11.11";
66866
+ const version = "1.11.12-alpha.0";
66828
66867
 
66829
66868
  const addVChartProperty = (data, op) => {
66830
66869
  const context = op.beforeCall();
@@ -70750,7 +70789,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
70750
70789
  rangeSize = isX ? this._option.getChartViewRect().width : this._option.getChartViewRect().height;
70751
70790
  }
70752
70791
  tickCount = tick.tickCount({
70753
- rangeSize,
70792
+ axisLength: rangeSize,
70754
70793
  labelStyle: this._spec.label && this._spec.label.style
70755
70794
  });
70756
70795
  }
@@ -72540,9 +72579,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
72540
72579
  var _a, _b;
72541
72580
  this._paddingSpec = normalizeLayoutPaddingSpec((_a = this._spec.padding) !== null && _a !== void 0 ? _a : (_b = this._option) === null || _b === void 0 ? void 0 : _b.getTheme().padding);
72542
72581
  this._updateLayoutRect(this._viewBox);
72543
- if (!isEqual$1(this._spec.background, oldSpec.background)) {
72544
- result.reMake = true;
72545
- }
72546
72582
  }
72547
72583
  updateDataSpec() {
72548
72584
  if (!this._spec.data) {
@@ -78386,7 +78422,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78386
78422
  if (!data || data.length === 0) {
78387
78423
  return data;
78388
78424
  }
78389
- const { angleField, startAngle, endAngle, minAngle, asStartAngle, asEndAngle, asMiddleAngle, asRadian, asRatio, asQuadrant, asK } = op;
78425
+ const { asStartAngle, asEndAngle, asMiddleAngle, asRadian, asRatio, asQuadrant, asK } = op;
78426
+ const angleField = op.angleField();
78427
+ const startAngle = op.startAngle();
78428
+ const endAngle = op.endAngle();
78429
+ const minAngle = op.minAngle();
78390
78430
  const appendArcInfo = (data, startAngle, angle) => {
78391
78431
  data[asStartAngle] = startAngle;
78392
78432
  data[asEndAngle] = startAngle + angle;
@@ -78745,10 +78785,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78745
78785
  viewData.transform({
78746
78786
  type: 'pie',
78747
78787
  options: {
78748
- angleField: this._angleField[0],
78749
- startAngle: this._startAngle,
78750
- endAngle: this._endAngle,
78751
- minAngle: isValid$1(this._spec.minAngle) ? degreeToRadian(this._spec.minAngle) : 0,
78788
+ angleField: () => this._angleField[0],
78789
+ startAngle: () => this._startAngle,
78790
+ endAngle: () => this._endAngle,
78791
+ minAngle: () => (isValid$1(this._spec.minAngle) ? degreeToRadian(this._spec.minAngle) : 0),
78752
78792
  asStartAngle: ARC_START_ANGLE,
78753
78793
  asEndAngle: ARC_END_ANGLE,
78754
78794
  asRatio: ARC_RATIO,
@@ -78899,28 +78939,23 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78899
78939
  }
78900
78940
  _compareSpec(spec, prevSpec, ignoreCheckKeys) {
78901
78941
  ignoreCheckKeys = ignoreCheckKeys !== null && ignoreCheckKeys !== void 0 ? ignoreCheckKeys : { data: true };
78902
- ignoreCheckKeys.centerX = true;
78903
- ignoreCheckKeys.centerX = true;
78904
- ignoreCheckKeys.centerY = true;
78905
- ignoreCheckKeys.centerOffset = true;
78906
- ignoreCheckKeys.radius = true;
78907
- ignoreCheckKeys.innerRadius = true;
78908
- ignoreCheckKeys.cornerRadius = true;
78909
- ignoreCheckKeys.startAngle = true;
78910
- ignoreCheckKeys.endAngle = true;
78911
- ignoreCheckKeys.padAngle = true;
78912
- const { centerX, centerY, centerOffset, radius, innerRadius, cornerRadius, startAngle, endAngle, padAngle } = prevSpec;
78942
+ const defaultIgnoreKeys = [
78943
+ 'centerX',
78944
+ 'centerY',
78945
+ 'centerOffset',
78946
+ 'radius',
78947
+ 'innerRadius',
78948
+ 'cornerRadius',
78949
+ 'startAngle',
78950
+ 'endAngle',
78951
+ 'padAngle'
78952
+ ];
78953
+ defaultIgnoreKeys.forEach(key => {
78954
+ ignoreCheckKeys[key] = true;
78955
+ });
78913
78956
  const result = super._compareSpec(spec, prevSpec, ignoreCheckKeys);
78914
78957
  spec = spec !== null && spec !== void 0 ? spec : {};
78915
- if (spec.centerY !== centerY ||
78916
- spec.centerX !== centerX ||
78917
- spec.centerOffset !== centerOffset ||
78918
- spec.radius !== radius ||
78919
- spec.innerRadius !== innerRadius ||
78920
- spec.cornerRadius !== cornerRadius ||
78921
- spec.startAngle !== startAngle ||
78922
- spec.endAngle !== endAngle ||
78923
- spec.padAngle !== padAngle) {
78958
+ if (defaultIgnoreKeys.some(key => spec[key] !== prevSpec[key])) {
78924
78959
  result.reRender = true;
78925
78960
  result.change = true;
78926
78961
  }
@@ -84232,7 +84267,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
84232
84267
  else {
84233
84268
  this._funnelAlign = ['left', 'right'].includes(this._spec.funnelAlign) ? this._spec.funnelAlign : 'center';
84234
84269
  }
84235
- if (this._spec.categoryField) {
84270
+ if (!this._seriesField && this._spec.categoryField) {
84236
84271
  this.setSeriesField(this._spec.categoryField);
84237
84272
  }
84238
84273
  }
@@ -89121,12 +89156,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89121
89156
  _getAngleValueStartWithoutMask(datum) {
89122
89157
  const startAngle = this._getAngleValueStartWithoutPadAngle(datum);
89123
89158
  const endAngle = this._getAngleValueEndWithoutPadAngle(datum);
89124
- return Math.min(startAngle + this._padAngle / 2, (startAngle + endAngle) / 2);
89159
+ return valueInRange(startAngle + (endAngle > startAngle ? 1 : -1) * Math.abs(this._padAngle / 2), [
89160
+ startAngle,
89161
+ (startAngle + endAngle) / 2
89162
+ ]);
89125
89163
  }
89126
89164
  _getAngleValueEndWithoutMask(datum) {
89127
89165
  const startAngle = this._getAngleValueStartWithoutPadAngle(datum);
89128
89166
  const endAngle = this._getAngleValueEndWithoutPadAngle(datum);
89129
- return Math.max(endAngle - this._padAngle / 2, (startAngle + endAngle) / 2);
89167
+ return valueInRange(endAngle - (endAngle > startAngle ? 1 : -1) * Math.abs(this._padAngle / 2), [
89168
+ endAngle,
89169
+ (startAngle + endAngle) / 2
89170
+ ]);
89130
89171
  }
89131
89172
  _getAngleValueStartWithoutPadAngle(datum) {
89132
89173
  return isValid$1(datum[SEGMENT_FIELD_START])
@@ -93113,6 +93154,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93113
93154
  }
93114
93155
  getBoundsInRect(rect, fullSpace) {
93115
93156
  if (!this._visible) {
93157
+ if (this._legendComponent && this._legendComponent.parent) {
93158
+ this._legendComponent.parent.removeChild(this._legendComponent);
93159
+ this._legendComponent = null;
93160
+ }
93116
93161
  return { x1: 0, y1: 0, x2: 0, y2: 0 };
93117
93162
  }
93118
93163
  const result = { x1: this.getLayoutStartPoint().x, y1: this.getLayoutStartPoint().y, x2: 0, y2: 0 };
@@ -100345,9 +100390,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
100345
100390
  return data;
100346
100391
  }
100347
100392
  _extendDatumOutOfBrush(elementsMap) {
100393
+ var _a;
100348
100394
  const data = [];
100349
100395
  for (const elementKey in elementsMap) {
100350
- data.push(elementsMap[elementKey].data[0]);
100396
+ data.push((_a = elementsMap[elementKey].data) === null || _a === void 0 ? void 0 : _a[0]);
100351
100397
  }
100352
100398
  return data;
100353
100399
  }