@visactor/vchart 1.3.0-beta.2 → 1.3.0-beta.3

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 (37) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +26 -10
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/component/axis/base-axis.d.ts +1 -0
  6. package/cjs/component/axis/base-axis.js +2 -1
  7. package/cjs/component/axis/base-axis.js.map +1 -1
  8. package/cjs/component/axis/cartesian/axis.js +6 -3
  9. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  10. package/cjs/component/axis/cartesian/interface/common.d.ts +1 -0
  11. package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
  12. package/cjs/component/label/interface.d.ts +3 -0
  13. package/cjs/component/label/interface.js.map +1 -1
  14. package/cjs/component/label/label.js +4 -8
  15. package/cjs/component/label/label.js.map +1 -1
  16. package/cjs/core/index.d.ts +1 -1
  17. package/cjs/core/index.js +1 -1
  18. package/cjs/core/index.js.map +1 -1
  19. package/cjs/model/layout-item.d.ts +4 -4
  20. package/cjs/model/layout-item.js.map +1 -1
  21. package/esm/component/axis/base-axis.d.ts +1 -0
  22. package/esm/component/axis/base-axis.js +2 -1
  23. package/esm/component/axis/base-axis.js.map +1 -1
  24. package/esm/component/axis/cartesian/axis.js +7 -4
  25. package/esm/component/axis/cartesian/axis.js.map +1 -1
  26. package/esm/component/axis/cartesian/interface/common.d.ts +1 -0
  27. package/esm/component/axis/cartesian/interface/common.js.map +1 -1
  28. package/esm/component/label/interface.d.ts +3 -0
  29. package/esm/component/label/interface.js.map +1 -1
  30. package/esm/component/label/label.js +4 -7
  31. package/esm/component/label/label.js.map +1 -1
  32. package/esm/core/index.d.ts +1 -1
  33. package/esm/core/index.js +1 -1
  34. package/esm/core/index.js.map +1 -1
  35. package/esm/model/layout-item.d.ts +4 -4
  36. package/esm/model/layout-item.js.map +1 -1
  37. package/package.json +1 -1
package/build/index.js CHANGED
@@ -532,6 +532,18 @@
532
532
  return target;
533
533
  }
534
534
 
535
+ function pickWithout(obj, keys) {
536
+ if (!obj || !isPlainObject(obj)) return obj;
537
+ const result = {};
538
+ return Object.keys(obj).forEach(k => {
539
+ const v = obj[k];
540
+ let match = !1;
541
+ keys.forEach(itKey => {
542
+ (isString(itKey) && itKey === k || itKey instanceof RegExp && k.match(itKey)) && (match = !0);
543
+ }), match || (result[k] = v);
544
+ }), result;
545
+ }
546
+
535
547
  function objToString(obj) {
536
548
  return Object.prototype.toString.call(obj);
537
549
  }
@@ -60687,7 +60699,7 @@
60687
60699
  VChart.useMark([ComponentMark, GroupMark, ImageMark]);
60688
60700
  Factory.registerRegion('region', Region);
60689
60701
  Factory.registerLayout('base', Layout);
60690
- const version = "1.3.0-beta.2";
60702
+ const version = "1.3.0-beta.3";
60691
60703
  Logger.getInstance(LoggerLevel.Error);
60692
60704
 
60693
60705
  var SeriesMarkNameEnum;
@@ -82924,7 +82936,8 @@
82924
82936
  autoHideSeparation: spec.label.autoHideSeparation,
82925
82937
  limitEllipsis: spec.label.limitEllipsis,
82926
82938
  layoutFunc: spec.label.layoutFunc,
82927
- dataFilter: spec.label.dataFilter
82939
+ dataFilter: spec.label.dataFilter,
82940
+ containerAlign: spec.label.containerAlign
82928
82941
  },
82929
82942
  tick: {
82930
82943
  visible: spec.tick.visible,
@@ -83210,11 +83223,11 @@
83210
83223
  super.setAttrFromSpec();
83211
83224
  const isX = isXAxis(this.orient);
83212
83225
  if (isX) {
83213
- if (isNil(this._spec.maxHeight)) {
83226
+ if (isUndefined(this._spec.maxHeight)) {
83214
83227
  this._spec.maxHeight = '30%';
83215
83228
  }
83216
83229
  }
83217
- else if (isNil(this._spec.maxWidth)) {
83230
+ else if (isUndefined(this._spec.maxWidth)) {
83218
83231
  this._spec.maxWidth = '30%';
83219
83232
  }
83220
83233
  const axisStyle = this._getAxisAttributes();
@@ -83569,6 +83582,11 @@
83569
83582
  items: this.getLabelItems(width)
83570
83583
  };
83571
83584
  }
83585
+ let verticalMinSize = isX ? this._minHeight : this._minWidth;
83586
+ if ((isX && this._layoutRectLevelMap.height === USER_LAYOUT_RECT_LEVEL) ||
83587
+ (isY && this._layoutRectLevelMap.width === USER_LAYOUT_RECT_LEVEL)) {
83588
+ verticalMinSize = this._verticalLimitSize;
83589
+ }
83572
83590
  const attrs = {
83573
83591
  start: { x: 0, y: 0 },
83574
83592
  end,
@@ -83583,7 +83601,8 @@
83583
83601
  maxWidth: this._getTitleLimit(isX)
83584
83602
  },
83585
83603
  items: this.getLabelItems(axisLength),
83586
- verticalLimitSize: this._verticalLimitSize
83604
+ verticalLimitSize: this._verticalLimitSize,
83605
+ verticalMinSize
83587
83606
  };
83588
83607
  return attrs;
83589
83608
  }
@@ -90678,14 +90697,11 @@
90678
90697
  if (baseMark) {
90679
90698
  const configFunc = (_a = markLabelConfigFunc[baseMark.type]) !== null && _a !== void 0 ? _a : markLabelConfigFunc.symbol;
90680
90699
  const labelSpec = (_b = baseMark.getLabelSpec()) !== null && _b !== void 0 ? _b : {};
90681
- const { smartInvert, offset, overlap, animation } = labelSpec;
90682
90700
  const interactive = this._interactiveConfig(labelSpec);
90701
+ const passiveLabelSpec = pickWithout(labelSpec, ['position', 'style', 'state']);
90683
90702
  return merge$2({
90684
90703
  textStyle: { pickable: labelSpec.interactive === true }
90685
- }, configFunc(labelInfo[baseMarks.findIndex(mark => mark === baseMark)]), Object.assign({ smartInvert,
90686
- offset,
90687
- animation,
90688
- overlap }, interactive));
90704
+ }, configFunc(labelInfo[baseMarks.findIndex(mark => mark === baseMark)]), Object.assign(Object.assign({}, passiveLabelSpec), interactive));
90689
90705
  }
90690
90706
  })
90691
90707
  .encode((datum, element) => {