evui 3.3.5 → 3.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/dist/evui.umd.js CHANGED
@@ -7859,7 +7859,7 @@ $({ target: 'Number', stat: true }, {
7859
7859
  /***/ "9224":
7860
7860
  /***/ (function(module) {
7861
7861
 
7862
- module.exports = JSON.parse("{\"a\":\"3.3.5\"}");
7862
+ module.exports = JSON.parse("{\"a\":\"3.3.6\"}");
7863
7863
 
7864
7864
  /***/ }),
7865
7865
 
@@ -38540,6 +38540,7 @@ var plugins_pie_modules = {
38540
38540
 
38541
38541
 
38542
38542
 
38543
+
38543
38544
  var element_tip_modules = {
38544
38545
  /**
38545
38546
  * Draw TextTip with tip's locationInfo
@@ -38551,28 +38552,10 @@ var element_tip_modules = {
38551
38552
  var opt = this.options;
38552
38553
  var isHorizontal = !!opt.horizontal;
38553
38554
  var maxTipOpt = opt.maxTip;
38554
- var selectItemOpt = opt.selectItem;
38555
+ var selTipOpt = opt.selectItem;
38555
38556
  var maxArgs;
38556
38557
 
38557
- if (maxTipOpt.use) {
38558
- var maxSID = this.minMax[isHorizontal ? 'x' : 'y'][0].maxSID;
38559
- maxArgs = this.calculateTipInfo(this.seriesList[maxSID], 'max', null);
38560
-
38561
- if (maxTipOpt.use && maxArgs) {
38562
- this.drawTextTip(_objectSpread2({
38563
- opt: maxTipOpt,
38564
- tipType: 'max'
38565
- }, maxArgs));
38566
-
38567
- if (maxTipOpt.showIndicator) {
38568
- this.drawFixedIndicator(_objectSpread2({
38569
- opt: maxTipOpt
38570
- }, maxArgs));
38571
- }
38572
- }
38573
- }
38574
-
38575
- if (selectItemOpt.use && tipLocationInfo) {
38558
+ if (selTipOpt.use && tipLocationInfo) {
38576
38559
  var seriesInfo = this.seriesList[tipLocationInfo === null || tipLocationInfo === void 0 ? void 0 : tipLocationInfo.sId];
38577
38560
 
38578
38561
  if (!(seriesInfo !== null && seriesInfo !== void 0 && seriesInfo.show)) {
@@ -38581,7 +38564,7 @@ var element_tip_modules = {
38581
38564
 
38582
38565
  var selArgs = this.calculateTipInfo(seriesInfo, 'sel', tipLocationInfo);
38583
38566
 
38584
- if (selectItemOpt.use && selArgs) {
38567
+ if (selArgs) {
38585
38568
  var _maxArgs;
38586
38569
 
38587
38570
  var isSamePos = false;
@@ -38590,17 +38573,25 @@ var element_tip_modules = {
38590
38573
  isSamePos = true;
38591
38574
  }
38592
38575
 
38593
- if (selectItemOpt.showTextTip || selectItemOpt.showTip) {
38576
+ if (selTipOpt.showTextTip || selTipOpt.showTip) {
38577
+ if (selTipOpt.tipText === 'label') {
38578
+ var axisOpt = isHorizontal ? opt.axesY[0] : opt.axesX[0];
38579
+ var label = selArgs.label;
38580
+ selArgs.text = axisOpt.type === 'time' ? dayjs_min_default()(label).format(axisOpt.timeFormat) : label;
38581
+ } else {
38582
+ selArgs.text = numberWithComma(selArgs.value);
38583
+ }
38584
+
38594
38585
  this.drawTextTip(_objectSpread2({
38595
- opt: selectItemOpt,
38586
+ opt: selTipOpt,
38596
38587
  tipType: 'sel',
38597
38588
  isSamePos: isSamePos
38598
38589
  }, selArgs));
38599
38590
  }
38600
38591
 
38601
- if (selectItemOpt.showIndicator) {
38592
+ if (selTipOpt.showIndicator) {
38602
38593
  this.drawFixedIndicator(_objectSpread2({
38603
- opt: selectItemOpt
38594
+ opt: selTipOpt
38604
38595
  }, selArgs));
38605
38596
  }
38606
38597
  }
@@ -38609,6 +38600,25 @@ var element_tip_modules = {
38609
38600
  this.lastHitInfo = tipLocationInfo;
38610
38601
  }
38611
38602
  }
38603
+
38604
+ if (maxTipOpt.use) {
38605
+ var maxSID = this.minMax[isHorizontal ? 'x' : 'y'][0].maxSID;
38606
+ maxArgs = this.calculateTipInfo(this.seriesList[maxSID], 'max', null);
38607
+
38608
+ if (maxTipOpt.use && maxArgs) {
38609
+ maxArgs.text = numberWithComma(maxArgs.value);
38610
+ this.drawTextTip(_objectSpread2({
38611
+ opt: maxTipOpt,
38612
+ tipType: 'max'
38613
+ }, maxArgs));
38614
+
38615
+ if (maxTipOpt.showIndicator) {
38616
+ this.drawFixedIndicator(_objectSpread2({
38617
+ opt: maxTipOpt
38618
+ }, maxArgs));
38619
+ }
38620
+ }
38621
+ }
38612
38622
  },
38613
38623
 
38614
38624
  /**
@@ -38663,17 +38673,23 @@ var element_tip_modules = {
38663
38673
  }
38664
38674
 
38665
38675
  var value = isHorizontal ? series.minMax.maxX : series.minMax.maxY;
38676
+ var label;
38666
38677
 
38667
38678
  if (tipType === 'sel') {
38668
38679
  if (hitInfo && hitInfo.value !== null) {
38669
38680
  value = hitInfo.useStack ? hitInfo.acc : hitInfo.value;
38681
+ label = hitInfo.label;
38670
38682
  lastTip.value = value;
38683
+ lastTip.label = label;
38671
38684
  } else if (lastTip.value !== null) {
38672
38685
  value = lastTip.value;
38686
+ label = lastTip.label;
38673
38687
  } else if (lastTip.pos !== null) {
38674
38688
  var item = type === 'bar' ? this.getItemByLabelIndex(lastTip.pos) : this.getItemByLabel(lastTip.pos);
38675
38689
  value = item.useStack ? item.acc : item.value;
38690
+ label = item.label;
38676
38691
  lastTip.value = value;
38692
+ lastTip.label = label;
38677
38693
  }
38678
38694
  }
38679
38695
 
@@ -38707,7 +38723,7 @@ var element_tip_modules = {
38707
38723
  var dataObj = {
38708
38724
  dp: dp,
38709
38725
  value: value,
38710
- text: numberWithComma(value),
38726
+ label: label,
38711
38727
  type: type
38712
38728
  };
38713
38729
  return _objectSpread2(_objectSpread2({}, sizeObj), dataObj);
@@ -39898,6 +39914,7 @@ var DEFAULT_OPTIONS = {
39898
39914
  selectItem: {
39899
39915
  use: false,
39900
39916
  showTextTip: false,
39917
+ tipText: 'value',
39901
39918
  showTip: false,
39902
39919
  showIndicator: false,
39903
39920
  fixedPosTop: false,