evui 3.3.48 → 3.3.49
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.common.js +311 -100
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +311 -100
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chart/chart.core.js +23 -2
- package/src/components/chart/element/element.heatmap.js +115 -46
- package/src/components/chart/element/element.tip.js +51 -1
- package/src/components/chart/helpers/helpers.constant.js +1 -0
- package/src/components/chart/model/model.series.js +1 -1
- package/src/components/chart/model/model.store.js +6 -6
- package/src/components/chart/plugins/plugins.interaction.js +48 -5
- package/src/components/chart/plugins/plugins.legend.js +4 -0
- package/src/components/chart/scale/scale.js +1 -1
- package/src/components/chart/scale/scale.step.js +1 -1
- package/src/components/chart/scale/scale.time.category.js +1 -1
- package/src/components/chart/uses.js +18 -3
package/dist/evui.umd.js
CHANGED
|
@@ -7997,7 +7997,7 @@ $({ target: 'Number', stat: true }, {
|
|
|
7997
7997
|
/***/ "9224":
|
|
7998
7998
|
/***/ (function(module) {
|
|
7999
7999
|
|
|
8000
|
-
module.exports = JSON.parse("{\"a\":\"3.3.
|
|
8000
|
+
module.exports = JSON.parse("{\"a\":\"3.3.49\"}");
|
|
8001
8001
|
|
|
8002
8002
|
/***/ }),
|
|
8003
8003
|
|
|
@@ -33171,7 +33171,7 @@ var modules = {
|
|
|
33171
33171
|
colorState = series.colorState,
|
|
33172
33172
|
isGradient = series.isGradient;
|
|
33173
33173
|
var colorOpt = this.options.heatMapColor;
|
|
33174
|
-
var
|
|
33174
|
+
var rangeCount = colorOpt.colorsByRange.length || colorOpt.rangeCount;
|
|
33175
33175
|
var decimalPoint = colorOpt.decimalPoint;
|
|
33176
33176
|
var minValue;
|
|
33177
33177
|
var maxValue = 0;
|
|
@@ -33192,9 +33192,9 @@ var modules = {
|
|
|
33192
33192
|
}
|
|
33193
33193
|
});
|
|
33194
33194
|
|
|
33195
|
-
if (isExistError && !isGradient && colorState.length ===
|
|
33195
|
+
if (isExistError && !isGradient && colorState.length === rangeCount) {
|
|
33196
33196
|
colorState.push({
|
|
33197
|
-
id: "color#".concat(
|
|
33197
|
+
id: "color#".concat(rangeCount),
|
|
33198
33198
|
color: colorOpt.error,
|
|
33199
33199
|
state: 'normal',
|
|
33200
33200
|
label: 'Error',
|
|
@@ -33202,11 +33202,11 @@ var modules = {
|
|
|
33202
33202
|
});
|
|
33203
33203
|
}
|
|
33204
33204
|
|
|
33205
|
-
var interval = maxValue > minValue ? Math.floor((maxValue - minValue) /
|
|
33205
|
+
var interval = maxValue > minValue ? Math.floor((maxValue - minValue) / rangeCount) : 1;
|
|
33206
33206
|
|
|
33207
|
-
if (maxValue - minValue <=
|
|
33207
|
+
if (maxValue - minValue <= rangeCount) {
|
|
33208
33208
|
if (decimalPoint > 0) {
|
|
33209
|
-
interval = +((maxValue - minValue) /
|
|
33209
|
+
interval = +((maxValue - minValue) / rangeCount).toFixed(decimalPoint);
|
|
33210
33210
|
} else {
|
|
33211
33211
|
interval = 1;
|
|
33212
33212
|
}
|
|
@@ -34705,6 +34705,7 @@ var AXIS_OPTION = {
|
|
|
34705
34705
|
startToZero: false,
|
|
34706
34706
|
showAxis: true,
|
|
34707
34707
|
axisLineColor: '#C9CFDC',
|
|
34708
|
+
axisLineWidth: 1,
|
|
34708
34709
|
showGrid: true,
|
|
34709
34710
|
gridLineColor: '#C9CFDC',
|
|
34710
34711
|
showIndicator: false,
|
|
@@ -36885,10 +36886,11 @@ var element_pie_Pie = /*#__PURE__*/function () {
|
|
|
36885
36886
|
|
|
36886
36887
|
|
|
36887
36888
|
|
|
36889
|
+
|
|
36888
36890
|
|
|
36889
36891
|
|
|
36890
36892
|
var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
36891
|
-
function HeatMap(sId, opt, colorOpt, isGradient) {
|
|
36893
|
+
function HeatMap(sId, opt, colorOpt, isHorizontal, isGradient) {
|
|
36892
36894
|
var _this = this;
|
|
36893
36895
|
|
|
36894
36896
|
_classCallCheck(this, HeatMap);
|
|
@@ -36897,6 +36899,7 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
36897
36899
|
Object.keys(merged).forEach(function (key) {
|
|
36898
36900
|
_this[key] = merged[key];
|
|
36899
36901
|
});
|
|
36902
|
+
this.isHorizontal = isHorizontal;
|
|
36900
36903
|
this.isGradient = isGradient;
|
|
36901
36904
|
this.createColorState(colorOpt);
|
|
36902
36905
|
this.sId = sId;
|
|
@@ -36926,8 +36929,8 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
36926
36929
|
var regex = /[^0-9]&[^,]/g;
|
|
36927
36930
|
var min = colorOpt.min,
|
|
36928
36931
|
max = colorOpt.max,
|
|
36929
|
-
|
|
36930
|
-
|
|
36932
|
+
rangeCount = colorOpt.rangeCount,
|
|
36933
|
+
colorsByRange = colorOpt.colorsByRange,
|
|
36931
36934
|
error = colorOpt.error,
|
|
36932
36935
|
stroke = colorOpt.stroke;
|
|
36933
36936
|
var minColor = min.includes('#') ? helpers_util.hexToRgb(min) : min.replace(regex, '');
|
|
@@ -36957,14 +36960,13 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
36957
36960
|
maxG: maxG,
|
|
36958
36961
|
maxB: maxB
|
|
36959
36962
|
},
|
|
36960
|
-
|
|
36963
|
+
rangeCount: rangeCount,
|
|
36961
36964
|
start: 0,
|
|
36962
36965
|
end: 100,
|
|
36963
36966
|
selectedValue: null
|
|
36964
36967
|
});
|
|
36965
|
-
} else if (
|
|
36966
|
-
|
|
36967
|
-
categoryColors.forEach(function (_ref, ix) {
|
|
36968
|
+
} else if (colorsByRange.length) {
|
|
36969
|
+
colorsByRange.forEach(function (_ref, ix) {
|
|
36968
36970
|
var color = _ref.color,
|
|
36969
36971
|
label = _ref.label;
|
|
36970
36972
|
colorState.push({
|
|
@@ -36976,11 +36978,11 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
36976
36978
|
});
|
|
36977
36979
|
});
|
|
36978
36980
|
} else {
|
|
36979
|
-
var unitR = Math.floor((minR - maxR) / (
|
|
36980
|
-
var unitG = Math.floor((minG - maxG) / (
|
|
36981
|
-
var unitB = Math.floor((minB - maxB) / (
|
|
36981
|
+
var unitR = Math.floor((minR - maxR) / (rangeCount - 1));
|
|
36982
|
+
var unitG = Math.floor((minG - maxG) / (rangeCount - 1));
|
|
36983
|
+
var unitB = Math.floor((minB - maxB) / (rangeCount - 1));
|
|
36982
36984
|
|
|
36983
|
-
for (var ix = 0; ix <
|
|
36985
|
+
for (var ix = 0; ix < rangeCount; ix++) {
|
|
36984
36986
|
var r = +minR - unitR * ix;
|
|
36985
36987
|
var g = +minG - unitG * ix;
|
|
36986
36988
|
var b = +minB - unitB * ix;
|
|
@@ -37015,8 +37017,8 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37015
37017
|
return "rgb(".concat(r, ",").concat(g, ",").concat(b, ")");
|
|
37016
37018
|
}
|
|
37017
37019
|
}, {
|
|
37018
|
-
key: "
|
|
37019
|
-
value: function
|
|
37020
|
+
key: "getColorIndexByValue",
|
|
37021
|
+
value: function getColorIndexByValue(value) {
|
|
37020
37022
|
var _this$valueOpt = this.valueOpt,
|
|
37021
37023
|
existError = _this$valueOpt.existError,
|
|
37022
37024
|
min = _this$valueOpt.min,
|
|
@@ -37044,7 +37046,7 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37044
37046
|
max = _this$valueOpt2.max;
|
|
37045
37047
|
var itemInfo = {
|
|
37046
37048
|
show: false,
|
|
37047
|
-
opacity:
|
|
37049
|
+
opacity: 1,
|
|
37048
37050
|
dataColor: null,
|
|
37049
37051
|
id: null,
|
|
37050
37052
|
isHighlight: null
|
|
@@ -37060,11 +37062,10 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37060
37062
|
if (value < 0 || start <= ratio && ratio <= end) {
|
|
37061
37063
|
itemInfo.show = true;
|
|
37062
37064
|
itemInfo.isHighlight = selectedValue !== null && Math.floor(value) === Math.floor(min + (max - min) * (selectedValue / 100));
|
|
37063
|
-
itemInfo.opacity = 1;
|
|
37064
37065
|
itemInfo.dataColor = value < 0 ? this.errorColor : this.getColorForGradient(ratio);
|
|
37065
37066
|
}
|
|
37066
37067
|
} else {
|
|
37067
|
-
var colorIndex = this.
|
|
37068
|
+
var colorIndex = this.getColorIndexByValue(value);
|
|
37068
37069
|
var _this$colorState$colo = this.colorState[colorIndex],
|
|
37069
37070
|
show = _this$colorState$colo.show,
|
|
37070
37071
|
state = _this$colorState$colo.state,
|
|
@@ -37080,18 +37081,26 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37080
37081
|
}
|
|
37081
37082
|
}, {
|
|
37082
37083
|
key: "drawItem",
|
|
37083
|
-
value: function drawItem(ctx, x, y, w, h) {
|
|
37084
|
+
value: function drawItem(ctx, x, y, w, h, borderOpt) {
|
|
37084
37085
|
ctx.beginPath();
|
|
37085
37086
|
|
|
37086
|
-
if (
|
|
37087
|
-
var radius =
|
|
37087
|
+
if (borderOpt.show) {
|
|
37088
|
+
var radius = borderOpt.radius;
|
|
37088
37089
|
|
|
37089
|
-
if (radius > 0
|
|
37090
|
-
|
|
37091
|
-
|
|
37092
|
-
|
|
37093
|
-
|
|
37094
|
-
|
|
37090
|
+
if (radius > 0) {
|
|
37091
|
+
var minSize = Math.min(w, h);
|
|
37092
|
+
var r = radius;
|
|
37093
|
+
|
|
37094
|
+
if (r > minSize / 2) {
|
|
37095
|
+
r = Math.floor(minSize / 2);
|
|
37096
|
+
}
|
|
37097
|
+
|
|
37098
|
+
ctx.moveTo(x + r, y);
|
|
37099
|
+
ctx.arcTo(x + w, y, x + w, y + h, r);
|
|
37100
|
+
ctx.arcTo(x + w, y + h, x, y + h, r);
|
|
37101
|
+
ctx.arcTo(x, y + h, x, y, r);
|
|
37102
|
+
ctx.arcTo(x, y, x + w, y, r);
|
|
37103
|
+
ctx.stroke();
|
|
37095
37104
|
ctx.fill();
|
|
37096
37105
|
} else {
|
|
37097
37106
|
ctx.strokeRect(x, y, w, h);
|
|
@@ -37141,15 +37150,46 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37141
37150
|
var ctx = param.ctx,
|
|
37142
37151
|
chartRect = param.chartRect,
|
|
37143
37152
|
labelOffset = param.labelOffset,
|
|
37144
|
-
overlayCtx = param.overlayCtx
|
|
37153
|
+
overlayCtx = param.overlayCtx,
|
|
37154
|
+
selectLabel = param.selectLabel,
|
|
37155
|
+
legendHitInfo = param.legendHitInfo,
|
|
37156
|
+
selectItem = param.selectItem;
|
|
37145
37157
|
var xArea = chartRect.chartWidth - (labelOffset.left + labelOffset.right);
|
|
37146
37158
|
var yArea = chartRect.chartHeight - (labelOffset.top + labelOffset.bottom);
|
|
37147
37159
|
var xsp = chartRect.x1 + labelOffset.left;
|
|
37148
37160
|
var ysp = chartRect.y2 - labelOffset.bottom;
|
|
37149
37161
|
this.size.w = xArea / this.labels.x.length;
|
|
37150
37162
|
this.size.h = yArea / this.labels.y.length;
|
|
37151
|
-
|
|
37152
|
-
|
|
37163
|
+
|
|
37164
|
+
var getOpacity = function getOpacity(item, opacity, index) {
|
|
37165
|
+
var selectLabelOption = selectLabel === null || selectLabel === void 0 ? void 0 : selectLabel.option;
|
|
37166
|
+
var useSelectLabel = (selectLabelOption === null || selectLabelOption === void 0 ? void 0 : selectLabelOption.use) && (selectLabelOption === null || selectLabelOption === void 0 ? void 0 : selectLabelOption.useSeriesOpacity);
|
|
37167
|
+
var selectItemOption = selectItem === null || selectItem === void 0 ? void 0 : selectItem.option;
|
|
37168
|
+
var useSelectItem = (selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.use) && (selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.useSeriesOpacity);
|
|
37169
|
+
|
|
37170
|
+
if (!legendHitInfo) {
|
|
37171
|
+
var isDownplay = false;
|
|
37172
|
+
|
|
37173
|
+
if (useSelectItem) {
|
|
37174
|
+
var _selectItem$selected;
|
|
37175
|
+
|
|
37176
|
+
isDownplay = (selectItem === null || selectItem === void 0 ? void 0 : selectItem.selected) && index !== (selectItem === null || selectItem === void 0 ? void 0 : (_selectItem$selected = selectItem.selected) === null || _selectItem$selected === void 0 ? void 0 : _selectItem$selected.dataIndex);
|
|
37177
|
+
} else if (useSelectLabel) {
|
|
37178
|
+
var _selectLabel$selected;
|
|
37179
|
+
|
|
37180
|
+
var selectedLabelList = selectLabel === null || selectLabel === void 0 ? void 0 : (_selectLabel$selected = selectLabel.selected) === null || _selectLabel$selected === void 0 ? void 0 : _selectLabel$selected.label;
|
|
37181
|
+
isDownplay = selectedLabelList.length && !selectedLabelList.includes(_this2.isHorizontal ? item.y : item.x);
|
|
37182
|
+
}
|
|
37183
|
+
|
|
37184
|
+
return isDownplay ? 0.1 : 1;
|
|
37185
|
+
}
|
|
37186
|
+
|
|
37187
|
+
return opacity;
|
|
37188
|
+
};
|
|
37189
|
+
|
|
37190
|
+
this.data.forEach(function (item, index) {
|
|
37191
|
+
var axisLineWidth = 1;
|
|
37192
|
+
var xp = _this2.calculateXY('x', item.x, xsp) + axisLineWidth;
|
|
37153
37193
|
|
|
37154
37194
|
var yp = _this2.calculateXY('y', item.y, ysp);
|
|
37155
37195
|
|
|
@@ -37165,27 +37205,40 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37165
37205
|
id = _this2$getItemInfo.id,
|
|
37166
37206
|
isHighlight = _this2$getItemInfo.isHighlight;
|
|
37167
37207
|
|
|
37208
|
+
var itemOpacity = getOpacity(item, opacity, index);
|
|
37168
37209
|
item.dataColor = dataColor;
|
|
37169
37210
|
item.cId = id;
|
|
37170
37211
|
ctx.save();
|
|
37171
37212
|
|
|
37172
37213
|
if (show) {
|
|
37173
|
-
|
|
37174
|
-
|
|
37175
|
-
|
|
37176
|
-
|
|
37177
|
-
|
|
37178
|
-
|
|
37179
|
-
|
|
37180
|
-
|
|
37214
|
+
var _selectItem$selected2;
|
|
37215
|
+
|
|
37216
|
+
ctx.fillStyle = helpers_util.colorStringToRgba(item.dataColor, itemOpacity);
|
|
37217
|
+
var borderOpt = _this2.stroke;
|
|
37218
|
+
var selectItemOption = selectItem === null || selectItem === void 0 ? void 0 : selectItem.option;
|
|
37219
|
+
var useSelectItem = (selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.use) && (selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.showBorder);
|
|
37220
|
+
var isHit = index === (selectItem === null || selectItem === void 0 ? void 0 : (_selectItem$selected2 = selectItem.selected) === null || _selectItem$selected2 === void 0 ? void 0 : _selectItem$selected2.dataIndex);
|
|
37221
|
+
|
|
37222
|
+
if (useSelectItem && isHit) {
|
|
37223
|
+
borderOpt = _objectSpread2({
|
|
37224
|
+
show: selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.showBorder
|
|
37225
|
+
}, selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.borderStyle);
|
|
37226
|
+
}
|
|
37227
|
+
|
|
37228
|
+
if (borderOpt.show) {
|
|
37229
|
+
var _borderOpt = borderOpt,
|
|
37230
|
+
color = _borderOpt.color,
|
|
37231
|
+
lineWidth = _borderOpt.lineWidth,
|
|
37232
|
+
borderOpacity = _borderOpt.opacity;
|
|
37233
|
+
ctx.strokeStyle = helpers_util.colorStringToRgba(color, itemOpacity === 1 ? borderOpacity : itemOpacity);
|
|
37181
37234
|
ctx.lineWidth = lineWidth;
|
|
37182
|
-
xp += lineWidth *
|
|
37183
|
-
yp += lineWidth *
|
|
37184
|
-
w -= lineWidth
|
|
37185
|
-
h -= lineWidth
|
|
37235
|
+
xp += lineWidth * 0.5;
|
|
37236
|
+
yp += lineWidth * 0.5;
|
|
37237
|
+
w -= lineWidth;
|
|
37238
|
+
h -= lineWidth;
|
|
37186
37239
|
}
|
|
37187
37240
|
|
|
37188
|
-
_this2.drawItem(ctx, xp, yp, w, h);
|
|
37241
|
+
_this2.drawItem(ctx, xp, yp, w, h, borderOpt);
|
|
37189
37242
|
|
|
37190
37243
|
ctx.restore();
|
|
37191
37244
|
item.xp = xp;
|
|
@@ -37369,16 +37422,25 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37369
37422
|
}
|
|
37370
37423
|
|
|
37371
37424
|
ctx.save();
|
|
37372
|
-
ctx.shadowOffsetX =
|
|
37373
|
-
ctx.shadowOffsetY =
|
|
37425
|
+
ctx.shadowOffsetX = 0;
|
|
37426
|
+
ctx.shadowOffsetY = 0;
|
|
37374
37427
|
ctx.shadowBlur = 4;
|
|
37375
37428
|
|
|
37376
37429
|
if (x !== null && y !== null && isShow) {
|
|
37377
37430
|
var color = gdata.dataColor;
|
|
37378
|
-
ctx.shadowColor = helpers_util.colorStringToRgba('#
|
|
37431
|
+
ctx.shadowColor = helpers_util.colorStringToRgba('#959494');
|
|
37379
37432
|
ctx.strokeStyle = helpers_util.colorStringToRgba(color);
|
|
37380
37433
|
ctx.fillStyle = helpers_util.colorStringToRgba(color);
|
|
37381
|
-
|
|
37434
|
+
|
|
37435
|
+
if (this.stroke.show) {
|
|
37436
|
+
var lineWidth = this.stroke.lineWidth;
|
|
37437
|
+
x += lineWidth * 0.5;
|
|
37438
|
+
y += lineWidth * 0.5;
|
|
37439
|
+
w -= lineWidth;
|
|
37440
|
+
h -= lineWidth;
|
|
37441
|
+
}
|
|
37442
|
+
|
|
37443
|
+
this.drawItem(ctx, x - 0.5, y - 0.5, w + 1, h + 1, this.stroke);
|
|
37382
37444
|
ctx.restore();
|
|
37383
37445
|
|
|
37384
37446
|
if (this.showValue.use) {
|
|
@@ -37408,7 +37470,7 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37408
37470
|
name: null
|
|
37409
37471
|
};
|
|
37410
37472
|
var gdata = this.data;
|
|
37411
|
-
var
|
|
37473
|
+
var itemIndex = gdata.findIndex(function (data) {
|
|
37412
37474
|
var x = data.xp,
|
|
37413
37475
|
y = data.yp,
|
|
37414
37476
|
wSize = data.w,
|
|
@@ -37416,9 +37478,11 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37416
37478
|
return x <= xp && xp <= x + wSize && y <= yp && yp <= y + hSize;
|
|
37417
37479
|
});
|
|
37418
37480
|
|
|
37419
|
-
if (
|
|
37481
|
+
if (itemIndex > -1) {
|
|
37482
|
+
var foundItem = gdata[itemIndex];
|
|
37420
37483
|
item.data = foundItem;
|
|
37421
37484
|
item.color = foundItem.dataColor;
|
|
37485
|
+
item.index = itemIndex;
|
|
37422
37486
|
item.hit = true;
|
|
37423
37487
|
}
|
|
37424
37488
|
|
|
@@ -37610,7 +37674,7 @@ var model_series_modules = {
|
|
|
37610
37674
|
heatMapColor = _this$options.heatMapColor,
|
|
37611
37675
|
legend = _this$options.legend;
|
|
37612
37676
|
var isGradient = legend.type === 'gradient';
|
|
37613
|
-
return new element_heatmap(id, opt, heatMapColor, isGradient);
|
|
37677
|
+
return new element_heatmap(id, opt, heatMapColor, isHorizontal, isGradient);
|
|
37614
37678
|
}
|
|
37615
37679
|
|
|
37616
37680
|
return false;
|
|
@@ -37927,7 +37991,7 @@ var scale_Scale = /*#__PURE__*/function () {
|
|
|
37927
37991
|
}
|
|
37928
37992
|
|
|
37929
37993
|
if (this.showAxis) {
|
|
37930
|
-
ctx.lineWidth =
|
|
37994
|
+
ctx.lineWidth = this.axisLineWidth;
|
|
37931
37995
|
aliasPixel = helpers_util.aliasPixel(ctx.lineWidth);
|
|
37932
37996
|
ctx.beginPath();
|
|
37933
37997
|
ctx.strokeStyle = this.axisLineColor;
|
|
@@ -38981,7 +39045,7 @@ var scale_step_StepScale = /*#__PURE__*/function (_Scale) {
|
|
|
38981
39045
|
}
|
|
38982
39046
|
|
|
38983
39047
|
ctx.fillStyle = this.labelStyle.color;
|
|
38984
|
-
ctx.lineWidth =
|
|
39048
|
+
ctx.lineWidth = this.axisLineWidth;
|
|
38985
39049
|
var aliasPixel = helpers_util.aliasPixel(ctx.lineWidth);
|
|
38986
39050
|
ctx.beginPath();
|
|
38987
39051
|
ctx.strokeStyle = this.axisLineColor;
|
|
@@ -39395,7 +39459,7 @@ var scale_time_category_TimeCategoryScale = /*#__PURE__*/function (_Scale) {
|
|
|
39395
39459
|
}
|
|
39396
39460
|
|
|
39397
39461
|
ctx.fillStyle = this.labelStyle.color;
|
|
39398
|
-
ctx.lineWidth =
|
|
39462
|
+
ctx.lineWidth = this.axisLineWidth;
|
|
39399
39463
|
var aliasPixel = helpers_util.aliasPixel(ctx.lineWidth);
|
|
39400
39464
|
ctx.beginPath();
|
|
39401
39465
|
ctx.strokeStyle = this.axisLineColor;
|
|
@@ -40094,6 +40158,10 @@ var plugins_legend_modules = {
|
|
|
40094
40158
|
}
|
|
40095
40159
|
|
|
40096
40160
|
var targetId = targetDOM === null || targetDOM === void 0 ? void 0 : (_targetDOM$series4 = targetDOM.series) === null || _targetDOM$series4 === void 0 ? void 0 : _targetDOM$series4.cId;
|
|
40161
|
+
var legendHitInfo = {
|
|
40162
|
+
sId: targetId,
|
|
40163
|
+
type: _this5.options.type
|
|
40164
|
+
};
|
|
40097
40165
|
series.colorState.forEach(function (colorItem) {
|
|
40098
40166
|
colorItem.state = colorItem.id === targetId ? 'highlight' : 'downplay';
|
|
40099
40167
|
});
|
|
@@ -40103,6 +40171,9 @@ var plugins_legend_modules = {
|
|
|
40103
40171
|
updateSelTip: {
|
|
40104
40172
|
update: false,
|
|
40105
40173
|
keepDomain: false
|
|
40174
|
+
},
|
|
40175
|
+
hitInfo: {
|
|
40176
|
+
legend: legendHitInfo
|
|
40106
40177
|
}
|
|
40107
40178
|
});
|
|
40108
40179
|
};
|
|
@@ -41519,6 +41590,8 @@ var es_object_from_entries = __webpack_require__("c1f9");
|
|
|
41519
41590
|
|
|
41520
41591
|
|
|
41521
41592
|
|
|
41593
|
+
|
|
41594
|
+
|
|
41522
41595
|
var plugins_interaction_modules = {
|
|
41523
41596
|
/**
|
|
41524
41597
|
* Hide legend components by manipulating css
|
|
@@ -41665,15 +41738,19 @@ var plugins_interaction_modules = {
|
|
|
41665
41738
|
|
|
41666
41739
|
var hitInfo = _this.getItemByPosition(offset, false);
|
|
41667
41740
|
|
|
41668
|
-
if (hitInfo.label !== null) {
|
|
41669
|
-
_this.render(hitInfo);
|
|
41670
|
-
}
|
|
41671
|
-
|
|
41672
41741
|
args.label = hitInfo.label;
|
|
41673
41742
|
args.value = hitInfo.value;
|
|
41674
41743
|
args.seriesId = hitInfo.sId;
|
|
41675
41744
|
args.dataIndex = hitInfo.maxIndex;
|
|
41676
41745
|
args.acc = hitInfo.acc;
|
|
41746
|
+
|
|
41747
|
+
if (_this.options.type === 'heatMap') {
|
|
41748
|
+
args.deselect = _this.setDeselectItem(hitInfo);
|
|
41749
|
+
}
|
|
41750
|
+
|
|
41751
|
+
if (hitInfo.label !== null) {
|
|
41752
|
+
_this.render(hitInfo);
|
|
41753
|
+
}
|
|
41677
41754
|
} else if (_this.options.selectLabel.use && _this.options.selectLabel.useClick) {
|
|
41678
41755
|
var _offset = _this.getMousePosition(e);
|
|
41679
41756
|
|
|
@@ -42206,14 +42283,18 @@ var plugins_interaction_modules = {
|
|
|
42206
42283
|
var _this3 = this;
|
|
42207
42284
|
|
|
42208
42285
|
if (this.options.selectLabel.use) {
|
|
42209
|
-
var limit = this.options.selectLabel.limit;
|
|
42210
|
-
|
|
42211
42286
|
if (!this.defaultSelectInfo) {
|
|
42212
42287
|
this.defaultSelectInfo = {
|
|
42213
42288
|
dataIndex: []
|
|
42214
42289
|
};
|
|
42215
42290
|
}
|
|
42216
42291
|
|
|
42292
|
+
if (this.options.type === 'heatMap') {
|
|
42293
|
+
this.initSelectedInfoForHeatMap();
|
|
42294
|
+
return;
|
|
42295
|
+
}
|
|
42296
|
+
|
|
42297
|
+
var limit = this.options.selectLabel.limit;
|
|
42217
42298
|
var infoObj = this.defaultSelectInfo;
|
|
42218
42299
|
infoObj.dataIndex.splice(limit);
|
|
42219
42300
|
infoObj.label = infoObj.dataIndex.map(function (i) {
|
|
@@ -42238,6 +42319,29 @@ var plugins_interaction_modules = {
|
|
|
42238
42319
|
}
|
|
42239
42320
|
},
|
|
42240
42321
|
|
|
42322
|
+
/**
|
|
42323
|
+
* init defaultSelectInfo object for HeatMap.
|
|
42324
|
+
* - at selectLabel using: set each series data and label text
|
|
42325
|
+
*/
|
|
42326
|
+
initSelectedInfoForHeatMap: function initSelectedInfoForHeatMap() {
|
|
42327
|
+
var _this4 = this;
|
|
42328
|
+
|
|
42329
|
+
var limit = this.options.selectLabel.limit;
|
|
42330
|
+
var isHorizontal = this.options.horizontal;
|
|
42331
|
+
var infoObj = this.defaultSelectInfo;
|
|
42332
|
+
infoObj.dataIndex.splice(limit);
|
|
42333
|
+
var targetLabel = isHorizontal ? 'y' : 'x';
|
|
42334
|
+
infoObj.label = infoObj.dataIndex.map(function (i) {
|
|
42335
|
+
return _this4.data.labels[targetLabel][i];
|
|
42336
|
+
});
|
|
42337
|
+
var dataValues = Object.values(this.data.data)[0];
|
|
42338
|
+
infoObj.data = dataValues.filter(function (_ref5) {
|
|
42339
|
+
var x = _ref5.x,
|
|
42340
|
+
y = _ref5.y;
|
|
42341
|
+
return infoObj.label.includes(isHorizontal ? y : x);
|
|
42342
|
+
});
|
|
42343
|
+
},
|
|
42344
|
+
|
|
42241
42345
|
/**
|
|
42242
42346
|
* Add or delete selected label index, according to policy and option
|
|
42243
42347
|
* (set each series data and label text)
|
|
@@ -42333,12 +42437,12 @@ var plugins_interaction_modules = {
|
|
|
42333
42437
|
* object.range: coordinate-based range in graph
|
|
42334
42438
|
* @returns {object}
|
|
42335
42439
|
*/
|
|
42336
|
-
getSelectionRage: function getSelectionRage(
|
|
42337
|
-
var xsp =
|
|
42338
|
-
ysp =
|
|
42339
|
-
width =
|
|
42340
|
-
height =
|
|
42341
|
-
range =
|
|
42440
|
+
getSelectionRage: function getSelectionRage(_ref6) {
|
|
42441
|
+
var xsp = _ref6.xsp,
|
|
42442
|
+
ysp = _ref6.ysp,
|
|
42443
|
+
width = _ref6.width,
|
|
42444
|
+
height = _ref6.height,
|
|
42445
|
+
range = _ref6.range;
|
|
42342
42446
|
var dataRangeX = this.axesSteps.x.length ? this.axesSteps.x[0] : null;
|
|
42343
42447
|
var dataRangeY = this.axesSteps.y.length ? this.axesSteps.y[0] : null;
|
|
42344
42448
|
|
|
@@ -42395,11 +42499,11 @@ var plugins_interaction_modules = {
|
|
|
42395
42499
|
|
|
42396
42500
|
var sId = Object.keys(this.seriesList)[0];
|
|
42397
42501
|
|
|
42398
|
-
var
|
|
42399
|
-
xMin =
|
|
42400
|
-
xMax =
|
|
42401
|
-
yMin =
|
|
42402
|
-
yMax =
|
|
42502
|
+
var _ref7 = (_this$seriesList$sId$ = this.seriesList[sId].findSelectionRange(range)) !== null && _this$seriesList$sId$ !== void 0 ? _this$seriesList$sId$ : {},
|
|
42503
|
+
xMin = _ref7.xMin,
|
|
42504
|
+
xMax = _ref7.xMax,
|
|
42505
|
+
yMin = _ref7.yMin,
|
|
42506
|
+
yMax = _ref7.yMax;
|
|
42403
42507
|
|
|
42404
42508
|
return {
|
|
42405
42509
|
xMin: xMin !== null && xMin !== void 0 ? xMin : dataRangeX.graphMin,
|
|
@@ -42407,6 +42511,23 @@ var plugins_interaction_modules = {
|
|
|
42407
42511
|
yMin: yMin !== null && yMin !== void 0 ? yMin : dataRangeY.graphMin,
|
|
42408
42512
|
yMax: yMax !== null && yMax !== void 0 ? yMax : dataRangeY.graphMax
|
|
42409
42513
|
};
|
|
42514
|
+
},
|
|
42515
|
+
setDeselectItem: function setDeselectItem(hitInfo) {
|
|
42516
|
+
var deselect = false;
|
|
42517
|
+
|
|
42518
|
+
if (this.options.selectItem.useDeselectItem) {
|
|
42519
|
+
var _this$defaultSelectIt;
|
|
42520
|
+
|
|
42521
|
+
var isEqualSelectItem = (hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.maxIndex) === ((_this$defaultSelectIt = this.defaultSelectItemInfo) === null || _this$defaultSelectIt === void 0 ? void 0 : _this$defaultSelectIt.dataIndex);
|
|
42522
|
+
|
|
42523
|
+
if (!isNaN(hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.maxIndex) && isEqualSelectItem) {
|
|
42524
|
+
deselect = true;
|
|
42525
|
+
this.defaultSelectItemInfo = null;
|
|
42526
|
+
return true;
|
|
42527
|
+
}
|
|
42528
|
+
}
|
|
42529
|
+
|
|
42530
|
+
return deselect;
|
|
42410
42531
|
}
|
|
42411
42532
|
};
|
|
42412
42533
|
/* harmony default export */ var plugins_interaction = (plugins_interaction_modules);
|
|
@@ -43434,7 +43555,8 @@ var element_tip_modules = {
|
|
|
43434
43555
|
var isExistSelectedLabel;
|
|
43435
43556
|
|
|
43436
43557
|
if (labelTipOpt.use && labelTipOpt.showTip) {
|
|
43437
|
-
|
|
43558
|
+
var isHeatMap = opt.type === 'heatMap';
|
|
43559
|
+
isExistSelectedLabel = isHeatMap ? this.drawLabelTipForHeatMap() : this.drawLabelTip();
|
|
43438
43560
|
}
|
|
43439
43561
|
|
|
43440
43562
|
var executeDrawIndicator = function executeDrawIndicator(tipOpt) {
|
|
@@ -43814,6 +43936,53 @@ var element_tip_modules = {
|
|
|
43814
43936
|
return drawTip;
|
|
43815
43937
|
},
|
|
43816
43938
|
|
|
43939
|
+
/**
|
|
43940
|
+
* Draw Selected Label Tip
|
|
43941
|
+
* @returns {boolean} Whether drew at least one tip
|
|
43942
|
+
*/
|
|
43943
|
+
drawLabelTipForHeatMap: function drawLabelTipForHeatMap() {
|
|
43944
|
+
var _this3 = this;
|
|
43945
|
+
|
|
43946
|
+
var opt = this.options;
|
|
43947
|
+
var isHorizontal = !!opt.horizontal;
|
|
43948
|
+
var labelTipOpt = opt.selectLabel;
|
|
43949
|
+
var dataIndex = this.defaultSelectInfo.dataIndex;
|
|
43950
|
+
var drawTip = false;
|
|
43951
|
+
|
|
43952
|
+
if (dataIndex) {
|
|
43953
|
+
drawTip = true;
|
|
43954
|
+
var chartRect = this.chartRect;
|
|
43955
|
+
var labelOffset = this.labelOffset;
|
|
43956
|
+
var aPos = {
|
|
43957
|
+
x1: chartRect.x1 + labelOffset.left,
|
|
43958
|
+
x2: chartRect.x2 - labelOffset.right,
|
|
43959
|
+
y1: chartRect.y1 + labelOffset.top,
|
|
43960
|
+
y2: chartRect.y2 - labelOffset.bottom
|
|
43961
|
+
};
|
|
43962
|
+
var labelAxes = isHorizontal ? this.axesY[0] : this.axesX[0];
|
|
43963
|
+
var labelStartPoint = aPos[labelAxes.units.rectStart];
|
|
43964
|
+
var labelEndPoint = aPos[labelAxes.units.rectEnd];
|
|
43965
|
+
var labelGap = (labelEndPoint - labelStartPoint) / labelAxes.labels.length;
|
|
43966
|
+
var valueAxes = isHorizontal ? this.axesX[0] : this.axesY[0];
|
|
43967
|
+
var offset = 6 * (isHorizontal ? 1 : -1);
|
|
43968
|
+
var gp = aPos[valueAxes.units.rectEnd] + offset;
|
|
43969
|
+
dataIndex === null || dataIndex === void 0 ? void 0 : dataIndex.forEach(function (index) {
|
|
43970
|
+
var labelCenter = Math.round(labelStartPoint + labelGap * index);
|
|
43971
|
+
var dp = labelCenter + labelGap / 2;
|
|
43972
|
+
|
|
43973
|
+
_this3.showTip({
|
|
43974
|
+
context: _this3.bufferCtx,
|
|
43975
|
+
x: isHorizontal ? gp : dp,
|
|
43976
|
+
y: isHorizontal ? dp : gp,
|
|
43977
|
+
opt: labelTipOpt,
|
|
43978
|
+
isSamePos: false
|
|
43979
|
+
});
|
|
43980
|
+
});
|
|
43981
|
+
}
|
|
43982
|
+
|
|
43983
|
+
return drawTip;
|
|
43984
|
+
},
|
|
43985
|
+
|
|
43817
43986
|
/**
|
|
43818
43987
|
* Calculate x, y position to draw text tip
|
|
43819
43988
|
* @param {object} param object for drawing text tip
|
|
@@ -44287,7 +44456,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44287
44456
|
|
|
44288
44457
|
switch (chartType) {
|
|
44289
44458
|
case 'line':
|
|
44290
|
-
case 'heatMap':
|
|
44291
44459
|
{
|
|
44292
44460
|
var legendHitInfo = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44293
44461
|
series.draw(_objectSpread2({
|
|
@@ -44296,10 +44464,34 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44296
44464
|
break;
|
|
44297
44465
|
}
|
|
44298
44466
|
|
|
44299
|
-
case '
|
|
44467
|
+
case 'heatMap':
|
|
44300
44468
|
{
|
|
44301
44469
|
var _legendHitInfo = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44302
44470
|
|
|
44471
|
+
var selectInfo = void 0;
|
|
44472
|
+
var defaultSelectInfo = this.defaultSelectItemInfo;
|
|
44473
|
+
|
|
44474
|
+
if (defaultSelectInfo !== null && defaultSelectInfo !== void 0 && defaultSelectInfo.dataIndex || (defaultSelectInfo === null || defaultSelectInfo === void 0 ? void 0 : defaultSelectInfo.dataIndex) === 0) {
|
|
44475
|
+
selectInfo = _objectSpread2({}, defaultSelectInfo);
|
|
44476
|
+
} else {
|
|
44477
|
+
selectInfo = null;
|
|
44478
|
+
}
|
|
44479
|
+
|
|
44480
|
+
series.draw(_objectSpread2({
|
|
44481
|
+
legendHitInfo: _legendHitInfo,
|
|
44482
|
+
selectInfo: selectInfo,
|
|
44483
|
+
selectItem: {
|
|
44484
|
+
option: selectItem,
|
|
44485
|
+
selected: selectInfo
|
|
44486
|
+
}
|
|
44487
|
+
}, opt));
|
|
44488
|
+
break;
|
|
44489
|
+
}
|
|
44490
|
+
|
|
44491
|
+
case 'bar':
|
|
44492
|
+
{
|
|
44493
|
+
var _legendHitInfo2 = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44494
|
+
|
|
44303
44495
|
var _this$options3 = this.options,
|
|
44304
44496
|
thickness = _this$options3.thickness,
|
|
44305
44497
|
cPadRatio = _this$options3.cPadRatio,
|
|
@@ -44310,7 +44502,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44310
44502
|
borderRadius: borderRadius,
|
|
44311
44503
|
showSeriesCount: showSeriesCount,
|
|
44312
44504
|
showIndex: showIndex,
|
|
44313
|
-
legendHitInfo:
|
|
44505
|
+
legendHitInfo: _legendHitInfo2
|
|
44314
44506
|
}, opt));
|
|
44315
44507
|
|
|
44316
44508
|
if (series.show) {
|
|
@@ -44324,21 +44516,21 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44324
44516
|
{
|
|
44325
44517
|
var _this$lastHitInfo, _this$defaultSelectIt;
|
|
44326
44518
|
|
|
44327
|
-
var
|
|
44519
|
+
var _selectInfo = (_this$lastHitInfo = this.lastHitInfo) !== null && _this$lastHitInfo !== void 0 ? _this$lastHitInfo : {
|
|
44328
44520
|
sId: (_this$defaultSelectIt = this.defaultSelectItemInfo) === null || _this$defaultSelectIt === void 0 ? void 0 : _this$defaultSelectIt.seriesID
|
|
44329
44521
|
};
|
|
44330
44522
|
|
|
44331
|
-
var
|
|
44523
|
+
var _legendHitInfo3 = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44332
44524
|
|
|
44333
44525
|
if (this.options.sunburst) {
|
|
44334
44526
|
this.drawSunburst({
|
|
44335
|
-
selectInfo:
|
|
44336
|
-
legendHitInfo:
|
|
44527
|
+
selectInfo: _selectInfo,
|
|
44528
|
+
legendHitInfo: _legendHitInfo3
|
|
44337
44529
|
});
|
|
44338
44530
|
} else {
|
|
44339
44531
|
this.drawPie({
|
|
44340
|
-
selectInfo:
|
|
44341
|
-
legendHitInfo:
|
|
44532
|
+
selectInfo: _selectInfo,
|
|
44533
|
+
legendHitInfo: _legendHitInfo3
|
|
44342
44534
|
});
|
|
44343
44535
|
}
|
|
44344
44536
|
|
|
@@ -44351,29 +44543,29 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44351
44543
|
|
|
44352
44544
|
case 'scatter':
|
|
44353
44545
|
{
|
|
44354
|
-
var
|
|
44546
|
+
var _legendHitInfo4 = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44355
44547
|
|
|
44356
|
-
var
|
|
44548
|
+
var _selectInfo2 = void 0;
|
|
44357
44549
|
|
|
44358
44550
|
if (selectItem.use && selectItem.useSeriesOpacity) {
|
|
44359
44551
|
var lastHitInfo = this.lastHitInfo;
|
|
44360
|
-
var
|
|
44552
|
+
var _defaultSelectInfo = this.defaultSelectItemInfo;
|
|
44361
44553
|
|
|
44362
44554
|
if (lastHitInfo !== null && lastHitInfo !== void 0 && lastHitInfo.maxIndex || (lastHitInfo === null || lastHitInfo === void 0 ? void 0 : lastHitInfo.maxIndex) === 0) {
|
|
44363
|
-
|
|
44555
|
+
_selectInfo2 = {
|
|
44364
44556
|
seriesID: lastHitInfo.sId,
|
|
44365
44557
|
dataIndex: lastHitInfo.maxIndex
|
|
44366
44558
|
};
|
|
44367
|
-
} else if (
|
|
44368
|
-
|
|
44559
|
+
} else if (_defaultSelectInfo !== null && _defaultSelectInfo !== void 0 && _defaultSelectInfo.dataIndex || (_defaultSelectInfo === null || _defaultSelectInfo === void 0 ? void 0 : _defaultSelectInfo.dataIndex) === 0) {
|
|
44560
|
+
_selectInfo2 = _objectSpread2({}, _defaultSelectInfo);
|
|
44369
44561
|
} else {
|
|
44370
|
-
|
|
44562
|
+
_selectInfo2 = null;
|
|
44371
44563
|
}
|
|
44372
44564
|
}
|
|
44373
44565
|
|
|
44374
44566
|
series.draw(_objectSpread2({
|
|
44375
|
-
legendHitInfo:
|
|
44376
|
-
selectInfo:
|
|
44567
|
+
legendHitInfo: _legendHitInfo4,
|
|
44568
|
+
selectInfo: _selectInfo2
|
|
44377
44569
|
}, opt));
|
|
44378
44570
|
break;
|
|
44379
44571
|
}
|
|
@@ -44853,7 +45045,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44853
45045
|
if (options.legend.show) {
|
|
44854
45046
|
var _options$legend, _options$legend$table;
|
|
44855
45047
|
|
|
44856
|
-
var useTable = !!((_options$legend = options.legend) !== null && _options$legend !== void 0 && (_options$legend$table = _options$legend.table) !== null && _options$legend$table !== void 0 && _options$legend$table.use) && options.type !== '
|
|
45048
|
+
var useTable = !!((_options$legend = options.legend) !== null && _options$legend !== void 0 && (_options$legend$table = _options$legend.table) !== null && _options$legend$table !== void 0 && _options$legend$table.use) && options.type !== 'heatMap' && options.type !== 'scatter';
|
|
44857
45049
|
|
|
44858
45050
|
if (!this.isInitLegend) {
|
|
44859
45051
|
this.initLegend();
|
|
@@ -45747,7 +45939,15 @@ var DEFAULT_OPTIONS = {
|
|
|
45747
45939
|
fontFamily: 'Roboto',
|
|
45748
45940
|
fontWeight: 400
|
|
45749
45941
|
},
|
|
45750
|
-
useSeriesOpacity: false
|
|
45942
|
+
useSeriesOpacity: false,
|
|
45943
|
+
useDeselectItem: false,
|
|
45944
|
+
showBorder: false,
|
|
45945
|
+
borderStyle: {
|
|
45946
|
+
color: '#FFFFFF',
|
|
45947
|
+
lineWidth: 1,
|
|
45948
|
+
opacity: 1,
|
|
45949
|
+
radius: 0
|
|
45950
|
+
}
|
|
45751
45951
|
},
|
|
45752
45952
|
selectLabel: {
|
|
45753
45953
|
use: false,
|
|
@@ -45817,8 +46017,8 @@ var DEFAULT_OPTIONS = {
|
|
|
45817
46017
|
heatMapColor: {
|
|
45818
46018
|
min: '#FFFFFF',
|
|
45819
46019
|
max: '#0052FF',
|
|
45820
|
-
|
|
45821
|
-
|
|
46020
|
+
rangeCount: 1,
|
|
46021
|
+
colorsByRange: [],
|
|
45822
46022
|
stroke: {
|
|
45823
46023
|
show: false,
|
|
45824
46024
|
color: '#FFFFFF',
|
|
@@ -45874,6 +46074,7 @@ var chart_uses_useModel = function useModel(selectedLabel) {
|
|
|
45874
46074
|
var _click = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(e) {
|
|
45875
46075
|
var _e$selected, _e$selected2;
|
|
45876
46076
|
|
|
46077
|
+
var selectedItem;
|
|
45877
46078
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
45878
46079
|
while (1) {
|
|
45879
46080
|
switch (_context.prev = _context.next) {
|
|
@@ -45883,10 +46084,20 @@ var chart_uses_useModel = function useModel(selectedLabel) {
|
|
|
45883
46084
|
|
|
45884
46085
|
case 2:
|
|
45885
46086
|
if (e.label) {
|
|
45886
|
-
|
|
46087
|
+
selectedItem = {
|
|
45887
46088
|
seriesID: e.seriesId,
|
|
45888
46089
|
dataIndex: e.dataIndex
|
|
45889
|
-
}
|
|
46090
|
+
};
|
|
46091
|
+
|
|
46092
|
+
if ('deselect' in e) {
|
|
46093
|
+
if (e.deselect) {
|
|
46094
|
+
selectedItem = null;
|
|
46095
|
+
}
|
|
46096
|
+
|
|
46097
|
+
delete e.deselect;
|
|
46098
|
+
}
|
|
46099
|
+
|
|
46100
|
+
emit('update:selectedItem', selectedItem);
|
|
45890
46101
|
}
|
|
45891
46102
|
|
|
45892
46103
|
if ((_e$selected = e.selected) !== null && _e$selected !== void 0 && _e$selected.dataIndex) {
|