evui 3.4.90 → 3.4.91

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.
@@ -11241,7 +11241,7 @@ $({ target: 'Number', stat: true }, {
11241
11241
  /***/ "9224":
11242
11242
  /***/ (function(module) {
11243
11243
 
11244
- module.exports = JSON.parse("{\"a\":\"3.4.90\"}");
11244
+ module.exports = JSON.parse("{\"a\":\"3.4.91\"}");
11245
11245
 
11246
11246
  /***/ }),
11247
11247
 
@@ -39661,14 +39661,23 @@ var modules = {
39661
39661
  if (ldata !== null && ldata !== undefined) {
39662
39662
  var g = isHorizontal ? data.o || data.x : data.o || data.y;
39663
39663
 
39664
- if (series.stackIndex) {
39664
+ if (series.stackIndex != null) {
39665
39665
  acc += !isNaN(data.o) ? data.o : 0;
39666
39666
  useStack = true;
39667
39667
  } else {
39668
39668
  acc += data.y;
39669
39669
  }
39670
39670
 
39671
- if (maxValue === null || maxValue <= g) {
39671
+ if (maxType === 'bar' && useStack) {
39672
+ if (item.hit) {
39673
+ maxValue = g;
39674
+ maxSeriesID = seriesID;
39675
+ maxIndex = index;
39676
+ maxLabel = ldata;
39677
+ maxValuePos = lp;
39678
+ maxType = series.type;
39679
+ }
39680
+ } else if (maxValue === null || maxValue <= g) {
39672
39681
  maxValue = g;
39673
39682
  maxSeriesID = seriesID;
39674
39683
  maxLabel = ldata;
@@ -50068,21 +50077,19 @@ var plugins_interaction_modules = {
50068
50077
  e: e
50069
50078
  };
50070
50079
 
50071
- if (selectItem.use) {
50072
- var offset = _this.getMousePosition(e);
50073
-
50074
- var hitInfo = _this.getItemByPosition(offset, selectItem.useApproximateValue);
50080
+ var offset = _this.getMousePosition(e);
50075
50081
 
50076
- if (hitInfo.label !== null) {
50077
- _this.render(hitInfo);
50078
- }
50082
+ var hitInfo = _this.getItemByPosition(offset, selectItem.useApproximateValue);
50079
50083
 
50080
- args.label = hitInfo.label;
50081
- args.value = hitInfo.value;
50082
- args.seriesId = hitInfo.sId;
50083
- args.acc = hitInfo.acc;
50084
+ if (hitInfo.label !== null) {
50085
+ _this.render(hitInfo);
50084
50086
  }
50085
50087
 
50088
+ args.label = hitInfo.label;
50089
+ args.value = hitInfo.value;
50090
+ args.seriesId = hitInfo.sId;
50091
+ args.acc = hitInfo.acc;
50092
+
50086
50093
  if (typeof _this.listeners['dbl-click'] === 'function') {
50087
50094
  _this.listeners['dbl-click'](args);
50088
50095
  }
@@ -50134,6 +50141,8 @@ var plugins_interaction_modules = {
50134
50141
  };
50135
50142
 
50136
50143
  var setSelectedLabelInfo = function setSelectedLabelInfo(targetAxis) {
50144
+ var itemHitInfo = _this.getItemByPosition(offset, false);
50145
+
50137
50146
  var _this$getLabelInfoByP = _this.getLabelInfoByPosition(offset, targetAxis),
50138
50147
  clickedLabelIndex = _this$getLabelInfoByP.labelIndex;
50139
50148
 
@@ -50149,9 +50158,13 @@ var plugins_interaction_modules = {
50149
50158
  args.selected = _objectSpread2({
50150
50159
  eventTarget: 'label'
50151
50160
  }, lodash_es_cloneDeep(_this.defaultSelectInfo));
50161
+ args.label = itemHitInfo.label;
50162
+ args.dataIndex = itemHitInfo.maxIndex;
50152
50163
  };
50153
50164
 
50154
50165
  var setSelectedSeriesInfo = function setSelectedSeriesInfo() {
50166
+ var itemHitInfo = _this.getItemByPosition(offset, false);
50167
+
50155
50168
  var hitInfo = _this.getSeriesInfoByPosition(offset);
50156
50169
 
50157
50170
  if (hitInfo.sId !== null) {
@@ -50161,6 +50174,8 @@ var plugins_interaction_modules = {
50161
50174
  args.selected = _objectSpread2({
50162
50175
  eventTarget: 'series'
50163
50176
  }, lodash_es_cloneDeep(_this.defaultSelectInfo));
50177
+ args.label = itemHitInfo.label;
50178
+ args.dataIndex = itemHitInfo.maxIndex;
50164
50179
  }
50165
50180
  };
50166
50181
 
@@ -50787,24 +50802,31 @@ var plugins_interaction_modules = {
50787
50802
  }
50788
50803
 
50789
50804
  if (gdata !== null && gdata !== undefined) {
50790
- var sName = series.name;
50791
- var sw = ctx ? ctx.measureText(sName).width : 1;
50792
- item.name = sName;
50805
+ var formattedSeriesName = this.getFormattedTooltipLabel({
50806
+ dataId: series.id,
50807
+ seriesId: sId,
50808
+ seriesName: series.name,
50809
+ itemData: item.data
50810
+ });
50811
+ var sw = ctx ? ctx.measureText(formattedSeriesName).width : 1;
50812
+ item.id = series.id;
50813
+ item.name = formattedSeriesName;
50793
50814
  item.axis = {
50794
50815
  x: series.xAxisIndex,
50795
50816
  y: series.yAxisIndex
50796
50817
  };
50797
50818
  items[sId] = item;
50798
50819
  var formattedTxt = this.getFormattedTooltipValue({
50820
+ dataId: series.id,
50799
50821
  seriesId: sId,
50800
- seriesName: sName,
50822
+ seriesName: formattedSeriesName,
50801
50823
  value: gdata,
50802
50824
  itemData: item.data
50803
50825
  });
50804
50826
  item.data.formatted = formattedTxt;
50805
50827
 
50806
50828
  if (maxsw < sw) {
50807
- maxs = sName;
50829
+ maxs = formattedSeriesName;
50808
50830
  maxsw = sw;
50809
50831
  }
50810
50832
 
@@ -50836,24 +50858,58 @@ var plugins_interaction_modules = {
50836
50858
  },
50837
50859
 
50838
50860
  /**
50839
- * get formatted value for tooltip
50861
+ * get formatted label for tooltip
50862
+ * @param dataId
50840
50863
  * @param seriesId
50841
50864
  * @param seriesName
50842
- * @param value
50843
50865
  * @param itemData
50844
50866
  * @returns {string}
50845
50867
  */
50846
- getFormattedTooltipValue: function getFormattedTooltipValue(_ref2) {
50868
+ getFormattedTooltipLabel: function getFormattedTooltipLabel(_ref2) {
50847
50869
  var _tooltipOpt$formatter;
50848
50870
 
50849
- var seriesId = _ref2.seriesId,
50871
+ var dataId = _ref2.dataId,
50872
+ seriesId = _ref2.seriesId,
50850
50873
  seriesName = _ref2.seriesName,
50851
- value = _ref2.value,
50852
50874
  itemData = _ref2.itemData;
50853
50875
  var opt = this.options;
50876
+ var tooltipOpt = opt.tooltip;
50877
+ var tooltipLabelFormatter = tooltipOpt === null || tooltipOpt === void 0 ? void 0 : (_tooltipOpt$formatter = tooltipOpt.formatter) === null || _tooltipOpt$formatter === void 0 ? void 0 : _tooltipOpt$formatter.label;
50878
+ var formattedLabel = seriesName;
50879
+
50880
+ if (tooltipLabelFormatter) {
50881
+ formattedLabel = tooltipLabelFormatter({
50882
+ dataId: dataId,
50883
+ seriesId: seriesId,
50884
+ seriesName: seriesName,
50885
+ itemData: itemData
50886
+ });
50887
+ }
50888
+
50889
+ return formattedLabel;
50890
+ },
50891
+
50892
+ /**
50893
+ * get formatted value for tooltip
50894
+ * @param dataId
50895
+ * @param seriesId
50896
+ * @param seriesName
50897
+ * @param value
50898
+ * @param itemData
50899
+ * @returns {string}
50900
+ */
50901
+ getFormattedTooltipValue: function getFormattedTooltipValue(_ref3) {
50902
+ var _tooltipOpt$formatter2;
50903
+
50904
+ var dataId = _ref3.dataId,
50905
+ seriesId = _ref3.seriesId,
50906
+ seriesName = _ref3.seriesName,
50907
+ value = _ref3.value,
50908
+ itemData = _ref3.itemData;
50909
+ var opt = this.options;
50854
50910
  var isHorizontal = !!opt.horizontal;
50855
50911
  var tooltipOpt = opt.tooltip;
50856
- var tooltipValueFormatter = typeof (tooltipOpt === null || tooltipOpt === void 0 ? void 0 : tooltipOpt.formatter) === 'function' ? tooltipOpt === null || tooltipOpt === void 0 ? void 0 : tooltipOpt.formatter : tooltipOpt === null || tooltipOpt === void 0 ? void 0 : (_tooltipOpt$formatter = tooltipOpt.formatter) === null || _tooltipOpt$formatter === void 0 ? void 0 : _tooltipOpt$formatter.value;
50912
+ var tooltipValueFormatter = typeof (tooltipOpt === null || tooltipOpt === void 0 ? void 0 : tooltipOpt.formatter) === 'function' ? tooltipOpt === null || tooltipOpt === void 0 ? void 0 : tooltipOpt.formatter : tooltipOpt === null || tooltipOpt === void 0 ? void 0 : (_tooltipOpt$formatter2 = tooltipOpt.formatter) === null || _tooltipOpt$formatter2 === void 0 ? void 0 : _tooltipOpt$formatter2.value;
50857
50913
  var formattedTxt = value;
50858
50914
 
50859
50915
  if (tooltipValueFormatter) {
@@ -50862,21 +50918,24 @@ var plugins_interaction_modules = {
50862
50918
  value: value,
50863
50919
  name: seriesName,
50864
50920
  percentage: itemData === null || itemData === void 0 ? void 0 : itemData.percentage,
50865
- seriesId: seriesId
50921
+ seriesId: seriesId,
50922
+ dataId: dataId
50866
50923
  });
50867
50924
  } else if (opt.type === 'heatMap') {
50868
50925
  formattedTxt = tooltipValueFormatter({
50869
50926
  x: itemData === null || itemData === void 0 ? void 0 : itemData.x,
50870
50927
  y: itemData === null || itemData === void 0 ? void 0 : itemData.y,
50871
50928
  value: value > -1 ? value : 'error',
50872
- seriesId: seriesId
50929
+ seriesId: seriesId,
50930
+ dataId: dataId
50873
50931
  });
50874
50932
  } else {
50875
50933
  formattedTxt = tooltipValueFormatter({
50876
50934
  x: isHorizontal ? value : itemData === null || itemData === void 0 ? void 0 : itemData.x,
50877
50935
  y: isHorizontal ? itemData === null || itemData === void 0 ? void 0 : itemData.y : value,
50878
50936
  name: seriesName,
50879
- seriesId: seriesId
50937
+ seriesId: seriesId,
50938
+ dataId: dataId
50880
50939
  });
50881
50940
  }
50882
50941
  }
@@ -50915,9 +50974,16 @@ var plugins_interaction_modules = {
50915
50974
  var hasData = series.data.find(function (data) {
50916
50975
  return isHorizontal ? (data === null || data === void 0 ? void 0 : data.y) === hitItemData : (data === null || data === void 0 ? void 0 : data.x) === hitItemData;
50917
50976
  });
50918
- var formattedValue = this.getFormattedTooltipValue({
50977
+ var formattedSeriesName = this.getFormattedTooltipLabel({
50978
+ dataId: series.id,
50919
50979
  seriesId: sId,
50920
50980
  seriesName: series.name,
50981
+ itemData: hasData
50982
+ });
50983
+ var formattedValue = this.getFormattedTooltipValue({
50984
+ dataId: series.id,
50985
+ seriesId: sId,
50986
+ seriesName: formattedSeriesName,
50921
50987
  value: hasData === null || hasData === void 0 ? void 0 : hasData.o,
50922
50988
  itemData: hasData
50923
50989
  });
@@ -50926,7 +50992,7 @@ var plugins_interaction_modules = {
50926
50992
  var item = {};
50927
50993
  item.color = series.color;
50928
50994
  item.hit = false;
50929
- item.name = series.name;
50995
+ item.name = formattedSeriesName;
50930
50996
  item.axis = {
50931
50997
  x: series.xAxisIndex,
50932
50998
  y: series.yAxisIndex
@@ -50938,10 +51004,10 @@ var plugins_interaction_modules = {
50938
51004
  }
50939
51005
 
50940
51006
  var maxSeriesNameWidth = ctx ? ctx.measureText(maxSeriesName).width : 1;
50941
- var seriesNameWidth = ctx ? ctx.measureText(series.name).width : 1;
51007
+ var seriesNameWidth = ctx ? ctx.measureText(formattedSeriesName).width : 1;
50942
51008
 
50943
51009
  if (maxSeriesNameWidth < seriesNameWidth) {
50944
- maxSeriesName = series.name;
51010
+ maxSeriesName = formattedSeriesName;
50945
51011
  }
50946
51012
 
50947
51013
  var maxValueWidth = ctx ? ctx.measureText(maxValueTxt).width : 1;
@@ -51032,10 +51098,10 @@ var plugins_interaction_modules = {
51032
51098
  });
51033
51099
  var dataEntries = Object.entries(this.data.data);
51034
51100
  result.data = result.dataIndex.map(function (labelIdx) {
51035
- return Object.fromEntries(dataEntries.map(function (_ref3) {
51036
- var _ref4 = _slicedToArray(_ref3, 2),
51037
- sId = _ref4[0],
51038
- data = _ref4[1];
51101
+ return Object.fromEntries(dataEntries.map(function (_ref4) {
51102
+ var _ref5 = _slicedToArray(_ref4, 2),
51103
+ sId = _ref5[0],
51104
+ data = _ref5[1];
51039
51105
 
51040
51106
  return [sId, data[labelIdx]];
51041
51107
  }));
@@ -51061,9 +51127,9 @@ var plugins_interaction_modules = {
51061
51127
  return _this4.data.labels[targetAxisDirection][i];
51062
51128
  });
51063
51129
  var dataValues = Object.values(this.data.data)[0];
51064
- result.data = dataValues.filter(function (_ref5) {
51065
- var x = _ref5.x,
51066
- y = _ref5.y;
51130
+ result.data = dataValues.filter(function (_ref6) {
51131
+ var x = _ref6.x,
51132
+ y = _ref6.y;
51067
51133
  return result.label.includes(targetAxisDirection === 'y' ? y : x);
51068
51134
  });
51069
51135
  break;
@@ -51178,14 +51244,14 @@ var plugins_interaction_modules = {
51178
51244
  * object.range: coordinate-based range in graph
51179
51245
  * @returns {object}
51180
51246
  */
51181
- getSelectionRange: function getSelectionRange(_ref6) {
51247
+ getSelectionRange: function getSelectionRange(_ref7) {
51182
51248
  var _this$boxOverflow, _this$boxOverflow2, _this$boxOverflow3, _this$boxOverflow4;
51183
51249
 
51184
- var xsp = _ref6.xsp,
51185
- ysp = _ref6.ysp,
51186
- width = _ref6.width,
51187
- height = _ref6.height,
51188
- range = _ref6.range;
51250
+ var xsp = _ref7.xsp,
51251
+ ysp = _ref7.ysp,
51252
+ width = _ref7.width,
51253
+ height = _ref7.height,
51254
+ range = _ref7.range;
51189
51255
  var dataRangeX = this.axesSteps.x.length ? this.axesSteps.x[0] : null;
51190
51256
  var dataRangeY = this.axesSteps.y.length ? this.axesSteps.y[0] : null;
51191
51257
 
@@ -51242,11 +51308,11 @@ var plugins_interaction_modules = {
51242
51308
 
51243
51309
  var sId = Object.keys(this.seriesList)[0];
51244
51310
 
51245
- var _ref7 = (_this$seriesList$sId$ = this.seriesList[sId].findSelectionRange(range)) !== null && _this$seriesList$sId$ !== void 0 ? _this$seriesList$sId$ : {},
51246
- xMin = _ref7.xMin,
51247
- xMax = _ref7.xMax,
51248
- yMin = _ref7.yMin,
51249
- yMax = _ref7.yMax;
51311
+ var _ref8 = (_this$seriesList$sId$ = this.seriesList[sId].findSelectionRange(range)) !== null && _this$seriesList$sId$ !== void 0 ? _this$seriesList$sId$ : {},
51312
+ xMin = _ref8.xMin,
51313
+ xMax = _ref8.xMax,
51314
+ yMin = _ref8.yMin,
51315
+ yMax = _ref8.yMax;
51250
51316
 
51251
51317
  return {
51252
51318
  xMin: xMin !== null && xMin !== void 0 ? xMin : dataRangeX.graphMin,
@@ -51621,9 +51687,11 @@ var plugins_tooltip_modules = {
51621
51687
  var seriesList = [];
51622
51688
  seriesKeys.forEach(function (seriesName) {
51623
51689
  seriesList.push({
51690
+ id: seriesName,
51624
51691
  data: items[seriesName].data,
51625
51692
  color: items[seriesName].color,
51626
- name: items[seriesName].name
51693
+ name: items[seriesName].name,
51694
+ dataId: items[seriesName].id
51627
51695
  });
51628
51696
  });
51629
51697
 
@@ -51648,7 +51716,7 @@ var plugins_tooltip_modules = {
51648
51716
  var textLineCnt = 1;
51649
51717
 
51650
51718
  for (var ix = 0; ix < seriesList.length; ix++) {
51651
- var _opt$fontColor$label, _opt$fontColor, _opt$fontColor$value, _opt$fontColor2;
51719
+ var _opt$fontColor$label, _opt$fontColor$value;
51652
51720
 
51653
51721
  var gdata = seriesList[ix].data;
51654
51722
  var color = seriesList[ix].color;
@@ -51669,15 +51737,21 @@ var plugins_tooltip_modules = {
51669
51737
  }, color);
51670
51738
  } else {
51671
51739
  ctx.fillStyle = color;
51672
- } // 1. Draw series color
51740
+ }
51673
51741
 
51742
+ var curTooltipInfo = {
51743
+ id: seriesList[ix].id,
51744
+ name: seriesList[ix].name,
51745
+ value: valueText,
51746
+ dataId: seriesList[ix].dataId
51747
+ }; // 1. Draw series color
51674
51748
 
51675
51749
  this.drawSeriesColorShape(ctx, opt.colorShape, {
51676
51750
  x: itemX,
51677
51751
  y: itemY
51678
51752
  }); // 2. Draw series name
51679
51753
 
51680
- ctx.fillStyle = (_opt$fontColor$label = (_opt$fontColor = opt.fontColor) === null || _opt$fontColor === void 0 ? void 0 : _opt$fontColor.label) !== null && _opt$fontColor$label !== void 0 ? _opt$fontColor$label : opt.fontColor;
51754
+ ctx.fillStyle = typeof opt.fontColor.label === 'function' ? opt.fontColor.label(curTooltipInfo) : (_opt$fontColor$label = opt.fontColor.label) !== null && _opt$fontColor$label !== void 0 ? _opt$fontColor$label : opt.fontColor;
51681
51755
  ctx.textBaseline = 'Bottom';
51682
51756
  var seriesNameSpaceWidth = opt.maxWidth - Math.round(ctx.measureText(maxValue).width) - boxPadding.l - boxPadding.r - seriesColorMarginRight - VALUE_MARGIN;
51683
51757
  var xPos = itemX + seriesColorMarginRight;
@@ -51714,7 +51788,7 @@ var plugins_tooltip_modules = {
51714
51788
 
51715
51789
  ctx.save(); // 3. Draw value
51716
51790
 
51717
- ctx.fillStyle = (_opt$fontColor$value = (_opt$fontColor2 = opt.fontColor) === null || _opt$fontColor2 === void 0 ? void 0 : _opt$fontColor2.value) !== null && _opt$fontColor$value !== void 0 ? _opt$fontColor$value : opt.fontColor;
51791
+ ctx.fillStyle = typeof opt.fontColor.value === 'function' ? opt.fontColor.value(curTooltipInfo) : (_opt$fontColor$value = opt.fontColor.value) !== null && _opt$fontColor$value !== void 0 ? _opt$fontColor$value : opt.fontColor;
51718
51792
  ctx.textAlign = 'right';
51719
51793
  ctx.fillText(valueText, this.tooltipDOM.offsetWidth - boxPadding.r, itemY);
51720
51794
  ctx.restore();
@@ -51735,7 +51809,7 @@ var plugins_tooltip_modules = {
51735
51809
  * @returns {undefined}
51736
51810
  */
51737
51811
  drawToolTipForHeatMap: function drawToolTipForHeatMap(hitInfo, context) {
51738
- var _opt$fontColor$label2, _opt$fontColor3;
51812
+ var _opt$fontColor$label2, _opt$fontColor$value2;
51739
51813
 
51740
51814
  var ctx = context;
51741
51815
  var items = hitInfo.items;
@@ -51809,15 +51883,21 @@ var plugins_tooltip_modules = {
51809
51883
  }, hitColor);
51810
51884
  } else {
51811
51885
  ctx.fillStyle = hitColor;
51812
- } // 1. Draw value color
51886
+ }
51813
51887
 
51888
+ var curTooltipInfo = {
51889
+ id: hitInfo.hitId,
51890
+ name: hitItem.y,
51891
+ value: valueText,
51892
+ dataId: items[sId].id
51893
+ }; // 1. Draw value color
51814
51894
 
51815
51895
  this.drawSeriesColorShape(ctx, opt.colorShape, {
51816
51896
  x: itemX,
51817
51897
  y: itemY
51818
51898
  }); // 2. Draw value y names
51819
51899
 
51820
- ctx.fillStyle = (_opt$fontColor$label2 = (_opt$fontColor3 = opt.fontColor) === null || _opt$fontColor3 === void 0 ? void 0 : _opt$fontColor3.label) !== null && _opt$fontColor$label2 !== void 0 ? _opt$fontColor$label2 : opt.fontColor;
51900
+ ctx.fillStyle = typeof opt.fontColor.label === 'function' ? opt.fontColor.label(curTooltipInfo) : (_opt$fontColor$label2 = opt.fontColor.label) !== null && _opt$fontColor$label2 !== void 0 ? _opt$fontColor$label2 : opt.fontColor;
51821
51901
  ctx.textBaseline = 'Bottom';
51822
51902
 
51823
51903
  if (this.axesY.length) {
@@ -51826,6 +51906,7 @@ var plugins_tooltip_modules = {
51826
51906
 
51827
51907
 
51828
51908
  ctx.textAlign = 'right';
51909
+ ctx.fillStyle = typeof opt.fontColor.value === 'function' ? opt.fontColor.value(curTooltipInfo) : (_opt$fontColor$value2 = opt.fontColor.value) !== null && _opt$fontColor$value2 !== void 0 ? _opt$fontColor$value2 : opt.fontColor;
51829
51910
  ctx.fillText(valueText, this.tooltipDOM.offsetWidth - boxPadding.r, itemY);
51830
51911
  ctx.closePath();
51831
51912
  },
@@ -51898,7 +51979,7 @@ var plugins_tooltip_modules = {
51898
51979
  var textLineCnt = 1;
51899
51980
 
51900
51981
  for (var ix = 0; ix < seriesList.length; ix++) {
51901
- var _opt$fontColor$label3, _opt$fontColor4;
51982
+ var _opt$fontColor$label3, _opt$fontColor$value3;
51902
51983
 
51903
51984
  var gdata = seriesList[ix].data;
51904
51985
  var color = seriesList[ix].color;
@@ -51919,15 +52000,21 @@ var plugins_tooltip_modules = {
51919
52000
  }, color);
51920
52001
  } else {
51921
52002
  ctx.fillStyle = color;
51922
- } // 1. Draw series color
52003
+ }
51923
52004
 
52005
+ var curTooltipInfo = {
52006
+ id: hitInfo.hitId,
52007
+ name: seriesList[ix].name,
52008
+ value: valueText,
52009
+ dataId: seriesList[ix].dataId
52010
+ }; // 1. Draw series color
51924
52011
 
51925
52012
  this.drawSeriesColorShape(ctx, opt.colorShape, {
51926
52013
  x: itemX,
51927
52014
  y: itemY
51928
52015
  }); // 2. Draw series name
51929
52016
 
51930
- ctx.fillStyle = (_opt$fontColor$label3 = (_opt$fontColor4 = opt.fontColor) === null || _opt$fontColor4 === void 0 ? void 0 : _opt$fontColor4.label) !== null && _opt$fontColor$label3 !== void 0 ? _opt$fontColor$label3 : opt.fontColor;
52017
+ ctx.fillStyle = typeof opt.fontColor.label === 'function' ? opt.fontColor.label(curTooltipInfo) : (_opt$fontColor$label3 = opt.fontColor.label) !== null && _opt$fontColor$label3 !== void 0 ? _opt$fontColor$label3 : opt.fontColor;
51931
52018
  ctx.textBaseline = 'Bottom';
51932
52019
  var seriesNameSpaceWidth = opt.maxWidth - Math.round(ctx.measureText(maxValue).width) - boxPadding.l - boxPadding.r - seriesColorMarginRight - VALUE_MARGIN;
51933
52020
  var xPos = itemX + seriesColorMarginRight;
@@ -51965,6 +52052,7 @@ var plugins_tooltip_modules = {
51965
52052
  ctx.save(); // 3. Draw value
51966
52053
 
51967
52054
  ctx.textAlign = 'right';
52055
+ ctx.fillStyle = typeof opt.fontColor.value === 'function' ? opt.fontColor.value(curTooltipInfo) : (_opt$fontColor$value3 = opt.fontColor.value) !== null && _opt$fontColor$value3 !== void 0 ? _opt$fontColor$value3 : opt.fontColor;
51968
52056
  ctx.fillText(valueText, this.tooltipDOM.offsetWidth - boxPadding.r, itemY);
51969
52057
  ctx.restore();
51970
52058
  ctx.closePath(); // 4. add lineSpacing
@@ -52016,7 +52104,7 @@ var plugins_tooltip_modules = {
52016
52104
  var opt = (_this$options5 = this.options) === null || _this$options5 === void 0 ? void 0 : _this$options5.tooltip;
52017
52105
 
52018
52106
  if ((_opt$formatter2 = opt.formatter) !== null && _opt$formatter2 !== void 0 && _opt$formatter2.html) {
52019
- var _opt$formatter3, _opt$fontColor$title, _opt$fontColor5;
52107
+ var _opt$formatter3, _opt$fontColor$title, _opt$fontColor;
52020
52108
 
52021
52109
  this.tooltipDOM.innerHTML = '';
52022
52110
  var seriesList = [];
@@ -52037,7 +52125,7 @@ var plugins_tooltip_modules = {
52037
52125
  this.tooltipDOM.style.overflowY = 'hidden';
52038
52126
  this.tooltipDOM.style.backgroundColor = opt.backgroundColor;
52039
52127
  this.tooltipDOM.style.border = "1px solid ".concat(opt.borderColor);
52040
- this.tooltipDOM.style.color = (_opt$fontColor$title = (_opt$fontColor5 = opt.fontColor) === null || _opt$fontColor5 === void 0 ? void 0 : _opt$fontColor5.title) !== null && _opt$fontColor$title !== void 0 ? _opt$fontColor$title : opt.fontColor;
52128
+ this.tooltipDOM.style.color = (_opt$fontColor$title = (_opt$fontColor = opt.fontColor) === null || _opt$fontColor === void 0 ? void 0 : _opt$fontColor.title) !== null && _opt$fontColor$title !== void 0 ? _opt$fontColor$title : opt.fontColor;
52041
52129
  }
52042
52130
  },
52043
52131