@syncfusion/ej2-treemap 20.1.55 → 20.2.38

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.
@@ -234,7 +234,7 @@ var SubTitleSettings = /** @__PURE__ @class */ (function (_super) {
234
234
  return _super !== null && _super.apply(this, arguments) || this;
235
235
  }
236
236
  __decorate$1([
237
- Complex({ size: '14px' }, Font)
237
+ Complex({ fontFamily: null }, Font)
238
238
  ], SubTitleSettings.prototype, "textStyle", void 0);
239
239
  __decorate$1([
240
240
  Property('Center')
@@ -250,7 +250,7 @@ var TitleSettings = /** @__PURE__ @class */ (function (_super) {
250
250
  return _super !== null && _super.apply(this, arguments) || this;
251
251
  }
252
252
  __decorate$1([
253
- Complex({ size: '15px' }, Font)
253
+ Complex({ fontFamily: null }, Font)
254
254
  ], TitleSettings.prototype, "textStyle", void 0);
255
255
  __decorate$1([
256
256
  Property('Center')
@@ -321,7 +321,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
321
321
  Property('')
322
322
  ], LegendSettings.prototype, "height", void 0);
323
323
  __decorate$1([
324
- Complex({ size: '13px' }, Font)
324
+ Complex({ fontFamily: null }, Font)
325
325
  ], LegendSettings.prototype, "textStyle", void 0);
326
326
  __decorate$1([
327
327
  Property(null)
@@ -1343,7 +1343,7 @@ function removeClassNames(elements, type, treemap) {
1343
1343
  for (var j = 0; j < elements.length; j++) {
1344
1344
  element = isNullOrUndefined(elements[j].childNodes[0]) ? elements[j] :
1345
1345
  elements[j].childNodes[0];
1346
- options = treemap.layout.renderItems[element.id.split('_')[6]]['options'];
1346
+ options = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])]['options'];
1347
1347
  applyOptions(element, options);
1348
1348
  elements[j].classList.remove(type);
1349
1349
  j -= 1;
@@ -2206,9 +2206,11 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
2206
2206
  }
2207
2207
  if (template) {
2208
2208
  templateEle = _this.renderTemplate(secondaryEle, groupId, rect, templatePosition, template, item, isLeafItem);
2209
- templateGroup.appendChild(templateEle);
2210
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2211
- _this.treemap.renderReactTemplates();
2209
+ if (!isNullOrUndefined(templateEle)) {
2210
+ templateGroup.appendChild(templateEle);
2211
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2212
+ _this.treemap.renderReactTemplates();
2213
+ }
2212
2214
  }
2213
2215
  itemGroup.setAttribute('aria-label', item['name']);
2214
2216
  itemGroup.setAttribute('tabindex', (_this.treemap.tabIndex + i + 2).toString());
@@ -2347,15 +2349,18 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
2347
2349
  template = template.replace(new RegExp('{{:' + keys[i] + '}}', 'g'), item['data'][keys[i].toString()]);
2348
2350
  }
2349
2351
  }
2350
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2351
- var templateFn = getTemplateFunction(template);
2352
- var templateElement = templateFn(item['data'], this.treemap, template, this.treemap.element.id + baseTemplateId, false);
2353
- var labelEle = convertElement(templateElement, templateId, item['data']);
2354
- var templateSize = measureElement(labelEle, secondaryEle);
2355
- var templateLocation = findLabelLocation(rect, position, templateSize, 'Template', this.treemap);
2356
- labelEle.style.left = templateLocation.x + 'px';
2357
- labelEle.style.top = templateLocation.y + 'px';
2358
- return labelEle;
2352
+ var labelElement;
2353
+ if (!isNullOrUndefined(document.getElementById(this.treemap.element.id + '_Secondary_Element'))) {
2354
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2355
+ var templateFn = getTemplateFunction(template);
2356
+ var templateElement = templateFn(item['data'], this.treemap, template, this.treemap.element.id + baseTemplateId, false);
2357
+ labelElement = convertElement(templateElement, templateId, item['data']);
2358
+ var templateSize = measureElement(labelElement, secondaryEle);
2359
+ var templateLocation = findLabelLocation(rect, position, templateSize, 'Template', this.treemap);
2360
+ labelElement.style.left = templateLocation.x + 'px';
2361
+ labelElement.style.top = templateLocation.y + 'px';
2362
+ }
2363
+ return labelElement;
2359
2364
  };
2360
2365
  LayoutPanel.prototype.labelInterSectAction = function (rect, text, textStyle, alignment) {
2361
2366
  var textValue;
@@ -2429,6 +2434,9 @@ function getThemeStyle(theme) {
2429
2434
  tooltipFontColor: '#ffffff',
2430
2435
  legendTitleColor: '#DADADA',
2431
2436
  legendTextColor: '#DADADA',
2437
+ fontSize: '15px',
2438
+ subtitleFontSize: '14px',
2439
+ legendFontSize: '13px',
2432
2440
  fontFamily: 'Roboto, Noto, Sans-serif'
2433
2441
  };
2434
2442
  break;
@@ -2441,6 +2449,9 @@ function getThemeStyle(theme) {
2441
2449
  tooltipFontColor: '#ffffff',
2442
2450
  legendTitleColor: '#FFFFFF',
2443
2451
  legendTextColor: '#FFFFFF',
2452
+ fontSize: '15px',
2453
+ subtitleFontSize: '14px',
2454
+ legendFontSize: '13px',
2444
2455
  fontFamily: 'Roboto, Noto, Sans-serif'
2445
2456
  };
2446
2457
  break;
@@ -2457,6 +2468,7 @@ function getThemeStyle(theme) {
2457
2468
  legendTextColor: '#212529',
2458
2469
  fontFamily: 'HelveticaNeue-Medium',
2459
2470
  fontSize: '16px',
2471
+ subtitleFontSize: '14px',
2460
2472
  legendFontSize: '14px',
2461
2473
  labelFontFamily: 'HelveticaNeue'
2462
2474
  };
@@ -2474,6 +2486,7 @@ function getThemeStyle(theme) {
2474
2486
  legendTextColor: '#374151',
2475
2487
  fontFamily: 'Inter',
2476
2488
  fontSize: '14px',
2489
+ subtitleFontSize: '12px',
2477
2490
  legendFontSize: '12px',
2478
2491
  labelFontFamily: 'Inter'
2479
2492
  };
@@ -2491,6 +2504,7 @@ function getThemeStyle(theme) {
2491
2504
  legendTextColor: '#D1D5DB',
2492
2505
  fontFamily: 'Inter',
2493
2506
  fontSize: '14px',
2507
+ subtitleFontSize: '12px',
2494
2508
  legendFontSize: '12px',
2495
2509
  labelFontFamily: 'Inter'
2496
2510
  };
@@ -2508,6 +2522,7 @@ function getThemeStyle(theme) {
2508
2522
  legendTextColor: '#212529',
2509
2523
  fontFamily: 'Helvetica Neue',
2510
2524
  fontSize: '14px',
2525
+ subtitleFontSize: '12px',
2511
2526
  legendFontSize: '12px',
2512
2527
  labelFontFamily: 'Helvetica Neue'
2513
2528
  };
@@ -2525,6 +2540,7 @@ function getThemeStyle(theme) {
2525
2540
  legendTextColor: '#FFFFFF',
2526
2541
  fontFamily: 'Helvetica Neue',
2527
2542
  fontSize: '14px',
2543
+ subtitleFontSize: '12px',
2528
2544
  legendFontSize: '12px',
2529
2545
  labelFontFamily: 'Helvetica Neue'
2530
2546
  };
@@ -2542,6 +2558,7 @@ function getThemeStyle(theme) {
2542
2558
  legendTextColor: '#201F1E',
2543
2559
  fontFamily: 'Segoe UI',
2544
2560
  fontSize: '14px',
2561
+ subtitleFontSize: '12px',
2545
2562
  legendFontSize: '12px',
2546
2563
  labelFontFamily: 'Segoe UI'
2547
2564
  };
@@ -2559,6 +2576,7 @@ function getThemeStyle(theme) {
2559
2576
  legendTextColor: '#F3F2F1',
2560
2577
  fontFamily: 'Segoe UI',
2561
2578
  fontSize: '14px',
2579
+ subtitleFontSize: '12px',
2562
2580
  legendFontSize: '12px',
2563
2581
  labelFontFamily: 'Segoe UI'
2564
2582
  };
@@ -2572,6 +2590,9 @@ function getThemeStyle(theme) {
2572
2590
  tooltipFontColor: '#ffffff',
2573
2591
  legendTitleColor: '#353535',
2574
2592
  legendTextColor: '#353535',
2593
+ fontSize: '15px',
2594
+ subtitleFontSize: '14px',
2595
+ legendFontSize: '13px',
2575
2596
  fontFamily: 'Roboto, Noto, Sans-serif'
2576
2597
  };
2577
2598
  break;
@@ -3019,7 +3040,8 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
3019
3040
  };
3020
3041
  TreeMap.prototype.elementChange = function () {
3021
3042
  if (this.treeMapLegendModule && this.legendSettings.visible && this.treeMapLegendModule.legendGroup && this.layout.layoutGroup
3022
- && !isNullOrUndefined(this.svgObject)) {
3043
+ && !isNullOrUndefined(this.svgObject) && !isNullOrUndefined(document.getElementById(this.layout.layoutGroup.id))
3044
+ && !isNullOrUndefined(document.getElementById(this.treeMapLegendModule.legendGroup.id))) {
3023
3045
  this.svgObject.insertBefore(this.layout.layoutGroup, this.treeMapLegendModule.legendGroup);
3024
3046
  }
3025
3047
  };
@@ -3041,12 +3063,15 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
3041
3063
  }
3042
3064
  };
3043
3065
  TreeMap.prototype.renderTitle = function (title, type, bounds, groupEle) {
3044
- var style = title.textStyle;
3066
+ var style = {
3067
+ color: title.textStyle.color, size: title.textStyle.size, fontFamily: title.textStyle.fontFamily,
3068
+ fontStyle: title.textStyle.fontStyle, fontWeight: title.textStyle.fontWeight, opacity: title.textStyle.opacity
3069
+ };
3045
3070
  var height;
3046
3071
  var titlePadding = 10;
3047
3072
  var width = (this.availableSize.width - this.margin.right - this.margin.left);
3048
- title.textStyle.fontFamily = this.themeStyle.fontFamily || title.textStyle.fontFamily;
3049
- title.textStyle.size = this.themeStyle.fontSize || title.textStyle.size;
3073
+ style.fontFamily = style.fontFamily || this.themeStyle.fontFamily;
3074
+ style.size = style.size || (type === 'title' ? this.themeStyle.fontSize : this.themeStyle.subtitleFontSize);
3050
3075
  if (title.text) {
3051
3076
  if (isNullOrUndefined(groupEle)) {
3052
3077
  groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
@@ -3477,7 +3502,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
3477
3502
  this.trigger(click, clickArgs);
3478
3503
  if (targetId.indexOf('_Item_Index') > -1) {
3479
3504
  e.preventDefault();
3480
- itemIndex = parseFloat(targetId.split('_')[6]);
3505
+ itemIndex = parseFloat(targetId.split('_Item_Index_')[1]);
3481
3506
  eventArgs = {
3482
3507
  cancel: false, name: itemClick, treemap: this, item: this.layout.renderItems[itemIndex], mouseEvent: e,
3483
3508
  groupIndex: this.layout.renderItems[itemIndex]['groupIndex'], groupName: this.layout.renderItems[itemIndex]['name'],
@@ -3550,7 +3575,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
3550
3575
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3551
3576
  var childItems;
3552
3577
  if (targetId.indexOf('_Item_Index') > -1) {
3553
- item = this.layout.renderItems[parseFloat(targetId.split('_')[6])];
3578
+ item = this.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
3554
3579
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3555
3580
  childItems = findChildren(item)['values'];
3556
3581
  this.element.style.cursor = (!item['isLeafItem'] && childItems && childItems.length > 0 && this.enableDrillDown) ?
@@ -3678,7 +3703,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
3678
3703
  if (e.cancelable) {
3679
3704
  e.preventDefault();
3680
3705
  }
3681
- index = parseFloat(targetId.split('_')[6]);
3706
+ index = parseFloat(targetId.split('_Item_Index_')[1]);
3682
3707
  item = this.layout.renderItems[index];
3683
3708
  var labelText = targetEle.innerHTML;
3684
3709
  if (this.enableBreadcrumb) {
@@ -4218,8 +4243,8 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
4218
4243
  var shapePadding = legend.shapePadding;
4219
4244
  var itemTextStyle = legend.textStyle;
4220
4245
  var legendLength = this.legendCollections.length;
4221
- legend.textStyle.size = treemap.themeStyle.legendFontSize || legend.textStyle.size;
4222
- legend.textStyle.fontFamily = treemap.themeStyle.fontFamily || legend.textStyle.fontFamily;
4246
+ itemTextStyle.size = itemTextStyle.size || treemap.themeStyle.legendFontSize;
4247
+ itemTextStyle.fontFamily = itemTextStyle.fontFamily || treemap.themeStyle.fontFamily;
4223
4248
  if (legendMode === 'Default') {
4224
4249
  legendWidth = (isNullOrUndefined(legendWidth)) ? treemap.areaRect.width : legendWidth;
4225
4250
  legendHeight = (isNullOrUndefined(legendHeight)) ? treemap.areaRect.height : legendHeight;
@@ -4230,7 +4255,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
4230
4255
  if (isNullOrUndefined(this.totalPages[this.page])) {
4231
4256
  this.totalPages[this.page] = { Page: (this.page + 1), Collection: [] };
4232
4257
  }
4233
- var legendTextSize = measureText(legendItem['legendName'], legend.textStyle);
4258
+ var legendTextSize = measureText(legendItem['legendName'], itemTextStyle);
4234
4259
  this.textMaxWidth = Math.max(this.textMaxWidth, legendTextSize.width);
4235
4260
  if (i === 0) {
4236
4261
  startX_1 = shapeX = (leftPadding + (shapeWidth / 2));
@@ -4327,7 +4352,6 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
4327
4352
  };
4328
4353
  }
4329
4354
  else {
4330
- var itemTextStyle_1 = legend.textStyle;
4331
4355
  var legendLength_1 = this.legendCollections.length;
4332
4356
  var rectWidth_1 = (orientation_1 === 'Horizontal') ? (isNullOrUndefined(legendWidth)) ? (treemap.areaRect.width / legendLength_1) :
4333
4357
  (legendWidth / legendLength_1) : (isNullOrUndefined(legendWidth)) ? defaultSize : legendWidth;
@@ -4348,11 +4372,11 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
4348
4372
  var legendText = this.legendCollections[i]['legendName'];
4349
4373
  var itemTextSize = new Size(0, 0);
4350
4374
  if (labelAction === 'None') {
4351
- itemTextSize = measureText(legendText, itemTextStyle_1);
4375
+ itemTextSize = measureText(legendText, itemTextStyle);
4352
4376
  }
4353
4377
  else if (labelAction === 'Trim') {
4354
- legendText = textTrim((orientation_1 === 'Horizontal' ? rectWidth_1 : rectHeight_1), legendText, itemTextStyle_1);
4355
- itemTextSize = measureText(legendText, itemTextStyle_1);
4378
+ legendText = textTrim((orientation_1 === 'Horizontal' ? rectWidth_1 : rectHeight_1), legendText, itemTextStyle);
4379
+ itemTextSize = measureText(legendText, itemTextStyle);
4356
4380
  }
4357
4381
  else {
4358
4382
  legendText = '';
@@ -4890,7 +4914,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
4890
4914
  var stroke = void 0;
4891
4915
  var strokeWidth = void 0;
4892
4916
  var legendElement = void 0;
4893
- targetItem = treemap.layout.renderItems[parseFloat(target.id.split('_')[6])];
4917
+ targetItem = treemap.layout.renderItems[parseFloat(target.id.split('_Item_Index_')[1])];
4894
4918
  var svgRect = treemap.svgObject.getBoundingClientRect();
4895
4919
  for (var i = 0; i < this.legendCollections.length; i++) {
4896
4920
  currentData = this.legendCollections[i];
@@ -5164,14 +5188,14 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
5164
5188
  if (this.highLightId !== targetId) {
5165
5189
  treeMapElement = document.getElementById(treemap.element.id + '_TreeMap_' + treemap.layoutType + '_Layout');
5166
5190
  var selectionElements = document.getElementsByClassName('treeMapSelection');
5167
- item = this.treemap.layout.renderItems[parseFloat(targetId.split('_')[6])];
5191
+ item = this.treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
5168
5192
  var index = void 0;
5169
5193
  if (this.treemap.legendSettings.visible) {
5170
5194
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5171
5195
  var collection = this.treemap.treeMapLegendModule.legendCollections;
5172
5196
  var length_1 = this.treemap.treeMapLegendModule.legendCollections.length;
5173
5197
  index = getLegendIndex(length_1, item, treemap);
5174
- this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('container_Legend_Shape_Index_' + index) : document.getElementById('container_Legend_Index_' + index);
5198
+ this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById(this.treemap.element.id + '_Legend_Shape_Index_' + index) : document.getElementById(this.treemap.element.id + '_Legend_Index_' + index);
5175
5199
  if (this.shapeElement !== null && (selectionModule ? this.shapeElement.getAttribute('id') !== selectionModule.legendSelectId : true)) {
5176
5200
  if (selectionModule ? this.shapeElement !== selectionModule.shapeElement : true) {
5177
5201
  this.currentElement.push({ currentElement: this.shapeElement });
@@ -5199,7 +5223,7 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
5199
5223
  for (var i = 0; i < treeMapElement.childElementCount; i++) {
5200
5224
  element = treeMapElement.childNodes[i];
5201
5225
  process = true;
5202
- item = treemap.layout.renderItems[element.id.split('_')[6]];
5226
+ item = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
5203
5227
  for (var j = 0; j < selectionElements.length; j++) {
5204
5228
  if (element.id === selectionElements[j].id) {
5205
5229
  process = false;
@@ -5237,7 +5261,7 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
5237
5261
  removeLegend(this.legendHighlightCollection, 'highlight');
5238
5262
  }
5239
5263
  this.shapeTarget = 'highlight';
5240
- var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_')[4]) : parseFloat(targetId.split('_')[3]);
5264
+ var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_Legend_Shape_Index_')[1]) : parseFloat(targetId.split('_Legend_Index_')[1]);
5241
5265
  var dataLength = this.treemap.treeMapLegendModule.legendCollections[index]['legendData'].length;
5242
5266
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5243
5267
  var collection = this.treemap.treeMapLegendModule.legendCollections;
@@ -5247,7 +5271,7 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
5247
5271
  if (this.treemap.treeMapLegendModule.legendCollections[index]['legendData'][i]['levelOrderName'] === this.treemap.layout.renderItems[j]['levelOrderName']) {
5248
5272
  itemIndex = j;
5249
5273
  groupIndex = this.treemap.layout.renderItems[j]['groupIndex'];
5250
- var nodeEle = document.getElementById('container_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
5274
+ var nodeEle = document.getElementById(this.treemap.element.id + '_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
5251
5275
  if (i === 0) {
5252
5276
  this.legendHighlightCollection = [];
5253
5277
  pushCollection(this.legendHighlightCollection, legendIndex, j, targetEle, nodeEle, this.treemap.layout.renderItems, collection);
@@ -5369,7 +5393,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
5369
5393
  e.preventDefault();
5370
5394
  if (this.treemap.selectionId !== targetId && this.legendSelect) {
5371
5395
  treeMapElement = document.getElementById(layoutID);
5372
- item = treemap.layout.renderItems[parseFloat(targetId.split('_')[6])];
5396
+ item = treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
5373
5397
  var index = void 0;
5374
5398
  if (this.treemap.legendSettings.visible) {
5375
5399
  this.shapeSelect = false;
@@ -5383,7 +5407,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
5383
5407
  highlightModule.shapeHighlightCollection = [];
5384
5408
  }
5385
5409
  index = getLegendIndex(length_3, item, treemap);
5386
- this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('container_Legend_Shape_Index_' + index) : document.getElementById('container_Legend_Index_' + index);
5410
+ this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById(this.treemap.element.id + '_Legend_Shape_Index_' + index) : document.getElementById(this.treemap.element.id + '_Legend_Index_' + index);
5387
5411
  if (this.shapeElement !== null) {
5388
5412
  this.shapeSelectId = this.shapeElement.getAttribute('id');
5389
5413
  this.shapeSelectionCollection.push({ legendEle: this.shapeElement, oldFill: collection[index]['legendFill'],
@@ -5396,7 +5420,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
5396
5420
  orders = findHightLightItems(item, [], selection.mode, treemap);
5397
5421
  for (var i = 0; i < treeMapElement.childElementCount; i++) {
5398
5422
  element = treeMapElement.childNodes[i];
5399
- item = treemap.layout.renderItems[element.id.split('_')[6]];
5423
+ item = treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
5400
5424
  if (orders.indexOf(item['levelOrderName']) > -1) {
5401
5425
  selectionElements.push(element);
5402
5426
  treemap.levelSelection.push(element.id);
@@ -5456,14 +5480,14 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
5456
5480
  if (highlightModule) {
5457
5481
  highlightModule.shapeTarget = 'selection';
5458
5482
  }
5459
- var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_')[4]) : parseFloat(targetId.split('_')[3]);
5483
+ var index = this.treemap.legendSettings.mode === 'Default' ? parseFloat(targetId.split('_Legend_Shape_Index_')[1]) : parseFloat(targetId.split('_Legend_Index_')[1]);
5460
5484
  var dataLength = this.treemap.treeMapLegendModule.legendCollections[index]['legendData'].length;
5461
5485
  for (var k = 0; k < dataLength; k++) {
5462
5486
  for (var l = 0; l < this.treemap.layout.renderItems.length; l++) {
5463
5487
  if (this.treemap.treeMapLegendModule.legendCollections[index]['legendData'][k]['levelOrderName'] === this.treemap.layout.renderItems[l]['levelOrderName']) {
5464
5488
  itemIndex = l;
5465
5489
  groupIndex = this.treemap.layout.renderItems[l]['groupIndex'];
5466
- var nodeEle = document.getElementById('container_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
5490
+ var nodeEle = document.getElementById(this.treemap.element.id + '_Level_Index_' + groupIndex + '_Item_Index_' + itemIndex + '_RectPath');
5467
5491
  if (k === 0) {
5468
5492
  pushCollection(this.legendSelectionCollection, legendIndex, l, targetEle_1, nodeEle, this.treemap.layout.renderItems, collection);
5469
5493
  length_4 = this.legendSelectionCollection.length;
@@ -5515,7 +5539,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
5515
5539
  var orders = findHightLightItems(item, [], selection.mode, this.treemap);
5516
5540
  for (var i = 0; i < treeMapElement.childElementCount; i++) {
5517
5541
  element = treeMapElement.childNodes[i];
5518
- item = this.treemap.layout.renderItems[element.id.split('_')[6]];
5542
+ item = this.treemap.layout.renderItems[parseFloat(element.id.split('_Item_Index_')[1])];
5519
5543
  if (orders.indexOf(item['levelOrderName']) > -1) {
5520
5544
  selectionElements.push(element);
5521
5545
  this.treemap.levelSelection.push(element.id);
@@ -5531,7 +5555,7 @@ var TreeMapSelection = /** @__PURE__ @class */ (function () {
5531
5555
  this.shapeElement = undefined;
5532
5556
  removeShape(this.shapeSelectionCollection, 'selection');
5533
5557
  index = getLegendIndex(length_5, items[m], this.treemap);
5534
- this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById('container_Legend_Shape_Index_' + index) : document.getElementById('container_Legend_Index_' + index);
5558
+ this.shapeElement = this.treemap.legendSettings.mode === 'Default' ? document.getElementById(this.treemap.element.id + '_Legend_Shape_Index_' + index) : document.getElementById(this.treemap.element.id + '_Legend_Index_' + index);
5535
5559
  if (this.shapeElement !== null) {
5536
5560
  this.shapeSelectId = this.shapeElement.getAttribute('id');
5537
5561
  this.treemap.legendId.push(this.shapeSelectId);
@@ -5674,7 +5698,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
5674
5698
  var tooltipContent = [];
5675
5699
  var markerFill;
5676
5700
  if (targetId.indexOf('_Item_Index') > -1) {
5677
- item = this.treemap.layout.renderItems[parseFloat(targetId.split('_')[6])];
5701
+ item = this.treemap.layout.renderItems[parseFloat(targetId.split('_Item_Index_')[1])];
5678
5702
  if (!isNullOrUndefined(item)) {
5679
5703
  toolTipHeader = item['name'];
5680
5704
  value = item['weight'];