@syncfusion/ej2-treemap 34.2.2 → 34.2.3
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-treemap.min.js +2 -2
- package/dist/ej2-treemap.umd.min.js +2 -2
- package/dist/ej2-treemap.umd.min.js.map +1 -1
- package/dist/es6/ej2-treemap.es2015.js +44 -7
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +44 -7
- package/dist/es6/ej2-treemap.es5.js.map +1 -1
- package/dist/global/ej2-treemap.min.js +2 -2
- package/dist/global/ej2-treemap.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/treemap/layout/render-panel.js +11 -1
- package/src/treemap/treemap.js +15 -5
- package/src/treemap/utils/helper.js +18 -1
|
@@ -918,7 +918,24 @@ function isContainsData(source, pathName, processData, treemap) {
|
|
|
918
918
|
for (var i = 0; i < source.length; i++) {
|
|
919
919
|
path = treemap.levels[i] ? treemap.levels[i].groupPath : leaf.labelPath ? leaf.labelPath :
|
|
920
920
|
treemap.weightValuePath;
|
|
921
|
-
|
|
921
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
922
|
+
var rawValue = processData[path];
|
|
923
|
+
var isBlank = isNullOrUndefined(rawValue) || rawValue === '';
|
|
924
|
+
var data = void 0;
|
|
925
|
+
if (isBlank) {
|
|
926
|
+
if (treemap.levels && treemap.levels.length > 0) {
|
|
927
|
+
// Multi-level: match the '+ ""' coercion result (null -> 'null', undefined -> 'undefined')
|
|
928
|
+
data = isNullOrUndefined(rawValue) ? String(rawValue) : '';
|
|
929
|
+
}
|
|
930
|
+
else {
|
|
931
|
+
// Flat data: use the unique 'undefined_<weight>' suffix
|
|
932
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
933
|
+
data = 'undefined_' + processData[treemap.weightValuePath];
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
else {
|
|
937
|
+
data = rawValue.toString();
|
|
938
|
+
}
|
|
922
939
|
if (source[i] === data) {
|
|
923
940
|
name += data + (i === source.length - 1 ? '' : '#');
|
|
924
941
|
if (name === pathName) {
|
|
@@ -2491,7 +2508,17 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2491
2508
|
}
|
|
2492
2509
|
levelName = item['name'];
|
|
2493
2510
|
}
|
|
2494
|
-
|
|
2511
|
+
// Use nullish coalescing (??) to preserve empty string '' (blank tile for null labelPath)
|
|
2512
|
+
var formatterOutput = textFormatter(format, item['data'], this_1.treemap);
|
|
2513
|
+
if (!isNullOrUndefined(formatterOutput)) {
|
|
2514
|
+
renderText = formatterOutput;
|
|
2515
|
+
}
|
|
2516
|
+
else if (!isNullOrUndefined(levelName)) {
|
|
2517
|
+
renderText = levelName;
|
|
2518
|
+
}
|
|
2519
|
+
else {
|
|
2520
|
+
renderText = 'undefined';
|
|
2521
|
+
}
|
|
2495
2522
|
childItems = findChildren(item)['values'];
|
|
2496
2523
|
renderText = !isLeafItem && childItems && childItems.length > 0 && this_1.treemap.enableDrillDown ?
|
|
2497
2524
|
!item['isDrilled'] ? treeMap.enableRtl ? renderText + ' [+]' : '[+] ' + renderText :
|
|
@@ -3783,21 +3810,31 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3783
3810
|
if (this.isHierarchicalData && child && child.length > 0) {
|
|
3784
3811
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3785
3812
|
child.forEach(function (currentData) {
|
|
3786
|
-
if (currentData[
|
|
3813
|
+
if (!isNullOrUndefined(currentData[_this.weightValuePath])) {
|
|
3787
3814
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3815
|
+
var labelValue = currentData[path];
|
|
3816
|
+
var isBlank = isNullOrUndefined(labelValue) || labelValue === '';
|
|
3817
|
+
var itemName = isBlank ? '' : labelValue;
|
|
3818
|
+
var orderName = isBlank ?
|
|
3819
|
+
'undefined_' + currentData[_this.weightValuePath] : labelValue.toString();
|
|
3788
3820
|
data_1[path].push({
|
|
3789
|
-
groupIndex: 0, name:
|
|
3790
|
-
levelOrderName:
|
|
3821
|
+
groupIndex: 0, name: itemName,
|
|
3822
|
+
levelOrderName: orderName,
|
|
3791
3823
|
data: currentData, weight: currentData[_this.weightValuePath]
|
|
3792
3824
|
});
|
|
3793
3825
|
}
|
|
3794
3826
|
});
|
|
3795
3827
|
}
|
|
3796
3828
|
else {
|
|
3797
|
-
if (this.dataSource[i][
|
|
3829
|
+
if (!isNullOrUndefined(this.dataSource[i][this.weightValuePath])) {
|
|
3798
3830
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3831
|
+
var labelValue = this.dataSource[i][path];
|
|
3832
|
+
var isBlank = isNullOrUndefined(labelValue) || labelValue === '';
|
|
3833
|
+
var itemName = isBlank ? '' : labelValue;
|
|
3834
|
+
var orderName = isBlank ?
|
|
3835
|
+
'undefined_' + this.dataSource[i][this.weightValuePath] : labelValue.toString();
|
|
3799
3836
|
data_1[path].push({
|
|
3800
|
-
groupIndex: 0, name:
|
|
3837
|
+
groupIndex: 0, name: itemName, levelOrderName: orderName, data: this.dataSource[i],
|
|
3801
3838
|
weight: this.dataSource[i][this.weightValuePath]
|
|
3802
3839
|
});
|
|
3803
3840
|
}
|