@syncfusion/ej2-maps 32.1.19 → 32.1.24

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.
@@ -13936,15 +13936,23 @@ var Legend = /** @__PURE__ @class */ (function () {
13936
13936
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13937
13937
  Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
13938
13938
  range_1 = false;
13939
- var rangeValue = data[colorValuePath];
13939
+ var colorValue = data[colorValuePath];
13940
+ var isEmpty = colorValue === '' || isNullOrUndefined(colorValue);
13941
+ var rangeValue = !isEmpty ? Number(colorValue) : NaN;
13942
+ var hasNumeric = !isEmpty && Number.isFinite(rangeValue);
13943
+ var equalValue = !isEmpty ? colorValue : null;
13940
13944
  for (var z = 0; z < colorMapping.length; z++) {
13941
- if (!isNullOrUndefined(rangeValue) && !isNaN(rangeValue)) {
13942
- if (rangeValue >= colorMapping[z].from && rangeValue <= colorMapping[z].to) {
13945
+ var colorMap_1 = colorMapping[z];
13946
+ if (hasNumeric && !isNaN(rangeValue) && colorMap_1.from != null && colorMap_1.to != null) {
13947
+ if (rangeValue >= colorMap_1.from && rangeValue <= colorMap_1.to) {
13943
13948
  range_1 = true;
13949
+ break;
13944
13950
  }
13945
13951
  }
13946
- else if (!range_1) {
13947
- range_1 = false;
13952
+ else if (!hasNumeric && equalValue !== null && !isNullOrUndefined(colorMap_1.value)
13953
+ && equalValue === colorMap_1.value) {
13954
+ range_1 = true;
13955
+ break;
13948
13956
  }
13949
13957
  }
13950
13958
  if (!range_1) {