@syncfusion/ej2-treemap 20.3.56 → 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 +7 -3
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +7 -4
- 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 +5 -5
- package/src/treemap/layout/legend.js +7 -4
|
@@ -4221,6 +4221,9 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4221
4221
|
this.findPaletteLegendItems(LevelsData.levelsData[0], 'Parent');
|
|
4222
4222
|
}
|
|
4223
4223
|
if (this.legendCollections.length > 0) {
|
|
4224
|
+
this.legendCollections.sort(function (firstItem, nextItem) { return (firstItem.levelIndex > nextItem.levelIndex) ? 1 : (firstItem.levelIndex < nextItem.levelIndex) ? -1 : 0; });
|
|
4225
|
+
this.legendCollections.sort(function (firstItem, nextItem) { return (firstItem.groupIndex > nextItem.groupIndex) ? 1 : (firstItem.groupIndex < nextItem.groupIndex) ? -1 : 0; });
|
|
4226
|
+
this.legendCollections.sort(function (firstItem, nextItem) { return (firstItem.leafIndex > nextItem.leafIndex) ? 1 : (firstItem.leafIndex < nextItem.leafIndex) ? -1 : 0; });
|
|
4224
4227
|
var defaultSize = 25;
|
|
4225
4228
|
var textPadding = 10;
|
|
4226
4229
|
var position = legend.position;
|
|
@@ -4556,8 +4559,8 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4556
4559
|
groupIndex = data[i]['groupIndex'];
|
|
4557
4560
|
isLeafItem = (this.treemap.levels.length === 0 || groupIndex === this.treemap.levels.length);
|
|
4558
4561
|
colorMapping = isLeafItem ? leaf.colorMapping : levels[groupIndex].colorMapping;
|
|
4559
|
-
for (var
|
|
4560
|
-
var colorMap$$1 =
|
|
4562
|
+
for (var j = 0; j < colorMapping.length; j++) {
|
|
4563
|
+
var colorMap$$1 = colorMapping[j];
|
|
4561
4564
|
gradientElement = null;
|
|
4562
4565
|
rangeValue = Number(currentData[this.treemap.rangeColorValuePath]);
|
|
4563
4566
|
equalValue = currentData[this.treemap.equalColorValuePath];
|
|
@@ -4618,8 +4621,8 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4618
4621
|
fill = ((Object.prototype.toString.call(colorMap$$1.color) === '[object Array]')) && isNullOrUndefined(gradientElement)
|
|
4619
4622
|
&& isNullOrUndefined(colorMap$$1.value) ? this.legendGradientColor(colorMap$$1, legendIndex) : fill;
|
|
4620
4623
|
this.legendCollections.push({
|
|
4621
|
-
actualValue: actualValue,
|
|
4622
|
-
legendName: legendText, legendFill: fill, legendData: [],
|
|
4624
|
+
actualValue: actualValue, levelIndex: !isLeafItem ? j : -1, leafIndex: isLeafItem ? j : -1,
|
|
4625
|
+
legendName: legendText, legendFill: fill, legendData: [], groupIndex: !isLeafItem ? groupIndex : -1,
|
|
4623
4626
|
gradientElement: !isNullOrUndefined(gradientElement) ? gradientElement : isNullOrUndefined(colorMap$$1.value)
|
|
4624
4627
|
? this.legendLinearGradient : null, name: data[i]['name'],
|
|
4625
4628
|
opacity: this.treemap.legendSettings.opacity, borderColor: this.treemap.legendSettings.border.color,
|