evui 3.3.28 → 3.3.29

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.
@@ -7940,7 +7940,7 @@ $({ target: 'Number', stat: true }, {
7940
7940
  /***/ "9224":
7941
7941
  /***/ (function(module) {
7942
7942
 
7943
- module.exports = JSON.parse("{\"a\":\"3.3.28\"}");
7943
+ module.exports = JSON.parse("{\"a\":\"3.3.29\"}");
7944
7944
 
7945
7945
  /***/ }),
7946
7946
 
@@ -34473,7 +34473,8 @@ var AXIS_OPTION = {
34473
34473
  fontFamily: 'Roboto',
34474
34474
  fontWeight: 400,
34475
34475
  fitWidth: false,
34476
- fitDir: 'right'
34476
+ fitDir: 'right',
34477
+ alignToGridLine: false
34477
34478
  },
34478
34479
  title: {
34479
34480
  use: false,
@@ -37494,7 +37495,11 @@ var scale_Scale = /*#__PURE__*/function () {
37494
37495
  numberOfSteps = Math.round(graphRange / interval);
37495
37496
 
37496
37497
  if (maxValue === 1) {
37497
- if (maxSteps > 2) {
37498
+ if (!this.decimalPoint) {
37499
+ interval = 1;
37500
+ numberOfSteps = 1;
37501
+ maxSteps = 1;
37502
+ } else if (maxSteps > 2) {
37498
37503
  interval = 0.2;
37499
37504
  numberOfSteps = 5;
37500
37505
  maxSteps = 5;
@@ -38539,6 +38544,7 @@ var scale_logarithmic_LogarithmicScale = /*#__PURE__*/function (_Scale) {
38539
38544
 
38540
38545
 
38541
38546
 
38547
+
38542
38548
  var scale_step_StepScale = /*#__PURE__*/function (_Scale) {
38543
38549
  _inherits(StepScale, _Scale);
38544
38550
 
@@ -38565,7 +38571,7 @@ var scale_step_StepScale = /*#__PURE__*/function (_Scale) {
38565
38571
  _createClass(StepScale, [{
38566
38572
  key: "calculateScaleRange",
38567
38573
  value: function calculateScaleRange(minMax, chartRect) {
38568
- var stepMinMax = this.rangeMode ? minMax : helpers_util.getStringMinMax(this.labels);
38574
+ var stepMinMax = this.labelStyle.alignToGridLine ? minMax : helpers_util.getStringMinMax(this.labels);
38569
38575
  var maxValue = stepMinMax.max;
38570
38576
  var minValue = stepMinMax.min;
38571
38577
  var maxWidth = chartRect.chartWidth / (this.labels.length + 2);
@@ -38589,8 +38595,11 @@ var scale_step_StepScale = /*#__PURE__*/function (_Scale) {
38589
38595
  value: function calculateSteps(range) {
38590
38596
  var numberOfSteps = this.labels.length;
38591
38597
  var interval = 1;
38598
+ var isNumbersArray = this.labels.every(function (label) {
38599
+ return !isNaN(label);
38600
+ });
38592
38601
 
38593
- if (this.rangeMode) {
38602
+ if (this.labelStyle.alignToGridLine && isNumbersArray) {
38594
38603
  var maxSteps = range.maxSteps;
38595
38604
 
38596
38605
  if (maxSteps > 2) {
@@ -38678,6 +38687,7 @@ var scale_step_StepScale = /*#__PURE__*/function (_Scale) {
38678
38687
  }
38679
38688
 
38680
38689
  var labelGap = (endPoint - startPoint) / labels.length;
38690
+ var alignToGridLine = this.labelStyle.alignToGridLine;
38681
38691
  var labelCenter = null;
38682
38692
  var linePosition = null;
38683
38693
  ctx.beginPath();
@@ -38707,7 +38717,7 @@ var scale_step_StepScale = /*#__PURE__*/function (_Scale) {
38707
38717
  var _this$options3, _this$options3$select, _this$options4;
38708
38718
 
38709
38719
  labelPoint = this.position === 'top' ? offsetPoint - 10 : offsetPoint + 10;
38710
- var xPoint = this.rangeMode ? labelCenter : labelCenter + labelGap / 2;
38720
+ var xPoint = alignToGridLine ? labelCenter : labelCenter + labelGap / 2;
38711
38721
  ctx.fillText(labelText, xPoint, labelPoint);
38712
38722
 
38713
38723
  if (!isBlurredLabel && (_this$options3 = this.options) !== null && _this$options3 !== void 0 && (_this$options3$select = _this$options3.selectItem) !== null && _this$options3$select !== void 0 && _this$options3$select.showLabelTip && hitInfo !== null && hitInfo !== void 0 && hitInfo.label && !((_this$options4 = this.options) !== null && _this$options4 !== void 0 && _this$options4.horizontal)) {
@@ -38738,7 +38748,7 @@ var scale_step_StepScale = /*#__PURE__*/function (_Scale) {
38738
38748
  }
38739
38749
  } else {
38740
38750
  labelPoint = this.position === 'left' ? offsetPoint - 10 : offsetPoint + 10;
38741
- var yPoint = this.rangeMode ? labelCenter : labelCenter + labelGap / 2;
38751
+ var yPoint = alignToGridLine ? labelCenter : labelCenter + labelGap / 2;
38742
38752
  ctx.fillText(labelText, labelPoint, yPoint);
38743
38753
 
38744
38754
  if (index > 0 && this.showGrid) {
@@ -38750,7 +38760,7 @@ var scale_step_StepScale = /*#__PURE__*/function (_Scale) {
38750
38760
  ctx.stroke();
38751
38761
  }
38752
38762
 
38753
- if (this.rangeMode && index === this.labels.length) {
38763
+ if (alignToGridLine && index === this.labels.length) {
38754
38764
  var labelLastText = +labels[labels.length - 1] + (+labels[1] - +labels[0]);
38755
38765
 
38756
38766
  if (isNaN(labelLastText)) {
@@ -39091,9 +39101,10 @@ var scale_time_category_TimeCategoryScale = /*#__PURE__*/function (_Scale) {
39091
39101
  return;
39092
39102
  }
39093
39103
 
39104
+ var alignToGridLine = this.labelStyle.alignToGridLine;
39094
39105
  var graphGap = (endPoint - startPoint) / (labels.length || 1);
39095
39106
 
39096
- if (this.categoryMode && !this.rangeMode) {
39107
+ if (this.categoryMode && !alignToGridLine) {
39097
39108
  startPoint += Math.ceil(graphGap / 2) - 2;
39098
39109
  }
39099
39110
 
@@ -39167,7 +39178,7 @@ var scale_time_category_TimeCategoryScale = /*#__PURE__*/function (_Scale) {
39167
39178
  ctx.stroke();
39168
39179
  }
39169
39180
 
39170
- if (this.categoryMode && this.rangeMode && count * steps === oriSteps) {
39181
+ if (this.categoryMode && alignToGridLine && count * steps === oriSteps) {
39171
39182
  var diffTime = dayjs_min_default()(labels[1]).diff(dayjs_min_default()(labels[0]));
39172
39183
  var labelLastText = this.getLabelFormat(dayjs_min_default()(labels[labels.length - 1] + diffTime));
39173
39184
  labelCenter = Math.round(startPoint + graphGap * labels.length);
@@ -39784,6 +39795,8 @@ var plugins_legend_modules = {
39784
39795
  while (legendDOM.hasChildNodes()) {
39785
39796
  legendDOM.removeChild(legendDOM.firstChild);
39786
39797
  }
39798
+
39799
+ this.seriesInfo.count = 0;
39787
39800
  },
39788
39801
 
39789
39802
  /**
@@ -41437,8 +41450,7 @@ var plugins_interaction_modules = {
41437
41450
  item.data.formatted = this.getFormattedTooltipValue({
41438
41451
  seriesName: series.name,
41439
41452
  value: hasData.o,
41440
- x: hasData.x,
41441
- y: hasData.y
41453
+ itemData: hasData
41442
41454
  });
41443
41455
  hitInfo.items[sId] = item;
41444
41456
  }