@visactor/vchart 1.11.13 → 1.11.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -42266,7 +42266,7 @@
42266
42266
  }
42267
42267
  }
42268
42268
  render() {
42269
- var _a;
42269
+ var _a, _b;
42270
42270
  if (this.removeAllChild(!0), !0 !== this.attribute.visible) return;
42271
42271
  const {
42272
42272
  title = {},
@@ -42278,7 +42278,8 @@
42278
42278
  group = this.createOrUpdateChild("indicator-container", {
42279
42279
  x: 0,
42280
42280
  y: 0,
42281
- zIndex: 1
42281
+ zIndex: 1,
42282
+ pickable: null === (_a = this.attribute.pickable) || void 0 === _a || _a
42282
42283
  }, "group");
42283
42284
  if (isValid$1(title) && (this._title = this._renderText(group, title, limit, limitRatio, "title.style", "indicator-title")), isValid$1(content)) {
42284
42285
  const contents = array(content),
@@ -42288,7 +42289,7 @@
42288
42289
  }), this._content = contentComponents;
42289
42290
  }
42290
42291
  this._setGlobalAutoFit(limit), this._setYPosition();
42291
- const totalHeight = null !== (_a = null == group ? void 0 : group.AABBBounds.height()) && void 0 !== _a ? _a : 0;
42292
+ const totalHeight = null !== (_b = null == group ? void 0 : group.AABBBounds.height()) && void 0 !== _b ? _b : 0;
42292
42293
  group.setAttribute("y", size.height / 2 - totalHeight / 2), group.setAttribute("x", size.width / 2);
42293
42294
  }
42294
42295
  _setLocalAutoFit(limit, indicatorItem, indicatorItemSpec) {
@@ -66854,7 +66855,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66854
66855
  registerComponentPlugin(CanvasTooltipHandler);
66855
66856
  };
66856
66857
 
66857
- const version = "1.11.13";
66858
+ const version = "1.11.14";
66858
66859
 
66859
66860
  const addVChartProperty = (data, op) => {
66860
66861
  const context = op.beforeCall();
@@ -71786,6 +71787,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
71786
71787
  result.reMake = true;
71787
71788
  return result;
71788
71789
  }
71790
+ if (!isEqual$1(lastSpec.specified, s.specified)) {
71791
+ result.reMake = true;
71792
+ return result;
71793
+ }
71789
71794
  if (s.range && !isEqual$1(s.range, scale.range())) {
71790
71795
  scale.range(s.range);
71791
71796
  result.reRender = true;
@@ -81808,12 +81813,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81808
81813
  });
81809
81814
  }
81810
81815
  initMarkStyle() {
81811
- var _a, _b, _c;
81816
+ var _a, _b, _c, _d, _e;
81812
81817
  const wordMark = this._wordMark;
81813
81818
  const wordSpec = (_a = this._spec.word) !== null && _a !== void 0 ? _a : {};
81814
81819
  if (wordMark) {
81815
81820
  this.setMarkStyle(wordMark, {
81816
- fill: this.getWordColor,
81817
81821
  text: (datum) => datum[this._textField],
81818
81822
  x: (datum) => datum.x,
81819
81823
  y: (datum) => datum.y,
@@ -81825,7 +81829,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81825
81829
  visible: (datum) => datum.visible
81826
81830
  }, 'normal', exports.AttributeLevel.Series);
81827
81831
  this.setMarkStyle(wordMark, {
81828
- fontFamily: (_c = (_b = wordSpec.style) === null || _b === void 0 ? void 0 : _b.fontFamily) !== null && _c !== void 0 ? _c : this._defaultFontFamily
81832
+ fontFamily: (_c = (_b = wordSpec.style) === null || _b === void 0 ? void 0 : _b.fontFamily) !== null && _c !== void 0 ? _c : this._defaultFontFamily,
81833
+ fill: (_e = (_d = wordSpec === null || wordSpec === void 0 ? void 0 : wordSpec.style) === null || _d === void 0 ? void 0 : _d.fill) !== null && _e !== void 0 ? _e : this.getWordColor
81829
81834
  }, 'normal', exports.AttributeLevel.User_Mark);
81830
81835
  }
81831
81836
  }
@@ -97268,11 +97273,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97268
97273
  super.updateLayoutAttribute();
97269
97274
  }
97270
97275
  _getIndicatorAttrs() {
97276
+ if (this._spec.visible === false || (this._spec.fixed === false && this._activeDatum === null)) {
97277
+ return {
97278
+ visible: false
97279
+ };
97280
+ }
97271
97281
  const region = this._regions[0];
97272
97282
  const { width, height } = region.getLayoutRect();
97273
97283
  const { x, y } = region.getLayoutStartPoint();
97284
+ const _a = this._spec, { content, offsetX, offsetY, limitRatio, title } = _a, restSpec = __rest$7(_a, ["content", "offsetX", "offsetY", "limitRatio", "title"]);
97274
97285
  const contentComponentSpec = [];
97275
- array(this._spec.content).forEach((eachItem) => {
97286
+ array(content).forEach((eachItem) => {
97276
97287
  const contentSpec = mergeSpec({}, this._theme.content, eachItem);
97277
97288
  contentComponentSpec.push({
97278
97289
  visible: contentSpec.visible !== false && (contentSpec.field ? this._activeDatum !== null : true),
@@ -97284,29 +97295,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
97284
97295
  style: Object.assign(Object.assign({}, transformIndicatorStyle(pickWithout(contentSpec.style, ['text']), this._activeDatum)), { text: this._createText(contentSpec.field, contentSpec.style.text) })
97285
97296
  });
97286
97297
  });
97287
- return {
97288
- visible: this._spec.visible !== false && (this._spec.fixed !== false || this._activeDatum !== null),
97289
- size: {
97298
+ return Object.assign({ visible: true, size: {
97290
97299
  width: width,
97291
97300
  height: height
97292
- },
97293
- zIndex: this.layoutZIndex,
97294
- x: x,
97295
- y: y,
97296
- dx: this._spec.offsetX ? getActualNumValue(this._spec.offsetX, this._computeLayoutRadius()) : 0,
97297
- dy: this._spec.offsetY ? getActualNumValue(this._spec.offsetY, this._computeLayoutRadius()) : 0,
97298
- limitRatio: this._spec.limitRatio || Infinity,
97299
- title: {
97300
- visible: this._spec.title.visible !== false && (!isValid$1(this._spec.title.field) || this._activeDatum !== null),
97301
- space: this._spec.title.space || this._gap,
97302
- autoLimit: this._spec.title.autoLimit,
97303
- autoFit: this._spec.title.autoFit,
97304
- fitPercent: this._spec.title.fitPercent,
97305
- fitStrategy: this._spec.title.fitStrategy,
97306
- style: Object.assign(Object.assign({}, transformIndicatorStyle(pickWithout(this._spec.title.style, ['text']), this._activeDatum)), { text: this._createText(this._spec.title.field, this._spec.title.style.text) })
97307
- },
97308
- content: contentComponentSpec
97309
- };
97301
+ }, zIndex: this.layoutZIndex, x: x, y: y, dx: offsetX ? getActualNumValue(offsetX, this._computeLayoutRadius()) : 0, dy: offsetY ? getActualNumValue(offsetY, this._computeLayoutRadius()) : 0, limitRatio: limitRatio || Infinity, title: {
97302
+ visible: title.visible !== false && (!isValid$1(title.field) || this._activeDatum !== null),
97303
+ space: title.space || this._gap,
97304
+ autoLimit: title.autoLimit,
97305
+ autoFit: title.autoFit,
97306
+ fitPercent: title.fitPercent,
97307
+ fitStrategy: title.fitStrategy,
97308
+ style: Object.assign(Object.assign({}, transformIndicatorStyle(pickWithout(title.style, ['text']), this._activeDatum)), { text: this._createText(title.field, title.style.text) })
97309
+ }, content: contentComponentSpec }, restSpec);
97310
97310
  }
97311
97311
  _createOrUpdateIndicatorComponent(attrs) {
97312
97312
  if (this._indicatorComponent) {