@easyv/config 1.3.5 → 1.3.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.
package/lib/label.js CHANGED
@@ -454,7 +454,6 @@ var defaultAxisLabel = {
454
454
  show: true,
455
455
  type: "date",
456
456
  showType: "MM月",
457
- labelNum: "Fixed",
458
457
  appearance: {
459
458
  count: 3,
460
459
  angle: 0,
@@ -462,6 +461,7 @@ var defaultAxisLabel = {
462
461
  textOverflow: "ellipsis",
463
462
  speed: 5
464
463
  },
464
+ adaptive: false,
465
465
  showLast: false,
466
466
  autoSort: false,
467
467
  textAlign: "center",
@@ -479,8 +479,6 @@ var axisLabel = function axisLabel() {
479
479
  showLabel = _ref4$show === void 0 ? defaultAxisLabel.show : _ref4$show,
480
480
  _ref4$labelType = _ref4.labelType,
481
481
  labelType = _ref4$labelType === void 0 ? defaultAxisLabel.type : _ref4$labelType,
482
- _ref4$labelNum = _ref4.labelNum,
483
- labelNum = _ref4$labelNum === void 0 ? defaultAxisLabel.labelNum : _ref4$labelNum,
484
482
  _ref4$showType = _ref4.showType,
485
483
  labelShowType = _ref4$showType === void 0 ? defaultAxisLabel.showType : _ref4$showType,
486
484
  _ref4$appearance = _ref4.appearance;
@@ -495,6 +493,8 @@ var axisLabel = function axisLabel() {
495
493
  textOverflow = _ref4$appearance$text === void 0 ? defaultAxisLabel.appearance.textOverflow : _ref4$appearance$text,
496
494
  _ref4$appearance$spee = _ref4$appearance.speed,
497
495
  speed = _ref4$appearance$spee === void 0 ? defaultAxisLabel.appearance.speed : _ref4$appearance$spee,
496
+ _ref4$adaptive = _ref4.adaptive,
497
+ adaptive = _ref4$adaptive === void 0 ? defaultAxisLabel.adaptive : _ref4$adaptive,
498
498
  _ref4$showLast = _ref4.showLast,
499
499
  showLast = _ref4$showLast === void 0 ? defaultAxisLabel.showLast : _ref4$showLast,
500
500
  _ref4$autoSort = _ref4.autoSort,
@@ -653,23 +653,12 @@ var axisLabel = function axisLabel() {
653
653
  }
654
654
  }, {
655
655
  rule: [["show", "$eq", true]],
656
- type: "radio",
657
- name: "labelNum",
658
- displayName: "标签数量",
659
- value: labelNum,
660
- config: {
661
- options: [{
662
- name: "固定",
663
- value: "Fixed"
664
- }, {
665
- name: "自动",
666
- value: "auto"
667
- }],
668
- span: 24,
669
- mode: "normal"
670
- }
656
+ name: "adaptive",
657
+ displayName: "刻度自适应",
658
+ value: adaptive,
659
+ type: "boolean"
671
660
  }, {
672
- rule: [["show", "$eq", true], ["labelNum", "$eq", "Fixed"]],
661
+ rule: [["show", "$eq", true], ["adaptive", "$eq", false]],
673
662
  name: "appearance",
674
663
  displayName: "展示",
675
664
  tip: "展示标签的数量会根据原标签数量进行整除后按间距调整标签分布,如果输入的数量不能被整除,则无法按照输入数量进行展示。",
@@ -740,7 +729,7 @@ var axisLabel = function axisLabel() {
740
729
  tip: "数据按时间自动排序展示"
741
730
  }
742
731
  }, (0, _.showRule)("format", "$eq", "date")), {
743
- rule: [["labelNum", "$eq", "Fixed"]],
732
+ rule: [["adaptive", "$eq", false]],
744
733
  type: "radio",
745
734
  name: "textAlign",
746
735
  displayName: "对齐",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/config",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/label.js CHANGED
@@ -434,7 +434,6 @@ const defaultAxisLabel = {
434
434
  show: true,
435
435
  type: "date",
436
436
  showType: "MM月",
437
- labelNum: "Fixed",
438
437
  appearance: {
439
438
  count: 3,
440
439
  angle: 0,
@@ -442,6 +441,7 @@ const defaultAxisLabel = {
442
441
  textOverflow: "ellipsis",
443
442
  speed: 5,
444
443
  },
444
+ adaptive:false,
445
445
  showLast: false,
446
446
  autoSort: false,
447
447
  textAlign: "center",
@@ -451,7 +451,6 @@ const defaultAxisLabel = {
451
451
  export const axisLabel = ({
452
452
  show: showLabel = defaultAxisLabel.show,
453
453
  labelType: labelType = defaultAxisLabel.type,
454
- labelNum: labelNum = defaultAxisLabel.labelNum,
455
454
  showType: labelShowType = defaultAxisLabel.showType,
456
455
  appearance: {
457
456
  count = defaultAxisLabel.appearance.count,
@@ -460,6 +459,7 @@ export const axisLabel = ({
460
459
  textOverflow = defaultAxisLabel.appearance.textOverflow,
461
460
  speed = defaultAxisLabel.appearance.speed,
462
461
  } = defaultAxisLabel.appearance,
462
+ adaptive=defaultAxisLabel.adaptive,
463
463
  showLast = defaultAxisLabel.showLast,
464
464
  autoSort = defaultAxisLabel.autoSort,
465
465
  textAlign = defaultAxisLabel.textAlign,
@@ -655,30 +655,17 @@ export const axisLabel = ({
655
655
  },
656
656
  },
657
657
  {
658
- rule: [["show", "$eq", true]],
659
- type: "radio",
660
- name: "labelNum",
661
- displayName: "标签数量",
662
- value: labelNum,
663
- config: {
664
- options: [
665
- {
666
- name: "固定",
667
- value: "Fixed",
668
- },
669
- {
670
- name: "自动",
671
- value: "auto",
672
- },
673
- ],
674
- span: 24,
675
- mode: "normal",
676
- },
658
+ rule: [
659
+ ["show", "$eq", true]
660
+ ],
661
+ name: "adaptive",
662
+ displayName: "刻度自适应",
663
+ value: adaptive,
664
+ type: "boolean"
677
665
  },
678
666
  {
679
667
  rule: [
680
- ["show", "$eq", true],
681
- ["labelNum", "$eq", "Fixed"],
668
+ ["show", "$eq", true],["adaptive", "$eq", false]
682
669
  ],
683
670
  name: "appearance",
684
671
  displayName: "展示",
@@ -761,7 +748,7 @@ export const axisLabel = ({
761
748
  showRule("format", "$eq", "date")
762
749
  ),
763
750
  {
764
- rule: [["labelNum", "$eq", "Fixed"]],
751
+ rule: [["adaptive", "$eq", false]],
765
752
  type: "radio",
766
753
  name: "textAlign",
767
754
  displayName: "对齐",