@syncfusion/ej2-maps 32.1.19 → 32.1.21
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/ej2-maps.min.js +10 -1
- package/dist/ej2-maps.umd.min.js +10 -1
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +13 -5
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +13 -5
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +10 -1
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/package.json +2 -2
- package/src/maps/layers/legend.js +13 -5
|
@@ -13590,15 +13590,23 @@ class Legend {
|
|
|
13590
13590
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13591
13591
|
Array.prototype.forEach.call(dataSource, (data, dataIndex) => {
|
|
13592
13592
|
range = false;
|
|
13593
|
-
const
|
|
13593
|
+
const colorValue = data[colorValuePath];
|
|
13594
|
+
const isEmpty = colorValue === '' || isNullOrUndefined(colorValue);
|
|
13595
|
+
const rangeValue = !isEmpty ? Number(colorValue) : NaN;
|
|
13596
|
+
const hasNumeric = !isEmpty && Number.isFinite(rangeValue);
|
|
13597
|
+
const equalValue = !isEmpty ? colorValue : null;
|
|
13594
13598
|
for (let z = 0; z < colorMapping.length; z++) {
|
|
13595
|
-
|
|
13596
|
-
|
|
13599
|
+
const colorMap = colorMapping[z];
|
|
13600
|
+
if (hasNumeric && !isNaN(rangeValue) && colorMap.from != null && colorMap.to != null) {
|
|
13601
|
+
if (rangeValue >= colorMap.from && rangeValue <= colorMap.to) {
|
|
13597
13602
|
range = true;
|
|
13603
|
+
break;
|
|
13598
13604
|
}
|
|
13599
13605
|
}
|
|
13600
|
-
else if (!
|
|
13601
|
-
|
|
13606
|
+
else if (!hasNumeric && equalValue !== null && !isNullOrUndefined(colorMap.value)
|
|
13607
|
+
&& equalValue === colorMap.value) {
|
|
13608
|
+
range = true;
|
|
13609
|
+
break;
|
|
13602
13610
|
}
|
|
13603
13611
|
}
|
|
13604
13612
|
if (!range) {
|