@syncfusion/ej2-treemap 26.2.10 → 27.1.50

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.
@@ -417,7 +417,7 @@ __decorate([
417
417
  Complex({ width: null, color: null }, Border)
418
418
  ], TooltipSettings.prototype, "border", void 0);
419
419
  __decorate([
420
- Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
420
+ Complex({ fontFamily: null, size: null, fontWeight: null, opacity: null }, Font)
421
421
  ], TooltipSettings.prototype, "textStyle", void 0);
422
422
  /**
423
423
  * Sets and gets the options for customizing the selection of the leaf items in treemap.
@@ -2707,48 +2707,46 @@ function getThemeStyle(theme) {
2707
2707
  break;
2708
2708
  case 'bootstrap5':
2709
2709
  style = {
2710
- backgroundColor: 'rgba(255,255,255, 0.0)',
2710
+ backgroundColor: 'transparent',
2711
2711
  titleFontColor: '#212529',
2712
- titleFontWeight: 'Normal',
2712
+ titleFontWeight: '400',
2713
2713
  subTitleFontColor: '#212529',
2714
- tooltipFillColor: '#212529',
2715
- tooltipFontColor: '#F9FAFB',
2716
- tooltipFontSize: '13px',
2717
- tooltipFillOpacity: 1,
2718
- tooltipTextOpacity: 1,
2714
+ tooltipFillColor: '#000000',
2715
+ tooltipFontColor: '#FFFFFF',
2716
+ tooltipFontSize: '12px',
2717
+ tooltipFillOpacity: 0.9,
2719
2718
  legendTitleColor: '#212529',
2720
2719
  legendTextColor: '#212529',
2721
- fontFamily: 'Helvetica Neue',
2720
+ fontFamily: 'Segoe UI',
2722
2721
  fontSize: '14px',
2723
- fontWeight: 'Normal',
2722
+ fontWeight: '400',
2724
2723
  subtitleFontSize: '12px',
2725
- legendFontSize: '12px',
2726
- labelFontFamily: 'Helvetica Neue',
2727
- labelFontSize: '12px',
2724
+ legendFontSize: '10px',
2725
+ labelFontFamily: 'Segoe UI',
2726
+ labelFontSize: '10px',
2728
2727
  legendBorderColor: '#000000',
2729
2728
  legendBorderWidth: 0
2730
2729
  };
2731
2730
  break;
2732
2731
  case 'bootstrap5dark':
2733
2732
  style = {
2734
- backgroundColor: 'rgba(255,255,255, 0.0)',
2735
- titleFontColor: '#FFFFFF',
2736
- titleFontWeight: 'Normal',
2737
- subTitleFontColor: '#FFFFFF',
2738
- tooltipFillColor: '#E9ECEF',
2733
+ backgroundColor: 'transparent',
2734
+ titleFontColor: '#DEE2E6',
2735
+ titleFontWeight: '400',
2736
+ subTitleFontColor: '#DEE2E6',
2737
+ tooltipFillColor: '#FFFFFF',
2739
2738
  tooltipFontColor: '#212529',
2740
- tooltipFontSize: '13px',
2741
- tooltipFillOpacity: 1,
2742
- tooltipTextOpacity: 1,
2743
- legendTitleColor: '#FFFFFF',
2744
- legendTextColor: '#FFFFFF',
2745
- fontFamily: 'Helvetica Neue',
2739
+ tooltipFontSize: '12px',
2740
+ tooltipFillOpacity: 0.9,
2741
+ legendTitleColor: '#DEE2E6',
2742
+ legendTextColor: '#DEE2E6',
2743
+ fontFamily: 'Segoe UI',
2746
2744
  fontSize: '14px',
2747
- fontWeight: 'Normal',
2745
+ fontWeight: '400',
2748
2746
  subtitleFontSize: '12px',
2749
- legendFontSize: '12px',
2750
- labelFontFamily: 'Helvetica Neue',
2751
- labelFontSize: '12px',
2747
+ legendFontSize: '10px',
2748
+ labelFontFamily: 'Segoe UI',
2749
+ labelFontSize: '10px',
2752
2750
  legendBorderColor: '#000000',
2753
2751
  legendBorderWidth: 0
2754
2752
  };
@@ -3014,7 +3012,8 @@ class Print {
3014
3012
  backgroundElement = backgroundElement.childNodes[0];
3015
3013
  if (!isNullOrUndefined(backgroundElement)) {
3016
3014
  const backgroundColor = backgroundElement.getAttribute('fill');
3017
- if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' || treeMap.theme === 'Fluent2')
3015
+ if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' ||
3016
+ treeMap.theme === 'Fluent2')
3018
3017
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
3019
3018
  backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
3020
3019
  }
@@ -3086,7 +3085,8 @@ class ImageExport {
3086
3085
  const backgroundElement = exportElement.childNodes[0];
3087
3086
  if (!isNullOrUndefined(backgroundElement)) {
3088
3087
  const backgroundColor = backgroundElement.getAttribute('fill');
3089
- if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' || treeMap.theme === 'Fluent2')
3088
+ if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' ||
3089
+ treeMap.theme === 'Fluent2')
3090
3090
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
3091
3091
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
3092
3092
  }
@@ -3187,7 +3187,8 @@ class PdfExport {
3187
3187
  const backgroundElement = exportElement.childNodes[0];
3188
3188
  if (!isNullOrUndefined(backgroundElement)) {
3189
3189
  const backgroundColor = backgroundElement.getAttribute('fill');
3190
- if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' || treeMap.theme === 'Fluent2')
3190
+ if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' ||
3191
+ treeMap.theme === 'Fluent2')
3191
3192
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
3192
3193
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
3193
3194
  }
@@ -4673,7 +4674,7 @@ class TreeMapLegend {
4673
4674
  (treemap.availableSize.height / 100) * parseFloat(legend.height) : parseFloat(legend.height) : null;
4674
4675
  titleTextStyle.fontFamily = titleTextStyle.fontFamily || treemap.themeStyle.fontFamily;
4675
4676
  titleTextStyle.fontWeight = titleTextStyle.fontWeight || treemap.themeStyle.titleFontWeight;
4676
- titleTextStyle.size = titleTextStyle.size || treemap.themeStyle.legendFontSize;
4677
+ titleTextStyle.size = titleTextStyle.size || treemap.themeStyle.subtitleFontSize;
4677
4678
  const legendTitleSize = measureText(legendTitle, titleTextStyle);
4678
4679
  let startX = 0;
4679
4680
  let startY = 0;
@@ -5069,7 +5070,9 @@ class TreeMapLegend {
5069
5070
  outfill = ((Object.prototype.toString.call(colorMap.color) === '[object Array]'))
5070
5071
  ? colorMap.color[0] : colorMap.color;
5071
5072
  labelLegend = !isNullOrUndefined(colorMap.label) ? colorMap.label : 'Others';
5072
- if (isNullOrUndefined(this.outOfRangeLegend)) {
5073
+ isDuplicate = this.treemap.legendSettings.removeDuplicateLegend ?
5074
+ this.removeDuplicates(this.legendCollections, labelLegend) : false;
5075
+ if (isNullOrUndefined(this.outOfRangeLegend) && !isDuplicate) {
5073
5076
  this.legendCollections.push({
5074
5077
  actualValue: labelLegend, legendData: [],
5075
5078
  legendName: labelLegend, legendFill: outfill
@@ -5079,7 +5082,7 @@ class TreeMapLegend {
5079
5082
  legendIndex++;
5080
5083
  }
5081
5084
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5082
- this.legendCollections[otherIndex - 1]['legendData'].push(data[i]);
5085
+ this.legendCollections[this.legendCollections.length - 1]['legendData'].push(data[i]);
5083
5086
  }
5084
5087
  }
5085
5088
  }
@@ -5305,7 +5308,7 @@ class TreeMapLegend {
5305
5308
  const textSize = measureText(title, textStyle);
5306
5309
  this.legendBorderRect = new Rect((this.legendItemRect.x - spacing), (this.legendItemRect.y - spacing - textSize.height), (this.legendItemRect.width) + (spacing * 2), (this.legendItemRect.height) + (spacing * 2) + textSize.height +
5307
5310
  (legend.mode === 'Interactive' ? 0 : (this.page !== 0) ? spacing : 0));
5308
- let borderStyle = {
5311
+ const borderStyle = {
5309
5312
  color: legend.border.color || this.treemap.themeStyle.legendBorderColor,
5310
5313
  width: legend.border.width || this.treemap.themeStyle.legendBorderWidth
5311
5314
  };
@@ -6222,11 +6225,10 @@ class TreeMapTooltip {
6222
6225
  this.tooltipSettings.textStyle.fontFamily = this.tooltipSettings.textStyle.fontFamily || this.treemap.themeStyle.fontFamily;
6223
6226
  this.tooltipSettings.textStyle.fontStyle = !isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle) ? this.tooltipSettings.textStyle.fontStyle : 'Normal';
6224
6227
  this.tooltipSettings.textStyle.fontWeight = this.tooltipSettings.textStyle.fontWeight || this.treemap.themeStyle.fontWeight;
6225
- this.tooltipSettings.textStyle.color = this.treemap.themeStyle.tooltipFontColor
6226
- || this.tooltipSettings.textStyle.color;
6227
- this.tooltipSettings.textStyle.opacity = this.treemap.themeStyle.tooltipTextOpacity
6228
- || this.tooltipSettings.textStyle.opacity;
6229
- let border = {
6228
+ this.tooltipSettings.textStyle.color = this.tooltipSettings.textStyle.color || this.treemap.themeStyle.tooltipFontColor;
6229
+ // eslint-disable-next-line max-len
6230
+ this.tooltipSettings.textStyle.opacity = this.tooltipSettings.textStyle.opacity || this.treemap.themeStyle.tooltipTextOpacity;
6231
+ const border = {
6230
6232
  width: this.tooltipSettings.border.width || this.treemap.themeStyle.tooltipBorderWidth || 0,
6231
6233
  color: this.tooltipSettings.border.color || this.treemap.themeStyle.tooltipBorderColor || 'transparent'
6232
6234
  };