@syncfusion/ej2-treemap 20.3.47 → 20.3.59
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/CHANGELOG.md +6 -0
- 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 +57 -47
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +58 -49
- 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 +12 -12
- package/src/treemap/layout/legend.js +7 -4
- package/src/treemap/treemap.js +48 -44
- package/src/treemap/user-interaction/tooltip.js +3 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.3.
|
|
3
|
+
* version : 20.3.59
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-treemap@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-treemap@
|
|
3
|
+
"_id": "@syncfusion/ej2-treemap@20.3.56",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-xH6m8oF4jRwdzcQCylKPoBWXCJr3ERSHzTyMBbM/ccxBmUQfwohLJOYTmT1Dj164OAS8+co1YZ5vIxQSDjkh7Q==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-treemap",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-treemap",
|
|
24
24
|
"/@syncfusion/ej2-vue-treemap"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treemap/-/ej2-treemap-20.3.56.tgz",
|
|
27
|
+
"_shasum": "24a095f720f1e3ee0514b7c74a8d8fbc3202211a",
|
|
28
28
|
"_spec": "@syncfusion/ej2-treemap@*",
|
|
29
|
-
"_where": "/jenkins/workspace/automation_release_19.1.0.1
|
|
29
|
+
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Syncfusion Inc."
|
|
32
32
|
},
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~20.3.
|
|
39
|
-
"@syncfusion/ej2-compression": "~20.3.
|
|
40
|
-
"@syncfusion/ej2-data": "~20.3.
|
|
41
|
-
"@syncfusion/ej2-file-utils": "~20.3.
|
|
42
|
-
"@syncfusion/ej2-pdf-export": "~20.3.
|
|
43
|
-
"@syncfusion/ej2-svg-base": "~20.3.
|
|
38
|
+
"@syncfusion/ej2-base": "~20.3.56",
|
|
39
|
+
"@syncfusion/ej2-compression": "~20.3.56",
|
|
40
|
+
"@syncfusion/ej2-data": "~20.3.56",
|
|
41
|
+
"@syncfusion/ej2-file-utils": "~20.3.56",
|
|
42
|
+
"@syncfusion/ej2-pdf-export": "~20.3.56",
|
|
43
|
+
"@syncfusion/ej2-svg-base": "~20.3.56"
|
|
44
44
|
},
|
|
45
45
|
"deprecated": false,
|
|
46
46
|
"description": "Essential JS 2 TreeMap Components",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
74
74
|
},
|
|
75
75
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "20.3.
|
|
76
|
+
"version": "20.3.59",
|
|
77
77
|
"sideEffects": false
|
|
78
78
|
}
|
|
@@ -65,6 +65,9 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
65
65
|
this.findPaletteLegendItems(LevelsData.levelsData[0], 'Parent');
|
|
66
66
|
}
|
|
67
67
|
if (this.legendCollections.length > 0) {
|
|
68
|
+
this.legendCollections.sort(function (firstItem, nextItem) { return (firstItem.levelIndex > nextItem.levelIndex) ? 1 : (firstItem.levelIndex < nextItem.levelIndex) ? -1 : 0; });
|
|
69
|
+
this.legendCollections.sort(function (firstItem, nextItem) { return (firstItem.groupIndex > nextItem.groupIndex) ? 1 : (firstItem.groupIndex < nextItem.groupIndex) ? -1 : 0; });
|
|
70
|
+
this.legendCollections.sort(function (firstItem, nextItem) { return (firstItem.leafIndex > nextItem.leafIndex) ? 1 : (firstItem.leafIndex < nextItem.leafIndex) ? -1 : 0; });
|
|
68
71
|
var defaultSize = 25;
|
|
69
72
|
var textPadding = 10;
|
|
70
73
|
var position = legend.position;
|
|
@@ -403,8 +406,8 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
403
406
|
groupIndex = data[i]['groupIndex'];
|
|
404
407
|
isLeafItem = (this.treemap.levels.length === 0 || groupIndex === this.treemap.levels.length);
|
|
405
408
|
colorMapping = isLeafItem ? leaf.colorMapping : levels[groupIndex].colorMapping;
|
|
406
|
-
for (var
|
|
407
|
-
var colorMap =
|
|
409
|
+
for (var j = 0; j < colorMapping.length; j++) {
|
|
410
|
+
var colorMap = colorMapping[j];
|
|
408
411
|
gradientElement = null;
|
|
409
412
|
rangeValue = Number(currentData[this.treemap.rangeColorValuePath]);
|
|
410
413
|
equalValue = currentData[this.treemap.equalColorValuePath];
|
|
@@ -465,8 +468,8 @@ var TreeMapLegend = /** @class */ (function () {
|
|
|
465
468
|
fill = ((Object.prototype.toString.call(colorMap.color) === '[object Array]')) && isNullOrUndefined(gradientElement)
|
|
466
469
|
&& isNullOrUndefined(colorMap.value) ? this.legendGradientColor(colorMap, legendIndex) : fill;
|
|
467
470
|
this.legendCollections.push({
|
|
468
|
-
actualValue: actualValue,
|
|
469
|
-
legendName: legendText, legendFill: fill, legendData: [],
|
|
471
|
+
actualValue: actualValue, levelIndex: !isLeafItem ? j : -1, leafIndex: isLeafItem ? j : -1,
|
|
472
|
+
legendName: legendText, legendFill: fill, legendData: [], groupIndex: !isLeafItem ? groupIndex : -1,
|
|
470
473
|
gradientElement: !isNullOrUndefined(gradientElement) ? gradientElement : isNullOrUndefined(colorMap.value)
|
|
471
474
|
? this.legendLinearGradient : null, name: data[i]['name'],
|
|
472
475
|
opacity: this.treemap.legendSettings.opacity, borderColor: this.treemap.legendSettings.border.color,
|
package/src/treemap/treemap.js
CHANGED
|
@@ -631,28 +631,30 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
631
631
|
*/
|
|
632
632
|
TreeMap.prototype.resizeOnTreeMap = function (e) {
|
|
633
633
|
var _this = this;
|
|
634
|
-
this.
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
this.
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
_this.
|
|
654
|
-
|
|
655
|
-
|
|
634
|
+
if (!this.isDestroyed) {
|
|
635
|
+
this.isResize = true;
|
|
636
|
+
var args_1 = {
|
|
637
|
+
name: resize,
|
|
638
|
+
cancel: false,
|
|
639
|
+
previousSize: this.availableSize,
|
|
640
|
+
currentSize: new Size(0, 0),
|
|
641
|
+
treemap: this
|
|
642
|
+
};
|
|
643
|
+
if (this.resizeTo) {
|
|
644
|
+
clearTimeout(this.resizeTo);
|
|
645
|
+
}
|
|
646
|
+
if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-treemap')) {
|
|
647
|
+
this.resizeTo = setTimeout(function () {
|
|
648
|
+
_this.unWireEVents();
|
|
649
|
+
_this.createSvg();
|
|
650
|
+
_this.refreshing = true;
|
|
651
|
+
_this.wireEVents();
|
|
652
|
+
args_1.currentSize = _this.availableSize;
|
|
653
|
+
_this.trigger(resize, args_1, function (observedArgs) {
|
|
654
|
+
_this.render();
|
|
655
|
+
});
|
|
656
|
+
}, 500);
|
|
657
|
+
}
|
|
656
658
|
}
|
|
657
659
|
};
|
|
658
660
|
/**
|
|
@@ -1086,29 +1088,31 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
1086
1088
|
* @private
|
|
1087
1089
|
*/
|
|
1088
1090
|
TreeMap.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
var
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1091
|
+
if (!this.isDestroyed) {
|
|
1092
|
+
var render = false;
|
|
1093
|
+
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
1094
|
+
var prop = _a[_i];
|
|
1095
|
+
switch (prop) {
|
|
1096
|
+
case 'background':
|
|
1097
|
+
this.renderBorder();
|
|
1098
|
+
break;
|
|
1099
|
+
case 'height':
|
|
1100
|
+
case 'width':
|
|
1101
|
+
case 'layoutType':
|
|
1102
|
+
case 'levels':
|
|
1103
|
+
case 'drillDownView':
|
|
1104
|
+
case 'renderDirection':
|
|
1105
|
+
case 'leafItemSettings':
|
|
1106
|
+
case 'legendSettings':
|
|
1107
|
+
case 'dataSource':
|
|
1108
|
+
render = true;
|
|
1109
|
+
break;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
if (render) {
|
|
1113
|
+
this.createSvg();
|
|
1114
|
+
this.renderElements();
|
|
1107
1115
|
}
|
|
1108
|
-
}
|
|
1109
|
-
if (render) {
|
|
1110
|
-
this.createSvg();
|
|
1111
|
-
this.renderElements();
|
|
1112
1116
|
}
|
|
1113
1117
|
};
|
|
1114
1118
|
/**
|
|
@@ -59,7 +59,9 @@ var TreeMapTooltip = /** @class */ (function () {
|
|
|
59
59
|
toolTipHeader = item['name'];
|
|
60
60
|
value = item['weight'];
|
|
61
61
|
toolTipData = item['data'];
|
|
62
|
-
|
|
62
|
+
if (!isNullOrUndefined(item['options'])) {
|
|
63
|
+
markerFill = item['options']['fill'];
|
|
64
|
+
}
|
|
63
65
|
if (this.treemap.enableRtl) {
|
|
64
66
|
tooltipContent = [textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) ||
|
|
65
67
|
formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];
|