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.common.js
CHANGED
|
@@ -7988,7 +7988,7 @@ $({ target: 'Number', stat: true }, {
|
|
|
7988
7988
|
/***/ "9224":
|
|
7989
7989
|
/***/ (function(module) {
|
|
7990
7990
|
|
|
7991
|
-
module.exports = JSON.parse("{\"a\":\"3.3.
|
|
7991
|
+
module.exports = JSON.parse("{\"a\":\"3.3.49\"}");
|
|
7992
7992
|
|
|
7993
7993
|
/***/ }),
|
|
7994
7994
|
|
|
@@ -33162,7 +33162,7 @@ var modules = {
|
|
|
33162
33162
|
colorState = series.colorState,
|
|
33163
33163
|
isGradient = series.isGradient;
|
|
33164
33164
|
var colorOpt = this.options.heatMapColor;
|
|
33165
|
-
var
|
|
33165
|
+
var rangeCount = colorOpt.colorsByRange.length || colorOpt.rangeCount;
|
|
33166
33166
|
var decimalPoint = colorOpt.decimalPoint;
|
|
33167
33167
|
var minValue;
|
|
33168
33168
|
var maxValue = 0;
|
|
@@ -33183,9 +33183,9 @@ var modules = {
|
|
|
33183
33183
|
}
|
|
33184
33184
|
});
|
|
33185
33185
|
|
|
33186
|
-
if (isExistError && !isGradient && colorState.length ===
|
|
33186
|
+
if (isExistError && !isGradient && colorState.length === rangeCount) {
|
|
33187
33187
|
colorState.push({
|
|
33188
|
-
id: "color#".concat(
|
|
33188
|
+
id: "color#".concat(rangeCount),
|
|
33189
33189
|
color: colorOpt.error,
|
|
33190
33190
|
state: 'normal',
|
|
33191
33191
|
label: 'Error',
|
|
@@ -33193,11 +33193,11 @@ var modules = {
|
|
|
33193
33193
|
});
|
|
33194
33194
|
}
|
|
33195
33195
|
|
|
33196
|
-
var interval = maxValue > minValue ? Math.floor((maxValue - minValue) /
|
|
33196
|
+
var interval = maxValue > minValue ? Math.floor((maxValue - minValue) / rangeCount) : 1;
|
|
33197
33197
|
|
|
33198
|
-
if (maxValue - minValue <=
|
|
33198
|
+
if (maxValue - minValue <= rangeCount) {
|
|
33199
33199
|
if (decimalPoint > 0) {
|
|
33200
|
-
interval = +((maxValue - minValue) /
|
|
33200
|
+
interval = +((maxValue - minValue) / rangeCount).toFixed(decimalPoint);
|
|
33201
33201
|
} else {
|
|
33202
33202
|
interval = 1;
|
|
33203
33203
|
}
|
|
@@ -34696,6 +34696,7 @@ var AXIS_OPTION = {
|
|
|
34696
34696
|
startToZero: false,
|
|
34697
34697
|
showAxis: true,
|
|
34698
34698
|
axisLineColor: '#C9CFDC',
|
|
34699
|
+
axisLineWidth: 1,
|
|
34699
34700
|
showGrid: true,
|
|
34700
34701
|
gridLineColor: '#C9CFDC',
|
|
34701
34702
|
showIndicator: false,
|
|
@@ -36876,10 +36877,11 @@ var element_pie_Pie = /*#__PURE__*/function () {
|
|
|
36876
36877
|
|
|
36877
36878
|
|
|
36878
36879
|
|
|
36880
|
+
|
|
36879
36881
|
|
|
36880
36882
|
|
|
36881
36883
|
var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
36882
|
-
function HeatMap(sId, opt, colorOpt, isGradient) {
|
|
36884
|
+
function HeatMap(sId, opt, colorOpt, isHorizontal, isGradient) {
|
|
36883
36885
|
var _this = this;
|
|
36884
36886
|
|
|
36885
36887
|
_classCallCheck(this, HeatMap);
|
|
@@ -36888,6 +36890,7 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
36888
36890
|
Object.keys(merged).forEach(function (key) {
|
|
36889
36891
|
_this[key] = merged[key];
|
|
36890
36892
|
});
|
|
36893
|
+
this.isHorizontal = isHorizontal;
|
|
36891
36894
|
this.isGradient = isGradient;
|
|
36892
36895
|
this.createColorState(colorOpt);
|
|
36893
36896
|
this.sId = sId;
|
|
@@ -36917,8 +36920,8 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
36917
36920
|
var regex = /[^0-9]&[^,]/g;
|
|
36918
36921
|
var min = colorOpt.min,
|
|
36919
36922
|
max = colorOpt.max,
|
|
36920
|
-
|
|
36921
|
-
|
|
36923
|
+
rangeCount = colorOpt.rangeCount,
|
|
36924
|
+
colorsByRange = colorOpt.colorsByRange,
|
|
36922
36925
|
error = colorOpt.error,
|
|
36923
36926
|
stroke = colorOpt.stroke;
|
|
36924
36927
|
var minColor = min.includes('#') ? helpers_util.hexToRgb(min) : min.replace(regex, '');
|
|
@@ -36948,14 +36951,13 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
36948
36951
|
maxG: maxG,
|
|
36949
36952
|
maxB: maxB
|
|
36950
36953
|
},
|
|
36951
|
-
|
|
36954
|
+
rangeCount: rangeCount,
|
|
36952
36955
|
start: 0,
|
|
36953
36956
|
end: 100,
|
|
36954
36957
|
selectedValue: null
|
|
36955
36958
|
});
|
|
36956
|
-
} else if (
|
|
36957
|
-
|
|
36958
|
-
categoryColors.forEach(function (_ref, ix) {
|
|
36959
|
+
} else if (colorsByRange.length) {
|
|
36960
|
+
colorsByRange.forEach(function (_ref, ix) {
|
|
36959
36961
|
var color = _ref.color,
|
|
36960
36962
|
label = _ref.label;
|
|
36961
36963
|
colorState.push({
|
|
@@ -36967,11 +36969,11 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
36967
36969
|
});
|
|
36968
36970
|
});
|
|
36969
36971
|
} else {
|
|
36970
|
-
var unitR = Math.floor((minR - maxR) / (
|
|
36971
|
-
var unitG = Math.floor((minG - maxG) / (
|
|
36972
|
-
var unitB = Math.floor((minB - maxB) / (
|
|
36972
|
+
var unitR = Math.floor((minR - maxR) / (rangeCount - 1));
|
|
36973
|
+
var unitG = Math.floor((minG - maxG) / (rangeCount - 1));
|
|
36974
|
+
var unitB = Math.floor((minB - maxB) / (rangeCount - 1));
|
|
36973
36975
|
|
|
36974
|
-
for (var ix = 0; ix <
|
|
36976
|
+
for (var ix = 0; ix < rangeCount; ix++) {
|
|
36975
36977
|
var r = +minR - unitR * ix;
|
|
36976
36978
|
var g = +minG - unitG * ix;
|
|
36977
36979
|
var b = +minB - unitB * ix;
|
|
@@ -37006,8 +37008,8 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37006
37008
|
return "rgb(".concat(r, ",").concat(g, ",").concat(b, ")");
|
|
37007
37009
|
}
|
|
37008
37010
|
}, {
|
|
37009
|
-
key: "
|
|
37010
|
-
value: function
|
|
37011
|
+
key: "getColorIndexByValue",
|
|
37012
|
+
value: function getColorIndexByValue(value) {
|
|
37011
37013
|
var _this$valueOpt = this.valueOpt,
|
|
37012
37014
|
existError = _this$valueOpt.existError,
|
|
37013
37015
|
min = _this$valueOpt.min,
|
|
@@ -37035,7 +37037,7 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37035
37037
|
max = _this$valueOpt2.max;
|
|
37036
37038
|
var itemInfo = {
|
|
37037
37039
|
show: false,
|
|
37038
|
-
opacity:
|
|
37040
|
+
opacity: 1,
|
|
37039
37041
|
dataColor: null,
|
|
37040
37042
|
id: null,
|
|
37041
37043
|
isHighlight: null
|
|
@@ -37051,11 +37053,10 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37051
37053
|
if (value < 0 || start <= ratio && ratio <= end) {
|
|
37052
37054
|
itemInfo.show = true;
|
|
37053
37055
|
itemInfo.isHighlight = selectedValue !== null && Math.floor(value) === Math.floor(min + (max - min) * (selectedValue / 100));
|
|
37054
|
-
itemInfo.opacity = 1;
|
|
37055
37056
|
itemInfo.dataColor = value < 0 ? this.errorColor : this.getColorForGradient(ratio);
|
|
37056
37057
|
}
|
|
37057
37058
|
} else {
|
|
37058
|
-
var colorIndex = this.
|
|
37059
|
+
var colorIndex = this.getColorIndexByValue(value);
|
|
37059
37060
|
var _this$colorState$colo = this.colorState[colorIndex],
|
|
37060
37061
|
show = _this$colorState$colo.show,
|
|
37061
37062
|
state = _this$colorState$colo.state,
|
|
@@ -37071,18 +37072,26 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37071
37072
|
}
|
|
37072
37073
|
}, {
|
|
37073
37074
|
key: "drawItem",
|
|
37074
|
-
value: function drawItem(ctx, x, y, w, h) {
|
|
37075
|
+
value: function drawItem(ctx, x, y, w, h, borderOpt) {
|
|
37075
37076
|
ctx.beginPath();
|
|
37076
37077
|
|
|
37077
|
-
if (
|
|
37078
|
-
var radius =
|
|
37078
|
+
if (borderOpt.show) {
|
|
37079
|
+
var radius = borderOpt.radius;
|
|
37079
37080
|
|
|
37080
|
-
if (radius > 0
|
|
37081
|
-
|
|
37082
|
-
|
|
37083
|
-
|
|
37084
|
-
|
|
37085
|
-
|
|
37081
|
+
if (radius > 0) {
|
|
37082
|
+
var minSize = Math.min(w, h);
|
|
37083
|
+
var r = radius;
|
|
37084
|
+
|
|
37085
|
+
if (r > minSize / 2) {
|
|
37086
|
+
r = Math.floor(minSize / 2);
|
|
37087
|
+
}
|
|
37088
|
+
|
|
37089
|
+
ctx.moveTo(x + r, y);
|
|
37090
|
+
ctx.arcTo(x + w, y, x + w, y + h, r);
|
|
37091
|
+
ctx.arcTo(x + w, y + h, x, y + h, r);
|
|
37092
|
+
ctx.arcTo(x, y + h, x, y, r);
|
|
37093
|
+
ctx.arcTo(x, y, x + w, y, r);
|
|
37094
|
+
ctx.stroke();
|
|
37086
37095
|
ctx.fill();
|
|
37087
37096
|
} else {
|
|
37088
37097
|
ctx.strokeRect(x, y, w, h);
|
|
@@ -37132,15 +37141,46 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37132
37141
|
var ctx = param.ctx,
|
|
37133
37142
|
chartRect = param.chartRect,
|
|
37134
37143
|
labelOffset = param.labelOffset,
|
|
37135
|
-
overlayCtx = param.overlayCtx
|
|
37144
|
+
overlayCtx = param.overlayCtx,
|
|
37145
|
+
selectLabel = param.selectLabel,
|
|
37146
|
+
legendHitInfo = param.legendHitInfo,
|
|
37147
|
+
selectItem = param.selectItem;
|
|
37136
37148
|
var xArea = chartRect.chartWidth - (labelOffset.left + labelOffset.right);
|
|
37137
37149
|
var yArea = chartRect.chartHeight - (labelOffset.top + labelOffset.bottom);
|
|
37138
37150
|
var xsp = chartRect.x1 + labelOffset.left;
|
|
37139
37151
|
var ysp = chartRect.y2 - labelOffset.bottom;
|
|
37140
37152
|
this.size.w = xArea / this.labels.x.length;
|
|
37141
37153
|
this.size.h = yArea / this.labels.y.length;
|
|
37142
|
-
|
|
37143
|
-
|
|
37154
|
+
|
|
37155
|
+
var getOpacity = function getOpacity(item, opacity, index) {
|
|
37156
|
+
var selectLabelOption = selectLabel === null || selectLabel === void 0 ? void 0 : selectLabel.option;
|
|
37157
|
+
var useSelectLabel = (selectLabelOption === null || selectLabelOption === void 0 ? void 0 : selectLabelOption.use) && (selectLabelOption === null || selectLabelOption === void 0 ? void 0 : selectLabelOption.useSeriesOpacity);
|
|
37158
|
+
var selectItemOption = selectItem === null || selectItem === void 0 ? void 0 : selectItem.option;
|
|
37159
|
+
var useSelectItem = (selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.use) && (selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.useSeriesOpacity);
|
|
37160
|
+
|
|
37161
|
+
if (!legendHitInfo) {
|
|
37162
|
+
var isDownplay = false;
|
|
37163
|
+
|
|
37164
|
+
if (useSelectItem) {
|
|
37165
|
+
var _selectItem$selected;
|
|
37166
|
+
|
|
37167
|
+
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);
|
|
37168
|
+
} else if (useSelectLabel) {
|
|
37169
|
+
var _selectLabel$selected;
|
|
37170
|
+
|
|
37171
|
+
var selectedLabelList = selectLabel === null || selectLabel === void 0 ? void 0 : (_selectLabel$selected = selectLabel.selected) === null || _selectLabel$selected === void 0 ? void 0 : _selectLabel$selected.label;
|
|
37172
|
+
isDownplay = selectedLabelList.length && !selectedLabelList.includes(_this2.isHorizontal ? item.y : item.x);
|
|
37173
|
+
}
|
|
37174
|
+
|
|
37175
|
+
return isDownplay ? 0.1 : 1;
|
|
37176
|
+
}
|
|
37177
|
+
|
|
37178
|
+
return opacity;
|
|
37179
|
+
};
|
|
37180
|
+
|
|
37181
|
+
this.data.forEach(function (item, index) {
|
|
37182
|
+
var axisLineWidth = 1;
|
|
37183
|
+
var xp = _this2.calculateXY('x', item.x, xsp) + axisLineWidth;
|
|
37144
37184
|
|
|
37145
37185
|
var yp = _this2.calculateXY('y', item.y, ysp);
|
|
37146
37186
|
|
|
@@ -37156,27 +37196,40 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37156
37196
|
id = _this2$getItemInfo.id,
|
|
37157
37197
|
isHighlight = _this2$getItemInfo.isHighlight;
|
|
37158
37198
|
|
|
37199
|
+
var itemOpacity = getOpacity(item, opacity, index);
|
|
37159
37200
|
item.dataColor = dataColor;
|
|
37160
37201
|
item.cId = id;
|
|
37161
37202
|
ctx.save();
|
|
37162
37203
|
|
|
37163
37204
|
if (show) {
|
|
37164
|
-
|
|
37165
|
-
|
|
37166
|
-
|
|
37167
|
-
|
|
37168
|
-
|
|
37169
|
-
|
|
37170
|
-
|
|
37171
|
-
|
|
37205
|
+
var _selectItem$selected2;
|
|
37206
|
+
|
|
37207
|
+
ctx.fillStyle = helpers_util.colorStringToRgba(item.dataColor, itemOpacity);
|
|
37208
|
+
var borderOpt = _this2.stroke;
|
|
37209
|
+
var selectItemOption = selectItem === null || selectItem === void 0 ? void 0 : selectItem.option;
|
|
37210
|
+
var useSelectItem = (selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.use) && (selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.showBorder);
|
|
37211
|
+
var isHit = index === (selectItem === null || selectItem === void 0 ? void 0 : (_selectItem$selected2 = selectItem.selected) === null || _selectItem$selected2 === void 0 ? void 0 : _selectItem$selected2.dataIndex);
|
|
37212
|
+
|
|
37213
|
+
if (useSelectItem && isHit) {
|
|
37214
|
+
borderOpt = _objectSpread2({
|
|
37215
|
+
show: selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.showBorder
|
|
37216
|
+
}, selectItemOption === null || selectItemOption === void 0 ? void 0 : selectItemOption.borderStyle);
|
|
37217
|
+
}
|
|
37218
|
+
|
|
37219
|
+
if (borderOpt.show) {
|
|
37220
|
+
var _borderOpt = borderOpt,
|
|
37221
|
+
color = _borderOpt.color,
|
|
37222
|
+
lineWidth = _borderOpt.lineWidth,
|
|
37223
|
+
borderOpacity = _borderOpt.opacity;
|
|
37224
|
+
ctx.strokeStyle = helpers_util.colorStringToRgba(color, itemOpacity === 1 ? borderOpacity : itemOpacity);
|
|
37172
37225
|
ctx.lineWidth = lineWidth;
|
|
37173
|
-
xp += lineWidth *
|
|
37174
|
-
yp += lineWidth *
|
|
37175
|
-
w -= lineWidth
|
|
37176
|
-
h -= lineWidth
|
|
37226
|
+
xp += lineWidth * 0.5;
|
|
37227
|
+
yp += lineWidth * 0.5;
|
|
37228
|
+
w -= lineWidth;
|
|
37229
|
+
h -= lineWidth;
|
|
37177
37230
|
}
|
|
37178
37231
|
|
|
37179
|
-
_this2.drawItem(ctx, xp, yp, w, h);
|
|
37232
|
+
_this2.drawItem(ctx, xp, yp, w, h, borderOpt);
|
|
37180
37233
|
|
|
37181
37234
|
ctx.restore();
|
|
37182
37235
|
item.xp = xp;
|
|
@@ -37360,16 +37413,25 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37360
37413
|
}
|
|
37361
37414
|
|
|
37362
37415
|
ctx.save();
|
|
37363
|
-
ctx.shadowOffsetX =
|
|
37364
|
-
ctx.shadowOffsetY =
|
|
37416
|
+
ctx.shadowOffsetX = 0;
|
|
37417
|
+
ctx.shadowOffsetY = 0;
|
|
37365
37418
|
ctx.shadowBlur = 4;
|
|
37366
37419
|
|
|
37367
37420
|
if (x !== null && y !== null && isShow) {
|
|
37368
37421
|
var color = gdata.dataColor;
|
|
37369
|
-
ctx.shadowColor = helpers_util.colorStringToRgba('#
|
|
37422
|
+
ctx.shadowColor = helpers_util.colorStringToRgba('#959494');
|
|
37370
37423
|
ctx.strokeStyle = helpers_util.colorStringToRgba(color);
|
|
37371
37424
|
ctx.fillStyle = helpers_util.colorStringToRgba(color);
|
|
37372
|
-
|
|
37425
|
+
|
|
37426
|
+
if (this.stroke.show) {
|
|
37427
|
+
var lineWidth = this.stroke.lineWidth;
|
|
37428
|
+
x += lineWidth * 0.5;
|
|
37429
|
+
y += lineWidth * 0.5;
|
|
37430
|
+
w -= lineWidth;
|
|
37431
|
+
h -= lineWidth;
|
|
37432
|
+
}
|
|
37433
|
+
|
|
37434
|
+
this.drawItem(ctx, x - 0.5, y - 0.5, w + 1, h + 1, this.stroke);
|
|
37373
37435
|
ctx.restore();
|
|
37374
37436
|
|
|
37375
37437
|
if (this.showValue.use) {
|
|
@@ -37399,7 +37461,7 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37399
37461
|
name: null
|
|
37400
37462
|
};
|
|
37401
37463
|
var gdata = this.data;
|
|
37402
|
-
var
|
|
37464
|
+
var itemIndex = gdata.findIndex(function (data) {
|
|
37403
37465
|
var x = data.xp,
|
|
37404
37466
|
y = data.yp,
|
|
37405
37467
|
wSize = data.w,
|
|
@@ -37407,9 +37469,11 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
|
|
|
37407
37469
|
return x <= xp && xp <= x + wSize && y <= yp && yp <= y + hSize;
|
|
37408
37470
|
});
|
|
37409
37471
|
|
|
37410
|
-
if (
|
|
37472
|
+
if (itemIndex > -1) {
|
|
37473
|
+
var foundItem = gdata[itemIndex];
|
|
37411
37474
|
item.data = foundItem;
|
|
37412
37475
|
item.color = foundItem.dataColor;
|
|
37476
|
+
item.index = itemIndex;
|
|
37413
37477
|
item.hit = true;
|
|
37414
37478
|
}
|
|
37415
37479
|
|
|
@@ -37601,7 +37665,7 @@ var model_series_modules = {
|
|
|
37601
37665
|
heatMapColor = _this$options.heatMapColor,
|
|
37602
37666
|
legend = _this$options.legend;
|
|
37603
37667
|
var isGradient = legend.type === 'gradient';
|
|
37604
|
-
return new element_heatmap(id, opt, heatMapColor, isGradient);
|
|
37668
|
+
return new element_heatmap(id, opt, heatMapColor, isHorizontal, isGradient);
|
|
37605
37669
|
}
|
|
37606
37670
|
|
|
37607
37671
|
return false;
|
|
@@ -37918,7 +37982,7 @@ var scale_Scale = /*#__PURE__*/function () {
|
|
|
37918
37982
|
}
|
|
37919
37983
|
|
|
37920
37984
|
if (this.showAxis) {
|
|
37921
|
-
ctx.lineWidth =
|
|
37985
|
+
ctx.lineWidth = this.axisLineWidth;
|
|
37922
37986
|
aliasPixel = helpers_util.aliasPixel(ctx.lineWidth);
|
|
37923
37987
|
ctx.beginPath();
|
|
37924
37988
|
ctx.strokeStyle = this.axisLineColor;
|
|
@@ -38972,7 +39036,7 @@ var scale_step_StepScale = /*#__PURE__*/function (_Scale) {
|
|
|
38972
39036
|
}
|
|
38973
39037
|
|
|
38974
39038
|
ctx.fillStyle = this.labelStyle.color;
|
|
38975
|
-
ctx.lineWidth =
|
|
39039
|
+
ctx.lineWidth = this.axisLineWidth;
|
|
38976
39040
|
var aliasPixel = helpers_util.aliasPixel(ctx.lineWidth);
|
|
38977
39041
|
ctx.beginPath();
|
|
38978
39042
|
ctx.strokeStyle = this.axisLineColor;
|
|
@@ -39386,7 +39450,7 @@ var scale_time_category_TimeCategoryScale = /*#__PURE__*/function (_Scale) {
|
|
|
39386
39450
|
}
|
|
39387
39451
|
|
|
39388
39452
|
ctx.fillStyle = this.labelStyle.color;
|
|
39389
|
-
ctx.lineWidth =
|
|
39453
|
+
ctx.lineWidth = this.axisLineWidth;
|
|
39390
39454
|
var aliasPixel = helpers_util.aliasPixel(ctx.lineWidth);
|
|
39391
39455
|
ctx.beginPath();
|
|
39392
39456
|
ctx.strokeStyle = this.axisLineColor;
|
|
@@ -40085,6 +40149,10 @@ var plugins_legend_modules = {
|
|
|
40085
40149
|
}
|
|
40086
40150
|
|
|
40087
40151
|
var targetId = targetDOM === null || targetDOM === void 0 ? void 0 : (_targetDOM$series4 = targetDOM.series) === null || _targetDOM$series4 === void 0 ? void 0 : _targetDOM$series4.cId;
|
|
40152
|
+
var legendHitInfo = {
|
|
40153
|
+
sId: targetId,
|
|
40154
|
+
type: _this5.options.type
|
|
40155
|
+
};
|
|
40088
40156
|
series.colorState.forEach(function (colorItem) {
|
|
40089
40157
|
colorItem.state = colorItem.id === targetId ? 'highlight' : 'downplay';
|
|
40090
40158
|
});
|
|
@@ -40094,6 +40162,9 @@ var plugins_legend_modules = {
|
|
|
40094
40162
|
updateSelTip: {
|
|
40095
40163
|
update: false,
|
|
40096
40164
|
keepDomain: false
|
|
40165
|
+
},
|
|
40166
|
+
hitInfo: {
|
|
40167
|
+
legend: legendHitInfo
|
|
40097
40168
|
}
|
|
40098
40169
|
});
|
|
40099
40170
|
};
|
|
@@ -41510,6 +41581,8 @@ var es_object_from_entries = __webpack_require__("c1f9");
|
|
|
41510
41581
|
|
|
41511
41582
|
|
|
41512
41583
|
|
|
41584
|
+
|
|
41585
|
+
|
|
41513
41586
|
var plugins_interaction_modules = {
|
|
41514
41587
|
/**
|
|
41515
41588
|
* Hide legend components by manipulating css
|
|
@@ -41656,15 +41729,19 @@ var plugins_interaction_modules = {
|
|
|
41656
41729
|
|
|
41657
41730
|
var hitInfo = _this.getItemByPosition(offset, false);
|
|
41658
41731
|
|
|
41659
|
-
if (hitInfo.label !== null) {
|
|
41660
|
-
_this.render(hitInfo);
|
|
41661
|
-
}
|
|
41662
|
-
|
|
41663
41732
|
args.label = hitInfo.label;
|
|
41664
41733
|
args.value = hitInfo.value;
|
|
41665
41734
|
args.seriesId = hitInfo.sId;
|
|
41666
41735
|
args.dataIndex = hitInfo.maxIndex;
|
|
41667
41736
|
args.acc = hitInfo.acc;
|
|
41737
|
+
|
|
41738
|
+
if (_this.options.type === 'heatMap') {
|
|
41739
|
+
args.deselect = _this.setDeselectItem(hitInfo);
|
|
41740
|
+
}
|
|
41741
|
+
|
|
41742
|
+
if (hitInfo.label !== null) {
|
|
41743
|
+
_this.render(hitInfo);
|
|
41744
|
+
}
|
|
41668
41745
|
} else if (_this.options.selectLabel.use && _this.options.selectLabel.useClick) {
|
|
41669
41746
|
var _offset = _this.getMousePosition(e);
|
|
41670
41747
|
|
|
@@ -42197,14 +42274,18 @@ var plugins_interaction_modules = {
|
|
|
42197
42274
|
var _this3 = this;
|
|
42198
42275
|
|
|
42199
42276
|
if (this.options.selectLabel.use) {
|
|
42200
|
-
var limit = this.options.selectLabel.limit;
|
|
42201
|
-
|
|
42202
42277
|
if (!this.defaultSelectInfo) {
|
|
42203
42278
|
this.defaultSelectInfo = {
|
|
42204
42279
|
dataIndex: []
|
|
42205
42280
|
};
|
|
42206
42281
|
}
|
|
42207
42282
|
|
|
42283
|
+
if (this.options.type === 'heatMap') {
|
|
42284
|
+
this.initSelectedInfoForHeatMap();
|
|
42285
|
+
return;
|
|
42286
|
+
}
|
|
42287
|
+
|
|
42288
|
+
var limit = this.options.selectLabel.limit;
|
|
42208
42289
|
var infoObj = this.defaultSelectInfo;
|
|
42209
42290
|
infoObj.dataIndex.splice(limit);
|
|
42210
42291
|
infoObj.label = infoObj.dataIndex.map(function (i) {
|
|
@@ -42229,6 +42310,29 @@ var plugins_interaction_modules = {
|
|
|
42229
42310
|
}
|
|
42230
42311
|
},
|
|
42231
42312
|
|
|
42313
|
+
/**
|
|
42314
|
+
* init defaultSelectInfo object for HeatMap.
|
|
42315
|
+
* - at selectLabel using: set each series data and label text
|
|
42316
|
+
*/
|
|
42317
|
+
initSelectedInfoForHeatMap: function initSelectedInfoForHeatMap() {
|
|
42318
|
+
var _this4 = this;
|
|
42319
|
+
|
|
42320
|
+
var limit = this.options.selectLabel.limit;
|
|
42321
|
+
var isHorizontal = this.options.horizontal;
|
|
42322
|
+
var infoObj = this.defaultSelectInfo;
|
|
42323
|
+
infoObj.dataIndex.splice(limit);
|
|
42324
|
+
var targetLabel = isHorizontal ? 'y' : 'x';
|
|
42325
|
+
infoObj.label = infoObj.dataIndex.map(function (i) {
|
|
42326
|
+
return _this4.data.labels[targetLabel][i];
|
|
42327
|
+
});
|
|
42328
|
+
var dataValues = Object.values(this.data.data)[0];
|
|
42329
|
+
infoObj.data = dataValues.filter(function (_ref5) {
|
|
42330
|
+
var x = _ref5.x,
|
|
42331
|
+
y = _ref5.y;
|
|
42332
|
+
return infoObj.label.includes(isHorizontal ? y : x);
|
|
42333
|
+
});
|
|
42334
|
+
},
|
|
42335
|
+
|
|
42232
42336
|
/**
|
|
42233
42337
|
* Add or delete selected label index, according to policy and option
|
|
42234
42338
|
* (set each series data and label text)
|
|
@@ -42324,12 +42428,12 @@ var plugins_interaction_modules = {
|
|
|
42324
42428
|
* object.range: coordinate-based range in graph
|
|
42325
42429
|
* @returns {object}
|
|
42326
42430
|
*/
|
|
42327
|
-
getSelectionRage: function getSelectionRage(
|
|
42328
|
-
var xsp =
|
|
42329
|
-
ysp =
|
|
42330
|
-
width =
|
|
42331
|
-
height =
|
|
42332
|
-
range =
|
|
42431
|
+
getSelectionRage: function getSelectionRage(_ref6) {
|
|
42432
|
+
var xsp = _ref6.xsp,
|
|
42433
|
+
ysp = _ref6.ysp,
|
|
42434
|
+
width = _ref6.width,
|
|
42435
|
+
height = _ref6.height,
|
|
42436
|
+
range = _ref6.range;
|
|
42333
42437
|
var dataRangeX = this.axesSteps.x.length ? this.axesSteps.x[0] : null;
|
|
42334
42438
|
var dataRangeY = this.axesSteps.y.length ? this.axesSteps.y[0] : null;
|
|
42335
42439
|
|
|
@@ -42386,11 +42490,11 @@ var plugins_interaction_modules = {
|
|
|
42386
42490
|
|
|
42387
42491
|
var sId = Object.keys(this.seriesList)[0];
|
|
42388
42492
|
|
|
42389
|
-
var
|
|
42390
|
-
xMin =
|
|
42391
|
-
xMax =
|
|
42392
|
-
yMin =
|
|
42393
|
-
yMax =
|
|
42493
|
+
var _ref7 = (_this$seriesList$sId$ = this.seriesList[sId].findSelectionRange(range)) !== null && _this$seriesList$sId$ !== void 0 ? _this$seriesList$sId$ : {},
|
|
42494
|
+
xMin = _ref7.xMin,
|
|
42495
|
+
xMax = _ref7.xMax,
|
|
42496
|
+
yMin = _ref7.yMin,
|
|
42497
|
+
yMax = _ref7.yMax;
|
|
42394
42498
|
|
|
42395
42499
|
return {
|
|
42396
42500
|
xMin: xMin !== null && xMin !== void 0 ? xMin : dataRangeX.graphMin,
|
|
@@ -42398,6 +42502,23 @@ var plugins_interaction_modules = {
|
|
|
42398
42502
|
yMin: yMin !== null && yMin !== void 0 ? yMin : dataRangeY.graphMin,
|
|
42399
42503
|
yMax: yMax !== null && yMax !== void 0 ? yMax : dataRangeY.graphMax
|
|
42400
42504
|
};
|
|
42505
|
+
},
|
|
42506
|
+
setDeselectItem: function setDeselectItem(hitInfo) {
|
|
42507
|
+
var deselect = false;
|
|
42508
|
+
|
|
42509
|
+
if (this.options.selectItem.useDeselectItem) {
|
|
42510
|
+
var _this$defaultSelectIt;
|
|
42511
|
+
|
|
42512
|
+
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);
|
|
42513
|
+
|
|
42514
|
+
if (!isNaN(hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.maxIndex) && isEqualSelectItem) {
|
|
42515
|
+
deselect = true;
|
|
42516
|
+
this.defaultSelectItemInfo = null;
|
|
42517
|
+
return true;
|
|
42518
|
+
}
|
|
42519
|
+
}
|
|
42520
|
+
|
|
42521
|
+
return deselect;
|
|
42401
42522
|
}
|
|
42402
42523
|
};
|
|
42403
42524
|
/* harmony default export */ var plugins_interaction = (plugins_interaction_modules);
|
|
@@ -43425,7 +43546,8 @@ var element_tip_modules = {
|
|
|
43425
43546
|
var isExistSelectedLabel;
|
|
43426
43547
|
|
|
43427
43548
|
if (labelTipOpt.use && labelTipOpt.showTip) {
|
|
43428
|
-
|
|
43549
|
+
var isHeatMap = opt.type === 'heatMap';
|
|
43550
|
+
isExistSelectedLabel = isHeatMap ? this.drawLabelTipForHeatMap() : this.drawLabelTip();
|
|
43429
43551
|
}
|
|
43430
43552
|
|
|
43431
43553
|
var executeDrawIndicator = function executeDrawIndicator(tipOpt) {
|
|
@@ -43805,6 +43927,53 @@ var element_tip_modules = {
|
|
|
43805
43927
|
return drawTip;
|
|
43806
43928
|
},
|
|
43807
43929
|
|
|
43930
|
+
/**
|
|
43931
|
+
* Draw Selected Label Tip
|
|
43932
|
+
* @returns {boolean} Whether drew at least one tip
|
|
43933
|
+
*/
|
|
43934
|
+
drawLabelTipForHeatMap: function drawLabelTipForHeatMap() {
|
|
43935
|
+
var _this3 = this;
|
|
43936
|
+
|
|
43937
|
+
var opt = this.options;
|
|
43938
|
+
var isHorizontal = !!opt.horizontal;
|
|
43939
|
+
var labelTipOpt = opt.selectLabel;
|
|
43940
|
+
var dataIndex = this.defaultSelectInfo.dataIndex;
|
|
43941
|
+
var drawTip = false;
|
|
43942
|
+
|
|
43943
|
+
if (dataIndex) {
|
|
43944
|
+
drawTip = true;
|
|
43945
|
+
var chartRect = this.chartRect;
|
|
43946
|
+
var labelOffset = this.labelOffset;
|
|
43947
|
+
var aPos = {
|
|
43948
|
+
x1: chartRect.x1 + labelOffset.left,
|
|
43949
|
+
x2: chartRect.x2 - labelOffset.right,
|
|
43950
|
+
y1: chartRect.y1 + labelOffset.top,
|
|
43951
|
+
y2: chartRect.y2 - labelOffset.bottom
|
|
43952
|
+
};
|
|
43953
|
+
var labelAxes = isHorizontal ? this.axesY[0] : this.axesX[0];
|
|
43954
|
+
var labelStartPoint = aPos[labelAxes.units.rectStart];
|
|
43955
|
+
var labelEndPoint = aPos[labelAxes.units.rectEnd];
|
|
43956
|
+
var labelGap = (labelEndPoint - labelStartPoint) / labelAxes.labels.length;
|
|
43957
|
+
var valueAxes = isHorizontal ? this.axesX[0] : this.axesY[0];
|
|
43958
|
+
var offset = 6 * (isHorizontal ? 1 : -1);
|
|
43959
|
+
var gp = aPos[valueAxes.units.rectEnd] + offset;
|
|
43960
|
+
dataIndex === null || dataIndex === void 0 ? void 0 : dataIndex.forEach(function (index) {
|
|
43961
|
+
var labelCenter = Math.round(labelStartPoint + labelGap * index);
|
|
43962
|
+
var dp = labelCenter + labelGap / 2;
|
|
43963
|
+
|
|
43964
|
+
_this3.showTip({
|
|
43965
|
+
context: _this3.bufferCtx,
|
|
43966
|
+
x: isHorizontal ? gp : dp,
|
|
43967
|
+
y: isHorizontal ? dp : gp,
|
|
43968
|
+
opt: labelTipOpt,
|
|
43969
|
+
isSamePos: false
|
|
43970
|
+
});
|
|
43971
|
+
});
|
|
43972
|
+
}
|
|
43973
|
+
|
|
43974
|
+
return drawTip;
|
|
43975
|
+
},
|
|
43976
|
+
|
|
43808
43977
|
/**
|
|
43809
43978
|
* Calculate x, y position to draw text tip
|
|
43810
43979
|
* @param {object} param object for drawing text tip
|
|
@@ -44278,7 +44447,6 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44278
44447
|
|
|
44279
44448
|
switch (chartType) {
|
|
44280
44449
|
case 'line':
|
|
44281
|
-
case 'heatMap':
|
|
44282
44450
|
{
|
|
44283
44451
|
var legendHitInfo = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44284
44452
|
series.draw(_objectSpread2({
|
|
@@ -44287,10 +44455,34 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44287
44455
|
break;
|
|
44288
44456
|
}
|
|
44289
44457
|
|
|
44290
|
-
case '
|
|
44458
|
+
case 'heatMap':
|
|
44291
44459
|
{
|
|
44292
44460
|
var _legendHitInfo = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44293
44461
|
|
|
44462
|
+
var selectInfo = void 0;
|
|
44463
|
+
var defaultSelectInfo = this.defaultSelectItemInfo;
|
|
44464
|
+
|
|
44465
|
+
if (defaultSelectInfo !== null && defaultSelectInfo !== void 0 && defaultSelectInfo.dataIndex || (defaultSelectInfo === null || defaultSelectInfo === void 0 ? void 0 : defaultSelectInfo.dataIndex) === 0) {
|
|
44466
|
+
selectInfo = _objectSpread2({}, defaultSelectInfo);
|
|
44467
|
+
} else {
|
|
44468
|
+
selectInfo = null;
|
|
44469
|
+
}
|
|
44470
|
+
|
|
44471
|
+
series.draw(_objectSpread2({
|
|
44472
|
+
legendHitInfo: _legendHitInfo,
|
|
44473
|
+
selectInfo: selectInfo,
|
|
44474
|
+
selectItem: {
|
|
44475
|
+
option: selectItem,
|
|
44476
|
+
selected: selectInfo
|
|
44477
|
+
}
|
|
44478
|
+
}, opt));
|
|
44479
|
+
break;
|
|
44480
|
+
}
|
|
44481
|
+
|
|
44482
|
+
case 'bar':
|
|
44483
|
+
{
|
|
44484
|
+
var _legendHitInfo2 = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44485
|
+
|
|
44294
44486
|
var _this$options3 = this.options,
|
|
44295
44487
|
thickness = _this$options3.thickness,
|
|
44296
44488
|
cPadRatio = _this$options3.cPadRatio,
|
|
@@ -44301,7 +44493,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44301
44493
|
borderRadius: borderRadius,
|
|
44302
44494
|
showSeriesCount: showSeriesCount,
|
|
44303
44495
|
showIndex: showIndex,
|
|
44304
|
-
legendHitInfo:
|
|
44496
|
+
legendHitInfo: _legendHitInfo2
|
|
44305
44497
|
}, opt));
|
|
44306
44498
|
|
|
44307
44499
|
if (series.show) {
|
|
@@ -44315,21 +44507,21 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44315
44507
|
{
|
|
44316
44508
|
var _this$lastHitInfo, _this$defaultSelectIt;
|
|
44317
44509
|
|
|
44318
|
-
var
|
|
44510
|
+
var _selectInfo = (_this$lastHitInfo = this.lastHitInfo) !== null && _this$lastHitInfo !== void 0 ? _this$lastHitInfo : {
|
|
44319
44511
|
sId: (_this$defaultSelectIt = this.defaultSelectItemInfo) === null || _this$defaultSelectIt === void 0 ? void 0 : _this$defaultSelectIt.seriesID
|
|
44320
44512
|
};
|
|
44321
44513
|
|
|
44322
|
-
var
|
|
44514
|
+
var _legendHitInfo3 = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44323
44515
|
|
|
44324
44516
|
if (this.options.sunburst) {
|
|
44325
44517
|
this.drawSunburst({
|
|
44326
|
-
selectInfo:
|
|
44327
|
-
legendHitInfo:
|
|
44518
|
+
selectInfo: _selectInfo,
|
|
44519
|
+
legendHitInfo: _legendHitInfo3
|
|
44328
44520
|
});
|
|
44329
44521
|
} else {
|
|
44330
44522
|
this.drawPie({
|
|
44331
|
-
selectInfo:
|
|
44332
|
-
legendHitInfo:
|
|
44523
|
+
selectInfo: _selectInfo,
|
|
44524
|
+
legendHitInfo: _legendHitInfo3
|
|
44333
44525
|
});
|
|
44334
44526
|
}
|
|
44335
44527
|
|
|
@@ -44342,29 +44534,29 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44342
44534
|
|
|
44343
44535
|
case 'scatter':
|
|
44344
44536
|
{
|
|
44345
|
-
var
|
|
44537
|
+
var _legendHitInfo4 = hitInfo === null || hitInfo === void 0 ? void 0 : hitInfo.legend;
|
|
44346
44538
|
|
|
44347
|
-
var
|
|
44539
|
+
var _selectInfo2 = void 0;
|
|
44348
44540
|
|
|
44349
44541
|
if (selectItem.use && selectItem.useSeriesOpacity) {
|
|
44350
44542
|
var lastHitInfo = this.lastHitInfo;
|
|
44351
|
-
var
|
|
44543
|
+
var _defaultSelectInfo = this.defaultSelectItemInfo;
|
|
44352
44544
|
|
|
44353
44545
|
if (lastHitInfo !== null && lastHitInfo !== void 0 && lastHitInfo.maxIndex || (lastHitInfo === null || lastHitInfo === void 0 ? void 0 : lastHitInfo.maxIndex) === 0) {
|
|
44354
|
-
|
|
44546
|
+
_selectInfo2 = {
|
|
44355
44547
|
seriesID: lastHitInfo.sId,
|
|
44356
44548
|
dataIndex: lastHitInfo.maxIndex
|
|
44357
44549
|
};
|
|
44358
|
-
} else if (
|
|
44359
|
-
|
|
44550
|
+
} else if (_defaultSelectInfo !== null && _defaultSelectInfo !== void 0 && _defaultSelectInfo.dataIndex || (_defaultSelectInfo === null || _defaultSelectInfo === void 0 ? void 0 : _defaultSelectInfo.dataIndex) === 0) {
|
|
44551
|
+
_selectInfo2 = _objectSpread2({}, _defaultSelectInfo);
|
|
44360
44552
|
} else {
|
|
44361
|
-
|
|
44553
|
+
_selectInfo2 = null;
|
|
44362
44554
|
}
|
|
44363
44555
|
}
|
|
44364
44556
|
|
|
44365
44557
|
series.draw(_objectSpread2({
|
|
44366
|
-
legendHitInfo:
|
|
44367
|
-
selectInfo:
|
|
44558
|
+
legendHitInfo: _legendHitInfo4,
|
|
44559
|
+
selectInfo: _selectInfo2
|
|
44368
44560
|
}, opt));
|
|
44369
44561
|
break;
|
|
44370
44562
|
}
|
|
@@ -44844,7 +45036,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44844
45036
|
if (options.legend.show) {
|
|
44845
45037
|
var _options$legend, _options$legend$table;
|
|
44846
45038
|
|
|
44847
|
-
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 !== '
|
|
45039
|
+
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';
|
|
44848
45040
|
|
|
44849
45041
|
if (!this.isInitLegend) {
|
|
44850
45042
|
this.initLegend();
|
|
@@ -45738,7 +45930,15 @@ var DEFAULT_OPTIONS = {
|
|
|
45738
45930
|
fontFamily: 'Roboto',
|
|
45739
45931
|
fontWeight: 400
|
|
45740
45932
|
},
|
|
45741
|
-
useSeriesOpacity: false
|
|
45933
|
+
useSeriesOpacity: false,
|
|
45934
|
+
useDeselectItem: false,
|
|
45935
|
+
showBorder: false,
|
|
45936
|
+
borderStyle: {
|
|
45937
|
+
color: '#FFFFFF',
|
|
45938
|
+
lineWidth: 1,
|
|
45939
|
+
opacity: 1,
|
|
45940
|
+
radius: 0
|
|
45941
|
+
}
|
|
45742
45942
|
},
|
|
45743
45943
|
selectLabel: {
|
|
45744
45944
|
use: false,
|
|
@@ -45808,8 +46008,8 @@ var DEFAULT_OPTIONS = {
|
|
|
45808
46008
|
heatMapColor: {
|
|
45809
46009
|
min: '#FFFFFF',
|
|
45810
46010
|
max: '#0052FF',
|
|
45811
|
-
|
|
45812
|
-
|
|
46011
|
+
rangeCount: 1,
|
|
46012
|
+
colorsByRange: [],
|
|
45813
46013
|
stroke: {
|
|
45814
46014
|
show: false,
|
|
45815
46015
|
color: '#FFFFFF',
|
|
@@ -45865,6 +46065,7 @@ var chart_uses_useModel = function useModel(selectedLabel) {
|
|
|
45865
46065
|
var _click = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(e) {
|
|
45866
46066
|
var _e$selected, _e$selected2;
|
|
45867
46067
|
|
|
46068
|
+
var selectedItem;
|
|
45868
46069
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
45869
46070
|
while (1) {
|
|
45870
46071
|
switch (_context.prev = _context.next) {
|
|
@@ -45874,10 +46075,20 @@ var chart_uses_useModel = function useModel(selectedLabel) {
|
|
|
45874
46075
|
|
|
45875
46076
|
case 2:
|
|
45876
46077
|
if (e.label) {
|
|
45877
|
-
|
|
46078
|
+
selectedItem = {
|
|
45878
46079
|
seriesID: e.seriesId,
|
|
45879
46080
|
dataIndex: e.dataIndex
|
|
45880
|
-
}
|
|
46081
|
+
};
|
|
46082
|
+
|
|
46083
|
+
if ('deselect' in e) {
|
|
46084
|
+
if (e.deselect) {
|
|
46085
|
+
selectedItem = null;
|
|
46086
|
+
}
|
|
46087
|
+
|
|
46088
|
+
delete e.deselect;
|
|
46089
|
+
}
|
|
46090
|
+
|
|
46091
|
+
emit('update:selectedItem', selectedItem);
|
|
45881
46092
|
}
|
|
45882
46093
|
|
|
45883
46094
|
if ((_e$selected = e.selected) !== null && _e$selected !== void 0 && _e$selected.dataIndex) {
|