@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
|
@@ -4081,6 +4081,9 @@ class TreeMapLegend {
|
|
|
4081
4081
|
this.findPaletteLegendItems(LevelsData.levelsData[0], 'Parent');
|
|
4082
4082
|
}
|
|
4083
4083
|
if (this.legendCollections.length > 0) {
|
|
4084
|
+
this.legendCollections.sort((firstItem, nextItem) => (firstItem.levelIndex > nextItem.levelIndex) ? 1 : (firstItem.levelIndex < nextItem.levelIndex) ? -1 : 0);
|
|
4085
|
+
this.legendCollections.sort((firstItem, nextItem) => (firstItem.groupIndex > nextItem.groupIndex) ? 1 : (firstItem.groupIndex < nextItem.groupIndex) ? -1 : 0);
|
|
4086
|
+
this.legendCollections.sort((firstItem, nextItem) => (firstItem.leafIndex > nextItem.leafIndex) ? 1 : (firstItem.leafIndex < nextItem.leafIndex) ? -1 : 0);
|
|
4084
4087
|
const defaultSize = 25;
|
|
4085
4088
|
const textPadding = 10;
|
|
4086
4089
|
const position = legend.position;
|
|
@@ -4416,7 +4419,8 @@ class TreeMapLegend {
|
|
|
4416
4419
|
groupIndex = data[i]['groupIndex'];
|
|
4417
4420
|
isLeafItem = (this.treemap.levels.length === 0 || groupIndex === this.treemap.levels.length);
|
|
4418
4421
|
colorMapping = isLeafItem ? leaf.colorMapping : levels[groupIndex].colorMapping;
|
|
4419
|
-
for (
|
|
4422
|
+
for (let j = 0; j < colorMapping.length; j++) {
|
|
4423
|
+
let colorMap$$1 = colorMapping[j];
|
|
4420
4424
|
gradientElement = null;
|
|
4421
4425
|
rangeValue = Number(currentData[this.treemap.rangeColorValuePath]);
|
|
4422
4426
|
equalValue = currentData[this.treemap.equalColorValuePath];
|
|
@@ -4477,8 +4481,8 @@ class TreeMapLegend {
|
|
|
4477
4481
|
fill = ((Object.prototype.toString.call(colorMap$$1.color) === '[object Array]')) && isNullOrUndefined(gradientElement)
|
|
4478
4482
|
&& isNullOrUndefined(colorMap$$1.value) ? this.legendGradientColor(colorMap$$1, legendIndex) : fill;
|
|
4479
4483
|
this.legendCollections.push({
|
|
4480
|
-
actualValue: actualValue,
|
|
4481
|
-
legendName: legendText, legendFill: fill, legendData: [],
|
|
4484
|
+
actualValue: actualValue, levelIndex: !isLeafItem ? j : -1, leafIndex: isLeafItem ? j : -1,
|
|
4485
|
+
legendName: legendText, legendFill: fill, legendData: [], groupIndex: !isLeafItem ? groupIndex : -1,
|
|
4482
4486
|
gradientElement: !isNullOrUndefined(gradientElement) ? gradientElement : isNullOrUndefined(colorMap$$1.value)
|
|
4483
4487
|
? this.legendLinearGradient : null, name: data[i]['name'],
|
|
4484
4488
|
opacity: this.treemap.legendSettings.opacity, borderColor: this.treemap.legendSettings.border.color,
|