@progress/kendo-charts 1.26.1 → 1.27.0-dev.202212220929

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.
@@ -1061,33 +1061,7 @@ var Chart = (function (Class) {
1061
1061
  return (element.hover || element.over) && !(element instanceof PlotAreaBase);
1062
1062
  });
1063
1063
 
1064
- var activePoint = this._activePoint;
1065
- var multipleSeries = this._plotArea.series.length > 1;
1066
- var hasInactiveOpacity = this._hasInactiveOpacity();
1067
-
1068
- this._updateHoveredPoint(point, e);
1069
-
1070
- if (point && activePoint !== point && point.hover) {
1071
- this._activePoint = point;
1072
-
1073
- if (!this._sharedTooltip() && !point.hover(this, e)) {
1074
- this._displayTooltip(point);
1075
-
1076
- if (hasInactiveOpacity) {
1077
- this._displayInactiveOpacity(point, multipleSeries);
1078
- } else {
1079
- this._highlight.show(point);
1080
- }
1081
- }
1082
- } else if (!point && hasInactiveOpacity) {
1083
- if (multipleSeries && this._activeChartInstance) {
1084
- this._updateSeriesOpacity(point, true);
1085
- this._applySeriesOpacity(this._activeChartInstance.children, null, true);
1086
- this._activeChartInstance = null;
1087
- }
1088
- this._highlight && this._highlight.hide();
1089
- this._activePoint = null;
1090
- }
1064
+ this._showInactiveOpacity(point, e);
1091
1065
 
1092
1066
  return point;
1093
1067
  };
@@ -1223,6 +1197,44 @@ var Chart = (function (Class) {
1223
1197
  return chartInstance;
1224
1198
  };
1225
1199
 
1200
+ Chart.prototype._showInactiveOpacity = function _showInactiveOpacity (point, e) {
1201
+ var activePoint = this._activePoint;
1202
+ var multipleSeries = this._plotArea.series.length > 1;
1203
+ var hasInactiveOpacity = this._hasInactiveOpacity();
1204
+
1205
+ this._updateHoveredPoint(point, e);
1206
+
1207
+ if (point && activePoint !== point && point.hover) {
1208
+ this._activePoint = point;
1209
+
1210
+ if (!this._sharedTooltip() && !point.hover(this, e)) {
1211
+ this._displayTooltip(point);
1212
+
1213
+ if (hasInactiveOpacity) {
1214
+ this._displayInactiveOpacity(point, multipleSeries);
1215
+ } else {
1216
+ this._highlight.show(point);
1217
+ }
1218
+ }
1219
+ }
1220
+
1221
+ return point;
1222
+ };
1223
+
1224
+ Chart.prototype._hideInactiveOpacity = function _hideInactiveOpacity (point) {
1225
+ var multipleSeries = this._plotArea.series.length > 1;
1226
+ var hasInactiveOpacity = this._hasInactiveOpacity();
1227
+ if (hasInactiveOpacity) {
1228
+ if (multipleSeries && this._activeChartInstance) {
1229
+ this._updateSeriesOpacity(point, true);
1230
+ this._applySeriesOpacity(this._activeChartInstance.children, null, true);
1231
+ this._activeChartInstance = null;
1232
+ }
1233
+ this._highlight && this._highlight.hide();
1234
+ this._activePoint = null;
1235
+ }
1236
+ };
1237
+
1226
1238
  Chart.prototype._hasInactiveOpacity = function _hasInactiveOpacity () {
1227
1239
  var hasDefaultInactiveOpacity = this.options.seriesDefaults.highlight.inactiveOpacity !== undefined;
1228
1240
  var hasInactiveOpacity = this.options.series.filter(function (s) { return s.highlight.inactiveOpacity !== undefined; } ).length > 0;
@@ -1280,6 +1292,8 @@ var Chart = (function (Class) {
1280
1292
  unbindEvents(document, ( obj = {}, obj[ MOUSEMOVE ] = this._mouseMoveTrackHandler, obj ));
1281
1293
  this._unsetActivePoint();
1282
1294
  this._mouseMoveTrackHandler = null;
1295
+
1296
+ this._hideInactiveOpacity(point);
1283
1297
  }
1284
1298
  };
1285
1299
 
@@ -1038,33 +1038,7 @@ class Chart extends Class {
1038
1038
  return (element.hover || element.over) && !(element instanceof PlotAreaBase);
1039
1039
  });
1040
1040
 
1041
- const activePoint = this._activePoint;
1042
- const multipleSeries = this._plotArea.series.length > 1;
1043
- const hasInactiveOpacity = this._hasInactiveOpacity();
1044
-
1045
- this._updateHoveredPoint(point, e);
1046
-
1047
- if (point && activePoint !== point && point.hover) {
1048
- this._activePoint = point;
1049
-
1050
- if (!this._sharedTooltip() && !point.hover(this, e)) {
1051
- this._displayTooltip(point);
1052
-
1053
- if (hasInactiveOpacity) {
1054
- this._displayInactiveOpacity(point, multipleSeries);
1055
- } else {
1056
- this._highlight.show(point);
1057
- }
1058
- }
1059
- } else if (!point && hasInactiveOpacity) {
1060
- if (multipleSeries && this._activeChartInstance) {
1061
- this._updateSeriesOpacity(point, true);
1062
- this._applySeriesOpacity(this._activeChartInstance.children, null, true);
1063
- this._activeChartInstance = null;
1064
- }
1065
- this._highlight && this._highlight.hide();
1066
- this._activePoint = null;
1067
- }
1041
+ this._showInactiveOpacity(point, e);
1068
1042
 
1069
1043
  return point;
1070
1044
  }
@@ -1194,6 +1168,44 @@ class Chart extends Class {
1194
1168
  return chartInstance;
1195
1169
  }
1196
1170
 
1171
+ _showInactiveOpacity(point, e) {
1172
+ const activePoint = this._activePoint;
1173
+ const multipleSeries = this._plotArea.series.length > 1;
1174
+ const hasInactiveOpacity = this._hasInactiveOpacity();
1175
+
1176
+ this._updateHoveredPoint(point, e);
1177
+
1178
+ if (point && activePoint !== point && point.hover) {
1179
+ this._activePoint = point;
1180
+
1181
+ if (!this._sharedTooltip() && !point.hover(this, e)) {
1182
+ this._displayTooltip(point);
1183
+
1184
+ if (hasInactiveOpacity) {
1185
+ this._displayInactiveOpacity(point, multipleSeries);
1186
+ } else {
1187
+ this._highlight.show(point);
1188
+ }
1189
+ }
1190
+ }
1191
+
1192
+ return point;
1193
+ }
1194
+
1195
+ _hideInactiveOpacity(point) {
1196
+ const multipleSeries = this._plotArea.series.length > 1;
1197
+ const hasInactiveOpacity = this._hasInactiveOpacity();
1198
+ if (hasInactiveOpacity) {
1199
+ if (multipleSeries && this._activeChartInstance) {
1200
+ this._updateSeriesOpacity(point, true);
1201
+ this._applySeriesOpacity(this._activeChartInstance.children, null, true);
1202
+ this._activeChartInstance = null;
1203
+ }
1204
+ this._highlight && this._highlight.hide();
1205
+ this._activePoint = null;
1206
+ }
1207
+ }
1208
+
1197
1209
  _hasInactiveOpacity() {
1198
1210
  let hasDefaultInactiveOpacity = this.options.seriesDefaults.highlight.inactiveOpacity !== undefined;
1199
1211
  let hasInactiveOpacity = this.options.series.filter(s => s.highlight.inactiveOpacity !== undefined ).length > 0;
@@ -1247,6 +1259,8 @@ class Chart extends Class {
1247
1259
  });
1248
1260
  this._unsetActivePoint();
1249
1261
  this._mouseMoveTrackHandler = null;
1262
+
1263
+ this._hideInactiveOpacity(point);
1250
1264
  }
1251
1265
  }
1252
1266