@visactor/vchart 1.11.3 → 1.11.4

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 (42) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +118 -84
  3. package/build/index.js +118 -84
  4. package/build/index.min.js +1 -1
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/chart/base/base-chart.js +3 -3
  7. package/cjs/chart/base/base-chart.js.map +1 -1
  8. package/cjs/compile/mark/compilable-mark.js +4 -2
  9. package/cjs/compile/mark/compilable-mark.js.map +1 -1
  10. package/cjs/component/axis/cartesian/band-axis.d.ts +2 -2
  11. package/cjs/component/axis/cartesian/band-axis.js +2 -2
  12. package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
  13. package/cjs/component/axis/polar/axis.d.ts +1 -1
  14. package/cjs/component/axis/polar/axis.js +1 -1
  15. package/cjs/component/axis/polar/axis.js.map +1 -1
  16. package/cjs/component/axis/polar/band-axis.d.ts +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/series/gauge/gauge-pointer.js +3 -1
  21. package/cjs/series/gauge/gauge-pointer.js.map +1 -1
  22. package/cjs/series/polar/progress-like/progress-like.js +2 -2
  23. package/cjs/series/polar/progress-like/progress-like.js.map +1 -1
  24. package/esm/chart/base/base-chart.js +3 -3
  25. package/esm/chart/base/base-chart.js.map +1 -1
  26. package/esm/compile/mark/compilable-mark.js +4 -2
  27. package/esm/compile/mark/compilable-mark.js.map +1 -1
  28. package/esm/component/axis/cartesian/band-axis.d.ts +2 -2
  29. package/esm/component/axis/cartesian/band-axis.js +2 -2
  30. package/esm/component/axis/cartesian/band-axis.js.map +1 -1
  31. package/esm/component/axis/polar/axis.d.ts +1 -1
  32. package/esm/component/axis/polar/axis.js +1 -1
  33. package/esm/component/axis/polar/axis.js.map +1 -1
  34. package/esm/component/axis/polar/band-axis.d.ts +1 -1
  35. package/esm/core/index.d.ts +1 -1
  36. package/esm/core/index.js +1 -1
  37. package/esm/core/index.js.map +1 -1
  38. package/esm/series/gauge/gauge-pointer.js +3 -2
  39. package/esm/series/gauge/gauge-pointer.js.map +1 -1
  40. package/esm/series/polar/progress-like/progress-like.js +2 -2
  41. package/esm/series/polar/progress-like/progress-like.js.map +1 -1
  42. package/package.json +13 -13
package/build/index.es.js CHANGED
@@ -13235,6 +13235,12 @@ function colorArrayToString(color) {
13235
13235
  return Array.isArray(color) && isNumber$1(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
13236
13236
  }
13237
13237
  function interpolateColor(from, to, ratio, alphaChannel, cb) {
13238
+ if (Array.isArray(from) && !isNumber$1(from[0]) || Array.isArray(to) && !isNumber$1(to[0])) {
13239
+ return new Array(4).fill(0).map((_, index) => _interpolateColor(isArray$1(from) ? from[index] : from, isArray$1(to) ? to[index] : to, ratio, alphaChannel));
13240
+ }
13241
+ return _interpolateColor(from, to, ratio, alphaChannel, cb);
13242
+ }
13243
+ function _interpolateColor(from, to, ratio, alphaChannel, cb) {
13238
13244
  if (!from || !to) return from && colorArrayToString(from) || to && colorArrayToString(to) || !1;
13239
13245
  let fromArray,
13240
13246
  toArray,
@@ -14034,7 +14040,7 @@ class Graphic extends Node {
14034
14040
  animate.stateNames = stateNames, animate.to(animateAttrs, null !== (_b = null === (_a = this.stateAnimateConfig) || void 0 === _a ? void 0 : _a.duration) && void 0 !== _b ? _b : DefaultStateAnimateConfig.duration, null !== (_d = null === (_c = this.stateAnimateConfig) || void 0 === _c ? void 0 : _c.easing) && void 0 !== _d ? _d : DefaultStateAnimateConfig.easing), noAnimateAttrs && this.setAttributes(noAnimateAttrs, !1, {
14035
14041
  type: AttributeUpdateType.STATE
14036
14042
  });
14037
- } else this.setAttributes(attrs, !1, {
14043
+ } else this.stopStateAnimates(), this.setAttributes(attrs, !1, {
14038
14044
  type: AttributeUpdateType.STATE
14039
14045
  });
14040
14046
  }
@@ -14064,7 +14070,7 @@ class Graphic extends Node {
14064
14070
  }), value;
14065
14071
  }
14066
14072
  clearStates(hasAnimation) {
14067
- this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
14073
+ this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
14068
14074
  }
14069
14075
  removeState(stateName, hasAnimation) {
14070
14076
  if ((this.currentStates ? this.currentStates.indexOf(stateName) : -1) >= 0) {
@@ -14090,7 +14096,6 @@ class Graphic extends Node {
14090
14096
  var _a;
14091
14097
  if (!states.length) return void this.clearStates(hasAnimation);
14092
14098
  if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
14093
- this.stopStateAnimates();
14094
14099
  const stateAttrs = {};
14095
14100
  states.forEach(stateName => {
14096
14101
  var _a;
@@ -21551,7 +21556,8 @@ var __decorate$1l = undefined && undefined.__decorate || function (decorators, t
21551
21556
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21552
21557
  };
21553
21558
  const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
21554
- const tempDirtyBounds = new AABBBounds();
21559
+ const tempDirtyBounds = new AABBBounds(),
21560
+ tempBackupDirtyBounds = new AABBBounds();
21555
21561
  class ShadowRootDrawItemInterceptorContribution {
21556
21562
  constructor() {
21557
21563
  this.order = 1;
@@ -21568,11 +21574,11 @@ class ShadowRootDrawItemInterceptorContribution {
21568
21574
  context: context
21569
21575
  } = drawContext;
21570
21576
  if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
21571
- tempDirtyBounds.copy(drawContribution.dirtyBounds);
21577
+ tempDirtyBounds.copy(drawContribution.dirtyBounds), tempBackupDirtyBounds.copy(drawContribution.backupDirtyBounds);
21572
21578
  const m = graphic.globalTransMatrix.getInverse();
21573
- drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
21579
+ drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m), drawContribution.backupDirtyBounds.copy(drawContribution.dirtyBounds);
21574
21580
  }
21575
- return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
21581
+ return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && (drawContribution.dirtyBounds.copy(tempDirtyBounds), drawContribution.backupDirtyBounds.copy(tempBackupDirtyBounds)), !0;
21576
21582
  }
21577
21583
  }
21578
21584
  class DebugDrawItemInterceptorContribution {
@@ -31237,6 +31243,9 @@ function createTextGraphicByType(textAttributes) {
31237
31243
  const textType = getTextType(textAttributes, typeKey);
31238
31244
  return "rich" === textType ? graphicCreator.richtext(richTextAttributeTransform(textAttributes)) : ("html" === textType ? textAttributes = htmlAttributeTransform(textAttributes) : "react" === textType && (textAttributes = reactAttributeTransform(textAttributes)), graphicCreator.text(textAttributes));
31239
31245
  }
31246
+ function alignTextInLine(layoutAlign, graphic, textAlign, pos, textWidth) {
31247
+ "right" === layoutAlign ? "center" === textAlign ? graphic.setAttribute("x", pos - textWidth / 2) : "right" === textAlign || "end" === textAlign ? graphic.setAttribute("x", pos) : graphic.setAttribute("x", pos - textWidth) : "center" === textAlign ? graphic.setAttribute("x", pos + textWidth / 2) : "right" === textAlign || "end" === textAlign ? graphic.setAttribute("x", pos + textWidth) : graphic.setAttribute("x", pos);
31248
+ }
31240
31249
 
31241
31250
  const deltaXYToAngle = (y, x) => {
31242
31251
  const angle = Math.atan2(y, x);
@@ -43038,7 +43047,8 @@ let Tooltip$1 = class Tooltip extends AbstractComponent {
43038
43047
  valueWidth: valueWidth,
43039
43048
  hasContentShape: hasContentShape,
43040
43049
  autoCalculatePosition: autoCalculatePosition,
43041
- autoMeasure: autoMeasure
43050
+ autoMeasure: autoMeasure,
43051
+ align: align
43042
43052
  } = this.attribute;
43043
43053
  if (!visible) return void this.hideAll();
43044
43054
  autoMeasure && Tooltip.measureTooltip(this.attribute), autoCalculatePosition && Tooltip.calculateTooltipPosition(this.attribute);
@@ -43089,7 +43099,6 @@ let Tooltip$1 = class Tooltip extends AbstractComponent {
43089
43099
  this._tooltipContent.setAttribute("x", padding[3]), this._tooltipContent.setAttribute("y", padding[0] + titleHeight);
43090
43100
  let lastYPos = 0;
43091
43101
  content.forEach((item, i) => {
43092
- var _a, _b, _c;
43093
43102
  const itemAttr = Tooltip.getContentAttr(this.attribute, i);
43094
43103
  if (!isVisible(itemAttr)) return;
43095
43104
  const itemGroupName = `tooltip-content-${i}`,
@@ -43097,68 +43106,81 @@ let Tooltip$1 = class Tooltip extends AbstractComponent {
43097
43106
  visible: !0,
43098
43107
  x: 0,
43099
43108
  y: lastYPos
43100
- }, "group");
43101
- let x = 0;
43102
- if (isVisible(itemAttr.shape) && itemGroup.createOrUpdateChild(`${itemGroupName}-shape`, Object.assign({
43103
- visible: !0,
43104
- x: itemAttr.shape.size / 2,
43105
- y: itemAttr.shape.size / 2 + ((null !== (_a = calculateLineHeight(itemAttr.key.lineHeight, itemAttr.key.fontSize)) && void 0 !== _a ? _a : itemAttr.key.fontSize) - itemAttr.shape.size) / 2
43106
- }, itemAttr.shape), "symbol"), hasContentShape && (x += itemAttr.shape.size + itemAttr.shape.spacing), isVisible(itemAttr.key)) {
43107
- let element;
43108
- element = itemAttr.key.multiLine ? itemGroup.createOrUpdateChild(`${itemGroupName}-key`, Object.assign(Object.assign({
43109
- visible: !0
43110
- }, getRichTextAttribute(itemAttr.key)), {
43111
- textBaseline: "top"
43112
- }), "richtext") : "object" != typeof itemAttr.key.text || null === itemAttr.key.text || "rich" !== itemAttr.key.text.type && "html" !== itemAttr.key.text.type ? itemGroup.createOrUpdateChild(`${itemGroupName}-key`, Object.assign(Object.assign({
43113
- visible: !0,
43114
- text: null !== (_b = itemAttr.key.text) && void 0 !== _b ? _b : ""
43115
- }, itemAttr.key), {
43116
- textBaseline: "top"
43117
- }), "text") : "rich" === itemAttr.key.text.type ? itemGroup.createOrUpdateChild(`${itemGroupName}-value`, Object.assign(Object.assign({
43118
- visible: !0
43119
- }, getRichTextAttribute(itemAttr.key)), {
43120
- textBaseline: "top"
43121
- }), "richtext") : itemGroup.createOrUpdateChild(`${itemGroupName}-value`, {
43122
- html: Object.assign(Object.assign({
43123
- dom: itemAttr.key.text.text
43124
- }, DEFAULT_HTML_TEXT_SPEC), itemAttr.key)
43125
- }, "richtext");
43126
- const {
43127
- textAlign: textAlign
43128
- } = itemAttr.key;
43129
- "center" === textAlign ? element.setAttribute("x", x + keyWidth / 2) : "right" === textAlign || "end" === textAlign ? element.setAttribute("x", x + keyWidth) : element.setAttribute("x", x), element.setAttribute("y", 0), x += keyWidth + itemAttr.key.spacing;
43130
- }
43131
- if (isVisible(itemAttr.value)) {
43132
- let element;
43133
- element = itemAttr.value.multiLine ? itemGroup.createOrUpdateChild(`${itemGroupName}-value`, Object.assign(Object.assign({
43134
- visible: !0
43135
- }, getRichTextAttribute(itemAttr.value)), {
43136
- textBaseline: "top"
43137
- }), "richtext") : "object" != typeof itemAttr.value.text || null === itemAttr.value.text || "rich" !== itemAttr.value.text.type && "html" !== itemAttr.value.text.type ? itemGroup.createOrUpdateChild(`${itemGroupName}-value`, Object.assign(Object.assign({
43138
- visible: !0,
43139
- text: null !== (_c = itemAttr.value.text) && void 0 !== _c ? _c : ""
43140
- }, itemAttr.value), {
43141
- textBaseline: "top"
43142
- }), "text") : "rich" === itemAttr.value.text.type ? itemGroup.createOrUpdateChild(`${itemGroupName}-value`, Object.assign(Object.assign({
43143
- visible: !0
43144
- }, getRichTextAttribute(itemAttr.value)), {
43145
- textBaseline: "top"
43146
- }), "richtext") : itemGroup.createOrUpdateChild(`${itemGroupName}-value`, {
43147
- html: Object.assign({
43148
- dom: itemAttr.value.text.text,
43149
- container: "",
43150
- width: 30,
43151
- height: 30,
43152
- style: {}
43153
- }, itemAttr.value)
43154
- }, "richtext");
43109
+ }, "group"),
43110
+ shapeOffsetWidth = itemAttr.shape.size + itemAttr.shape.spacing;
43111
+ let x = "right" === align ? (hasContentShape ? shapeOffsetWidth : 0) + (isVisible(itemAttr.key) ? keyWidth + itemAttr.key.spacing : 0) + (isVisible(itemAttr.value) ? valueWidth : 0) : 0;
43112
+ this._createShape("right" === align ? x - itemAttr.shape.size / 2 : x + itemAttr.shape.size / 2, itemAttr, itemGroup, itemGroupName), hasContentShape && ("right" === align ? x -= shapeOffsetWidth : x += shapeOffsetWidth);
43113
+ const keyGraphic = this._createKey(itemAttr, itemGroup, itemGroupName);
43114
+ keyGraphic && (alignTextInLine(align, keyGraphic, itemAttr.key.textAlign, x, keyWidth), keyGraphic.setAttribute("y", 0), "right" === align ? x -= keyWidth + itemAttr.key.spacing : x += keyWidth + itemAttr.key.spacing);
43115
+ const valueGraphic = this._createValue(itemAttr, itemGroup, itemGroupName);
43116
+ if (valueGraphic) {
43155
43117
  let textAlign = "right";
43156
- isValid$1(itemAttr.value.textAlign) ? textAlign = itemAttr.value.textAlign : isVisible(itemAttr.key) || (textAlign = "left"), element.setAttribute("textAlign", textAlign), "center" === textAlign ? element.setAttribute("x", x + valueWidth / 2) : "right" === textAlign || "end" === textAlign ? element.setAttribute("x", x + valueWidth) : element.setAttribute("x", x), x += valueWidth, element.setAttribute("y", 0), itemGroup.add(element);
43118
+ isValid$1(itemAttr.value.textAlign) ? textAlign = itemAttr.value.textAlign : isVisible(itemAttr.key) || "right" === align || (textAlign = "left"), valueGraphic.setAttribute("textAlign", textAlign), alignTextInLine(align, valueGraphic, textAlign, x, valueWidth), valueGraphic.setAttribute("y", 0);
43157
43119
  }
43158
43120
  lastYPos += itemAttr.height + itemAttr.spaceRow;
43159
43121
  });
43160
43122
  }
43161
43123
  }
43124
+ _createShape(x, itemAttr, itemGroup, itemGroupName) {
43125
+ var _a;
43126
+ if (isVisible(itemAttr.shape)) return itemGroup.createOrUpdateChild(`${itemGroupName}-shape`, Object.assign({
43127
+ visible: !0,
43128
+ x: x,
43129
+ y: itemAttr.shape.size / 2 + ((null !== (_a = calculateLineHeight(itemAttr.key.lineHeight, itemAttr.key.fontSize)) && void 0 !== _a ? _a : itemAttr.key.fontSize) - itemAttr.shape.size) / 2
43130
+ }, itemAttr.shape), "symbol");
43131
+ }
43132
+ _createKey(itemAttr, itemGroup, itemGroupName) {
43133
+ var _a;
43134
+ if (isVisible(itemAttr.key)) {
43135
+ let element;
43136
+ return element = itemAttr.key.multiLine ? itemGroup.createOrUpdateChild(`${itemGroupName}-key`, Object.assign(Object.assign({
43137
+ visible: !0
43138
+ }, getRichTextAttribute(itemAttr.key)), {
43139
+ textBaseline: "top"
43140
+ }), "richtext") : "object" != typeof itemAttr.key.text || null === itemAttr.key.text || "rich" !== itemAttr.key.text.type && "html" !== itemAttr.key.text.type ? itemGroup.createOrUpdateChild(`${itemGroupName}-key`, Object.assign(Object.assign({
43141
+ visible: !0,
43142
+ text: null !== (_a = itemAttr.key.text) && void 0 !== _a ? _a : ""
43143
+ }, itemAttr.key), {
43144
+ textBaseline: "top"
43145
+ }), "text") : "rich" === itemAttr.key.text.type ? itemGroup.createOrUpdateChild(`${itemGroupName}-value`, Object.assign(Object.assign({
43146
+ visible: !0
43147
+ }, getRichTextAttribute(itemAttr.key)), {
43148
+ textBaseline: "top"
43149
+ }), "richtext") : itemGroup.createOrUpdateChild(`${itemGroupName}-value`, {
43150
+ html: Object.assign(Object.assign({
43151
+ dom: itemAttr.key.text.text
43152
+ }, DEFAULT_HTML_TEXT_SPEC), itemAttr.key)
43153
+ }, "richtext"), element;
43154
+ }
43155
+ }
43156
+ _createValue(itemAttr, itemGroup, itemGroupName) {
43157
+ var _a;
43158
+ if (isVisible(itemAttr.value)) {
43159
+ let element;
43160
+ return element = itemAttr.value.multiLine ? itemGroup.createOrUpdateChild(`${itemGroupName}-value`, Object.assign(Object.assign({
43161
+ visible: !0
43162
+ }, getRichTextAttribute(itemAttr.value)), {
43163
+ textBaseline: "top"
43164
+ }), "richtext") : "object" != typeof itemAttr.value.text || null === itemAttr.value.text || "rich" !== itemAttr.value.text.type && "html" !== itemAttr.value.text.type ? itemGroup.createOrUpdateChild(`${itemGroupName}-value`, Object.assign(Object.assign({
43165
+ visible: !0,
43166
+ text: null !== (_a = itemAttr.value.text) && void 0 !== _a ? _a : ""
43167
+ }, itemAttr.value), {
43168
+ textBaseline: "top"
43169
+ }), "text") : "rich" === itemAttr.value.text.type ? itemGroup.createOrUpdateChild(`${itemGroupName}-value`, Object.assign(Object.assign({
43170
+ visible: !0
43171
+ }, getRichTextAttribute(itemAttr.value)), {
43172
+ textBaseline: "top"
43173
+ }), "richtext") : itemGroup.createOrUpdateChild(`${itemGroupName}-value`, {
43174
+ html: Object.assign({
43175
+ dom: itemAttr.value.text.text,
43176
+ container: "",
43177
+ width: 30,
43178
+ height: 30,
43179
+ style: {}
43180
+ }, itemAttr.value)
43181
+ }, "richtext"), element;
43182
+ }
43183
+ }
43162
43184
  setAttributes(params, forceUpdateTag) {
43163
43185
  const keys = Object.keys(params);
43164
43186
  this.attribute.autoCalculatePosition && keys.every(key => TOOLTIP_POSITION_ATTRIBUTES.includes(key)) ? (this._mergeAttributes(params, keys), isNil$1(this.attribute.panel.width) && this.attribute.autoMeasure && Tooltip.measureTooltip(this.attribute), Tooltip.calculateTooltipPosition(this.attribute), super.setAttributes({
@@ -51000,8 +51022,8 @@ const clipOut = (element, options, animationParameters) => {
51000
51022
  };
51001
51023
 
51002
51024
  const fadeIn = (element, options, animationParameters) => {
51003
- var _a, _b, _c;
51004
- const finalAttrs = element.getFinalGraphicAttributes();
51025
+ var _a, _b, _c, _d;
51026
+ const finalAttrs = null !== (_a = element.getFinalGraphicAttributes()) && void 0 !== _a ? _a : {};
51005
51027
  return {
51006
51028
  from: {
51007
51029
  opacity: 0,
@@ -51009,9 +51031,9 @@ const fadeIn = (element, options, animationParameters) => {
51009
51031
  strokeOpacity: 0
51010
51032
  },
51011
51033
  to: {
51012
- opacity: null !== (_a = finalAttrs.opacity) && void 0 !== _a ? _a : 1,
51013
- fillOpacity: null !== (_b = finalAttrs.fillOpacity) && void 0 !== _b ? _b : 1,
51014
- strokeOpacity: null !== (_c = finalAttrs.strokeOpacity) && void 0 !== _c ? _c : 1
51034
+ opacity: null !== (_b = finalAttrs.opacity) && void 0 !== _b ? _b : 1,
51035
+ fillOpacity: null !== (_c = finalAttrs.fillOpacity) && void 0 !== _c ? _c : 1,
51036
+ strokeOpacity: null !== (_d = finalAttrs.strokeOpacity) && void 0 !== _d ? _d : 1
51015
51037
  }
51016
51038
  };
51017
51039
  };
@@ -60017,11 +60039,18 @@ class CompilableMark extends GrammarItem {
60017
60039
  dependency: stateSignal
60018
60040
  });
60019
60041
  if (this._animationConfig.normal) {
60020
- this._event.on(HOOK_EVENT.ANIMATION_END, ({ event }) => {
60021
- if (event.mark === this.getProduct() && event.animationState === AnimationStateEnum.appear) {
60042
+ if (!this._animationConfig.appear) {
60043
+ this._event.on(HOOK_EVENT.AFTER_DO_RENDER, () => {
60022
60044
  this.runAnimationByState(AnimationStateEnum.normal);
60023
- }
60024
- });
60045
+ });
60046
+ }
60047
+ else {
60048
+ this._event.on(HOOK_EVENT.ANIMATION_END, ({ event }) => {
60049
+ if (event.mark === this.getProduct() && event.animationState === AnimationStateEnum.appear) {
60050
+ this.runAnimationByState(AnimationStateEnum.normal);
60051
+ }
60052
+ });
60053
+ }
60025
60054
  }
60026
60055
  }
60027
60056
  }
@@ -66337,7 +66366,7 @@ const registerCanvasTooltipHandler = () => {
66337
66366
  registerComponentPlugin(CanvasTooltipHandler);
66338
66367
  };
66339
66368
 
66340
- const version = "1.11.3";
66369
+ const version = "1.11.4";
66341
66370
 
66342
66371
  const addVChartProperty = (data, op) => {
66343
66372
  const context = op.beforeCall();
@@ -70754,10 +70783,10 @@ class CartesianBandAxis extends CartesianAxis {
70754
70783
  this.calcScales(this._defaultBandInnerPadding, this._defaultBandOuterPadding);
70755
70784
  }
70756
70785
  axisHelper() {
70757
- const getScale = (depth) => {
70786
+ const getScale = (depth = 0) => {
70758
70787
  return this._scales[depth];
70759
70788
  };
70760
- const getBandwidth = (depth) => {
70789
+ const getBandwidth = (depth = 0) => {
70761
70790
  return getScale(depth).bandwidth();
70762
70791
  };
70763
70792
  return {
@@ -71936,8 +71965,8 @@ class BaseChart extends CompilableBase {
71936
71965
  return this._chartData.getSeriesData(id, index);
71937
71966
  }
71938
71967
  _transformSpecScale() {
71939
- var _a, _b;
71940
- const scales = (_a = this._spec.scales) !== null && _a !== void 0 ? _a : [];
71968
+ var _a;
71969
+ const scales = this._spec.scales ? [...this._spec.scales] : [];
71941
71970
  let colorScaleSpec = scales.find(s => s.id === 'color');
71942
71971
  const colorScheme = this.getColorScheme();
71943
71972
  if (!colorScaleSpec) {
@@ -71963,7 +71992,7 @@ class BaseChart extends CompilableBase {
71963
71992
  }
71964
71993
  }
71965
71994
  }
71966
- if (!((_b = colorScaleSpec.range) === null || _b === void 0 ? void 0 : _b.length)) {
71995
+ if (!((_a = colorScaleSpec.range) === null || _a === void 0 ? void 0 : _a.length)) {
71967
71996
  colorScaleSpec.range = getDataScheme(colorScheme);
71968
71997
  colorScaleSpec.rangeTheme = true;
71969
71998
  }
@@ -78905,7 +78934,7 @@ class PolarAxis extends AxisComponent {
78905
78934
  initGroupScales() {
78906
78935
  }
78907
78936
  axisHelper() {
78908
- const getScale = (depth) => {
78937
+ const getScale = (depth = 0) => {
78909
78938
  return this._scales[depth];
78910
78939
  };
78911
78940
  const helper = {
@@ -80474,7 +80503,7 @@ class ProgressLikeSeries extends PolarSeries {
80474
80503
  let pos;
80475
80504
  if (isValid$1(originValue)) {
80476
80505
  const index = binaryFuzzySearch(subTickData, tick => tick.value - originValue);
80477
- const targetIndex = originValue > subTickData[index].value - step / 2
80506
+ const targetIndex = index >= subTickData.length || originValue > subTickData[index].value - step / 2
80478
80507
  ? Math.min(index, subTickData.length - 1)
80479
80508
  : index > 0
80480
80509
  ? index - 1
@@ -80502,7 +80531,7 @@ class ProgressLikeSeries extends PolarSeries {
80502
80531
  const step = subTickData[1].value - subTickData[0].value;
80503
80532
  const offsetAngle = degreeToRadian(tickMask.offsetAngle);
80504
80533
  const index = binaryFuzzySearch(subTickData, tick => tick.value - originValue);
80505
- const targetIndex = originValue > subTickData[index].value - step / 2
80534
+ const targetIndex = index >= subTickData.length || originValue > subTickData[index].value - step / 2
80506
80535
  ? Math.min(index, subTickData.length - 1)
80507
80536
  : index > 0
80508
80537
  ? index - 1
@@ -88396,7 +88425,12 @@ class GaugePointerSeries extends ProgressLikeSeries {
88396
88425
  return pointerSpec.height * this._computeLayoutRadius();
88397
88426
  }
88398
88427
  _getPointerAngle(datum) {
88399
- return this.angleAxisHelper.dataToPosition([datum[this._angleField[0]]]);
88428
+ const scale = this.angleAxisHelper.getScale();
88429
+ const domain = scale.domain();
88430
+ const max = maxInArray(domain);
88431
+ const min = minInArray(domain);
88432
+ const angle = clamp$1(datum[this._angleField[0]], min, max);
88433
+ return this.angleAxisHelper.dataToPosition([angle]);
88400
88434
  }
88401
88435
  _getRotatedPointerCenterOffset(datum) {
88402
88436
  var _a, _b, _c, _d;