@syncfusion/ej2-treemap 25.1.35 → 25.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 +29 -14
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +27 -12
- 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 +11 -11
- package/src/treemap/layout/legend.d.ts +11 -1
- package/src/treemap/layout/legend.js +14 -5
- package/src/treemap/layout/render-panel.js +3 -2
- package/src/treemap/model/interface.d.ts +3 -0
- package/src/treemap/model/print.js +1 -0
- package/src/treemap/treemap.d.ts +4 -0
- package/src/treemap/treemap.js +2 -1
- package/src/treemap/user-interaction/tooltip.d.ts +2 -0
- package/src/treemap/user-interaction/tooltip.js +6 -2
- package/src/treemap/utils/enum.d.ts +1 -0
- package/src/treemap/utils/helper.d.ts +1 -2
- package/src/treemap/utils/helper.js +1 -2
|
@@ -1642,11 +1642,10 @@ function colorNameToHex(color) {
|
|
|
1642
1642
|
* @param {Size} size - Specifies the size
|
|
1643
1643
|
* @param {string} url - Specifies the url
|
|
1644
1644
|
* @param {PathOption} options - Specifies the options
|
|
1645
|
-
* @param {string} label - Specifies the label
|
|
1646
1645
|
* @returns {Element} - Returns the element
|
|
1647
1646
|
* @private
|
|
1648
1647
|
*/
|
|
1649
|
-
function drawSymbol(location, shape, size, url, options
|
|
1648
|
+
function drawSymbol(location, shape, size, url, options) {
|
|
1650
1649
|
var svgRenderer = new SvgRenderer('');
|
|
1651
1650
|
var temp = renderLegendShape(location, size, shape, options, url);
|
|
1652
1651
|
var htmlElement = svgRenderer['draw' + temp.functionName](temp.renderOption);
|
|
@@ -2461,10 +2460,11 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2461
2460
|
}
|
|
2462
2461
|
}
|
|
2463
2462
|
itemGroup.setAttribute('aria-label', item['name']);
|
|
2464
|
-
if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable ||
|
|
2463
|
+
if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable ||
|
|
2464
|
+
_this.treemap.highlightSettings.enable)) {
|
|
2465
2465
|
itemGroup.setAttribute('role', 'button');
|
|
2466
2466
|
itemGroup.setAttribute('tabindex', _this.treemap.tabIndex.toString());
|
|
2467
|
-
itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex']
|
|
2467
|
+
itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex'] === (_this.treemap.levels.length - 1)) ? 'default' :
|
|
2468
2468
|
_this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && !_this.treemap.enableDrillDown ? 'default' : 'pointer';
|
|
2469
2469
|
}
|
|
2470
2470
|
else {
|
|
@@ -2999,6 +2999,7 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
2999
2999
|
}
|
|
3000
3000
|
else {
|
|
3001
3001
|
var exportElement = treeMap.element.cloneNode(true);
|
|
3002
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3002
3003
|
var backgroundElement = exportElement.getElementsByTagName('svg')[0];
|
|
3003
3004
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
3004
3005
|
backgroundElement = backgroundElement.childNodes[0];
|
|
@@ -3329,8 +3330,9 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3329
3330
|
fetchApiModule.onSuccess = function (args) {
|
|
3330
3331
|
if (!isNullOrUndefined(args.type) && args.type === 'application/octet-stream') {
|
|
3331
3332
|
var reader_1 = new FileReader();
|
|
3333
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
3332
3334
|
var treemap_1 = _this;
|
|
3333
|
-
reader_1.onload = function (
|
|
3335
|
+
reader_1.onload = function () {
|
|
3334
3336
|
args = JSON.parse(reader_1.result.toString());
|
|
3335
3337
|
treemap_1.dataSource = args;
|
|
3336
3338
|
treemap_1.renderTreeMapElements();
|
|
@@ -4613,9 +4615,10 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4613
4615
|
this.treemap = treemap;
|
|
4614
4616
|
this.addEventListener();
|
|
4615
4617
|
}
|
|
4616
|
-
// eslint-disable-next-line valid-jsdoc
|
|
4617
4618
|
/**
|
|
4618
4619
|
* method for legend
|
|
4620
|
+
*
|
|
4621
|
+
* @returns {void}
|
|
4619
4622
|
* @private
|
|
4620
4623
|
*/
|
|
4621
4624
|
TreeMapLegend.prototype.renderLegend = function () {
|
|
@@ -5141,6 +5144,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5141
5144
|
// eslint-disable-next-line valid-jsdoc
|
|
5142
5145
|
/**
|
|
5143
5146
|
* To draw the legend
|
|
5147
|
+
*
|
|
5144
5148
|
* @private
|
|
5145
5149
|
*/
|
|
5146
5150
|
TreeMapLegend.prototype.drawLegend = function () {
|
|
@@ -5253,7 +5257,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5253
5257
|
};
|
|
5254
5258
|
treemap.trigger(legendItemRendering, eventArgs, function (observedArgs) {
|
|
5255
5259
|
var renderOptions = new PathOption(shapeId, observedArgs.fill, strokeWidth_1, isLineShape_1 ? collection['Fill'] : strokeColor_1, legend.opacity, '');
|
|
5256
|
-
legendElement.appendChild(drawSymbol(shapeLocation, observedArgs.shape, shapeSize, observedArgs.imageUrl, renderOptions
|
|
5260
|
+
legendElement.appendChild(drawSymbol(shapeLocation, observedArgs.shape, shapeSize, observedArgs.imageUrl, renderOptions));
|
|
5257
5261
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
|
|
5258
5262
|
renderTextElement(textOptions, legend.textStyle, legend.textStyle.color || treemap.themeStyle.legendTextColor, legendElement);
|
|
5259
5263
|
_this.legendGroup.appendChild(legendElement);
|
|
@@ -5346,7 +5350,8 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5346
5350
|
var textSize = measureText(trimTitle, textStyle);
|
|
5347
5351
|
if (legendTitle) {
|
|
5348
5352
|
textOptions = new TextOption(this.treemap.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - (spacing / 2), 'middle', trimTitle, '');
|
|
5349
|
-
var textElement = renderTextElement(textOptions, textStyle, textStyle.color ||
|
|
5353
|
+
var textElement = renderTextElement(textOptions, textStyle, textStyle.color ||
|
|
5354
|
+
this.treemap.themeStyle.legendTitleColor, this.legendGroup);
|
|
5350
5355
|
textElement.setAttribute('role', 'region');
|
|
5351
5356
|
textElement.setAttribute('aria-label', legendTitle);
|
|
5352
5357
|
}
|
|
@@ -5498,8 +5503,11 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5498
5503
|
this.translate = new Location(x, y);
|
|
5499
5504
|
}
|
|
5500
5505
|
};
|
|
5501
|
-
|
|
5502
|
-
|
|
5506
|
+
/**
|
|
5507
|
+
* @param {PointerEvent} e - Specifies the event.
|
|
5508
|
+
* @returns {void}
|
|
5509
|
+
* @private
|
|
5510
|
+
*/
|
|
5503
5511
|
TreeMapLegend.prototype.mouseUpHandler = function (e) {
|
|
5504
5512
|
this.renderInteractivePointer(e);
|
|
5505
5513
|
clearTimeout(this.clearTimeout);
|
|
@@ -5508,6 +5516,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5508
5516
|
// eslint-disable-next-line valid-jsdoc
|
|
5509
5517
|
/**
|
|
5510
5518
|
* To remove the interactive pointer
|
|
5519
|
+
*
|
|
5511
5520
|
* @private
|
|
5512
5521
|
*/
|
|
5513
5522
|
TreeMapLegend.prototype.removeInteractivePointer = function () {
|
|
@@ -5546,6 +5555,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5546
5555
|
// eslint-disable-next-line valid-jsdoc
|
|
5547
5556
|
/**
|
|
5548
5557
|
* To add the event listener
|
|
5558
|
+
*
|
|
5549
5559
|
* @private
|
|
5550
5560
|
*/
|
|
5551
5561
|
TreeMapLegend.prototype.addEventListener = function () {
|
|
@@ -5558,6 +5568,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5558
5568
|
// eslint-disable-next-line valid-jsdoc
|
|
5559
5569
|
/**
|
|
5560
5570
|
* To remove the event listener
|
|
5571
|
+
*
|
|
5561
5572
|
* @private
|
|
5562
5573
|
*/
|
|
5563
5574
|
TreeMapLegend.prototype.removeEventListener = function () {
|
|
@@ -6211,11 +6222,13 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6211
6222
|
markerFill = item['options']['fill'];
|
|
6212
6223
|
}
|
|
6213
6224
|
if (this.treemap.enableRtl) {
|
|
6214
|
-
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
6225
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
6226
|
+
textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
6215
6227
|
|| formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];
|
|
6216
6228
|
}
|
|
6217
6229
|
else {
|
|
6218
|
-
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
6230
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
6231
|
+
textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
6219
6232
|
|| this.treemap.weightValuePath.toString() + ' : ' + formatValue(value, this.treemap)];
|
|
6220
6233
|
}
|
|
6221
6234
|
if (document.getElementById(this.tooltipId)) {
|
|
@@ -6319,6 +6332,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6319
6332
|
// eslint-disable-next-line valid-jsdoc
|
|
6320
6333
|
/**
|
|
6321
6334
|
* To bind events for tooltip module
|
|
6335
|
+
*
|
|
6322
6336
|
* @private
|
|
6323
6337
|
*/
|
|
6324
6338
|
TreeMapTooltip.prototype.addEventListener = function () {
|
|
@@ -6331,6 +6345,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6331
6345
|
// eslint-disable-next-line valid-jsdoc
|
|
6332
6346
|
/**
|
|
6333
6347
|
* To unbind events for tooltip module
|
|
6348
|
+
*
|
|
6334
6349
|
* @private
|
|
6335
6350
|
*/
|
|
6336
6351
|
TreeMapTooltip.prototype.removeEventListener = function () {
|