@syncfusion/ej2-treemap 21.2.3 → 22.1.34

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.
@@ -1,4 +1,4 @@
1
- import { Ajax, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, NotifyPropertyChanges, Property, SanitizeHtmlHelper, compile, createElement, extend, isNullOrUndefined, merge, print, remove } from '@syncfusion/ej2-base';
1
+ import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Fetch, Internationalization, NotifyPropertyChanges, Property, SanitizeHtmlHelper, compile, createElement, extend, isNullOrUndefined, merge, print, remove } from '@syncfusion/ej2-base';
2
2
  import { SvgRenderer, Tooltip } from '@syncfusion/ej2-svg-base';
3
3
  import { DataManager, Query } from '@syncfusion/ej2-data';
4
4
  import { PdfBitmap, PdfDocument, PdfPageOrientation } from '@syncfusion/ej2-pdf-export';
@@ -173,7 +173,7 @@ __decorate$1([
173
173
  Property(defaultFont)
174
174
  ], Font.prototype, "fontFamily", void 0);
175
175
  __decorate$1([
176
- Property('Normal')
176
+ Property('')
177
177
  ], Font.prototype, "fontWeight", void 0);
178
178
  __decorate$1([
179
179
  Property('Normal')
@@ -198,7 +198,7 @@ __decorate$1([
198
198
  class SubTitleSettings extends CommonTitleSettings {
199
199
  }
200
200
  __decorate$1([
201
- Complex({ fontFamily: null }, Font)
201
+ Complex({ fontFamily: null, fontWeight: null }, Font)
202
202
  ], SubTitleSettings.prototype, "textStyle", void 0);
203
203
  __decorate$1([
204
204
  Property('Center')
@@ -209,7 +209,7 @@ __decorate$1([
209
209
  class TitleSettings extends CommonTitleSettings {
210
210
  }
211
211
  __decorate$1([
212
- Complex({ fontFamily: null }, Font)
212
+ Complex({ fontFamily: null, fontWeight: null }, Font)
213
213
  ], TitleSettings.prototype, "textStyle", void 0);
214
214
  __decorate$1([
215
215
  Property('Center')
@@ -270,7 +270,7 @@ __decorate$1([
270
270
  Property('')
271
271
  ], LegendSettings.prototype, "height", void 0);
272
272
  __decorate$1([
273
- Complex({ fontFamily: null }, Font)
273
+ Complex({ size: '12px', fontFamily: null, fontWeight: null }, Font)
274
274
  ], LegendSettings.prototype, "textStyle", void 0);
275
275
  __decorate$1([
276
276
  Property(null)
@@ -420,7 +420,7 @@ __decorate$1([
420
420
  Complex({}, Border)
421
421
  ], TooltipSettings.prototype, "border", void 0);
422
422
  __decorate$1([
423
- Complex({ fontFamily: defaultFont, size: '13px' }, Font)
423
+ Complex({ fontFamily: defaultFont, size: null, fontWeight: null }, Font)
424
424
  ], TooltipSettings.prototype, "textStyle", void 0);
425
425
  /**
426
426
  * Sets and gets the options for customizing the selection of the leaf items in treemap.
@@ -915,9 +915,12 @@ function findHightLightItems(data, items, mode, treeMap) {
915
915
  function getTemplateFunction(template) {
916
916
  let templateFn = null;
917
917
  try {
918
- if (document.querySelectorAll(template).length) {
918
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
919
919
  templateFn = compile(document.querySelector(template).innerHTML.trim());
920
920
  }
921
+ else {
922
+ templateFn = compile(template);
923
+ }
921
924
  }
922
925
  catch (e) {
923
926
  templateFn = compile(template);
@@ -2330,6 +2333,7 @@ class LayoutPanel {
2330
2333
  treeMap.enableRtl ? renderText + ' [-]' : '[-] ' + renderText : renderText;
2331
2334
  textStyle = (isLeafItem ? leaf.labelStyle : levels[index].headerStyle);
2332
2335
  textStyle.fontFamily = this.treemap.themeStyle.labelFontFamily || textStyle.fontFamily;
2336
+ textStyle.fontWeight = textStyle.fontWeight || this.treemap.themeStyle.fontWeight;
2333
2337
  border = isLeafItem ? leaf.border : levels[index].border;
2334
2338
  position = !isLeafItem ? (levels[index].headerAlignment) === 'Near' ? 'TopLeft' : (levels[index].headerAlignment) === 'Center' ?
2335
2339
  'TopCenter' : 'TopRight' : leaf.labelPosition;
@@ -2485,7 +2489,7 @@ class LayoutPanel {
2485
2489
  secondaryEle, groupId, rect, position, template, item, isLeafItem) {
2486
2490
  const templateId = isLeafItem ? groupId + '_LabelTemplate' : groupId + '_HeaderTemplate';
2487
2491
  const baseTemplateId = isLeafItem ? '_LabelTemplate' : '_HeaderTemplate';
2488
- if (isNullOrUndefined(template['prototype'])) {
2492
+ if (isNullOrUndefined(template['prototype']) && typeof template === 'string') {
2489
2493
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2490
2494
  const keys = Object.keys(item['data']);
2491
2495
  for (let i = 0; i < keys.length; i++) {
@@ -2585,12 +2589,15 @@ function getThemeStyle(theme) {
2585
2589
  style = {
2586
2590
  backgroundColor: color,
2587
2591
  titleFontColor: '#FFFFFF',
2592
+ titleFontWeight: 'Normal',
2588
2593
  subTitleFontColor: '#FFFFFF',
2589
2594
  tooltipFillColor: '#363F4C',
2590
2595
  tooltipFontColor: '#ffffff',
2596
+ tooltipFontSize: '13px',
2591
2597
  legendTitleColor: '#DADADA',
2592
2598
  legendTextColor: '#DADADA',
2593
2599
  fontSize: '15px',
2600
+ fontWeight: 'Normal',
2594
2601
  subtitleFontSize: '14px',
2595
2602
  legendFontSize: '13px',
2596
2603
  fontFamily: 'Roboto, Noto, Sans-serif'
@@ -2600,12 +2607,15 @@ function getThemeStyle(theme) {
2600
2607
  style = {
2601
2608
  backgroundColor: '#000000',
2602
2609
  titleFontColor: '#FFFFFF',
2610
+ titleFontWeight: 'Normal',
2603
2611
  subTitleFontColor: '#FFFFFF',
2604
2612
  tooltipFillColor: '#363F4C',
2605
2613
  tooltipFontColor: '#ffffff',
2614
+ tooltipFontSize: '13px',
2606
2615
  legendTitleColor: '#FFFFFF',
2607
2616
  legendTextColor: '#FFFFFF',
2608
2617
  fontSize: '15px',
2618
+ fontWeight: 'Normal',
2609
2619
  subtitleFontSize: '14px',
2610
2620
  legendFontSize: '13px',
2611
2621
  fontFamily: 'Roboto, Noto, Sans-serif'
@@ -2615,15 +2625,18 @@ function getThemeStyle(theme) {
2615
2625
  style = {
2616
2626
  backgroundColor: '#FFFFFF',
2617
2627
  titleFontColor: '#212529',
2628
+ titleFontWeight: 'Normal',
2618
2629
  subTitleFontColor: '#212529',
2619
2630
  tooltipFillColor: '#000000',
2620
2631
  tooltipFontColor: '#FFFFFF',
2632
+ tooltipFontSize: '13px',
2621
2633
  tooltipFillOpacity: 1,
2622
2634
  tooltipTextOpacity: 0.9,
2623
2635
  legendTitleColor: '#212529',
2624
2636
  legendTextColor: '#212529',
2625
2637
  fontFamily: 'HelveticaNeue-Medium',
2626
2638
  fontSize: '16px',
2639
+ fontWeight: 'Normal',
2627
2640
  subtitleFontSize: '14px',
2628
2641
  legendFontSize: '14px',
2629
2642
  labelFontFamily: 'HelveticaNeue'
@@ -2633,15 +2646,18 @@ function getThemeStyle(theme) {
2633
2646
  style = {
2634
2647
  backgroundColor: 'transparent',
2635
2648
  titleFontColor: '#374151',
2649
+ titleFontWeight: 'Normal',
2636
2650
  subTitleFontColor: '#374151',
2637
2651
  tooltipFillColor: '#111827',
2638
2652
  tooltipFontColor: '#F9FAFB',
2653
+ tooltipFontSize: '13px',
2639
2654
  tooltipFillOpacity: 1,
2640
2655
  tooltipTextOpacity: 1,
2641
2656
  legendTitleColor: '#374151',
2642
2657
  legendTextColor: '#374151',
2643
2658
  fontFamily: 'Inter',
2644
2659
  fontSize: '14px',
2660
+ fontWeight: 'Normal',
2645
2661
  subtitleFontSize: '12px',
2646
2662
  legendFontSize: '12px',
2647
2663
  labelFontFamily: 'Inter'
@@ -2651,14 +2667,17 @@ function getThemeStyle(theme) {
2651
2667
  style = {
2652
2668
  backgroundColor: 'transparent',
2653
2669
  titleFontColor: '#D1D5DB',
2670
+ titleFontWeight: 'Normal',
2654
2671
  subTitleFontColor: '#D1D5DB',
2655
2672
  tooltipFillColor: '#F9FAFB',
2656
2673
  tooltipFontColor: '#1F2937',
2674
+ tooltipFontSize: '13px',
2657
2675
  tooltipFillOpacity: 1,
2658
2676
  tooltipTextOpacity: 1,
2659
2677
  legendTitleColor: '#D1D5DB',
2660
2678
  legendTextColor: '#D1D5DB',
2661
2679
  fontFamily: 'Inter',
2680
+ fontWeight: 'Normal',
2662
2681
  fontSize: '14px',
2663
2682
  subtitleFontSize: '12px',
2664
2683
  legendFontSize: '12px',
@@ -2669,15 +2688,18 @@ function getThemeStyle(theme) {
2669
2688
  style = {
2670
2689
  backgroundColor: 'rgba(255,255,255, 0.0)',
2671
2690
  titleFontColor: '#212529',
2691
+ titleFontWeight: 'Normal',
2672
2692
  subTitleFontColor: '#212529',
2673
2693
  tooltipFillColor: '#212529',
2674
2694
  tooltipFontColor: '#F9FAFB',
2695
+ tooltipFontSize: '13px',
2675
2696
  tooltipFillOpacity: 1,
2676
2697
  tooltipTextOpacity: 1,
2677
2698
  legendTitleColor: '#212529',
2678
2699
  legendTextColor: '#212529',
2679
2700
  fontFamily: 'Helvetica Neue',
2680
2701
  fontSize: '14px',
2702
+ fontWeight: 'Normal',
2681
2703
  subtitleFontSize: '12px',
2682
2704
  legendFontSize: '12px',
2683
2705
  labelFontFamily: 'Helvetica Neue'
@@ -2687,15 +2709,18 @@ function getThemeStyle(theme) {
2687
2709
  style = {
2688
2710
  backgroundColor: 'rgba(255,255,255, 0.0)',
2689
2711
  titleFontColor: '#FFFFFF',
2712
+ titleFontWeight: 'Normal',
2690
2713
  subTitleFontColor: '#FFFFFF',
2691
2714
  tooltipFillColor: '#E9ECEF',
2692
2715
  tooltipFontColor: '#212529',
2716
+ tooltipFontSize: '13px',
2693
2717
  tooltipFillOpacity: 1,
2694
2718
  tooltipTextOpacity: 1,
2695
2719
  legendTitleColor: '#FFFFFF',
2696
2720
  legendTextColor: '#FFFFFF',
2697
2721
  fontFamily: 'Helvetica Neue',
2698
2722
  fontSize: '14px',
2723
+ fontWeight: 'Normal',
2699
2724
  subtitleFontSize: '12px',
2700
2725
  legendFontSize: '12px',
2701
2726
  labelFontFamily: 'Helvetica Neue'
@@ -2705,15 +2730,18 @@ function getThemeStyle(theme) {
2705
2730
  style = {
2706
2731
  backgroundColor: 'rgba(255,255,255, 0.0)',
2707
2732
  titleFontColor: '#201F1E',
2733
+ titleFontWeight: 'Normal',
2708
2734
  subTitleFontColor: '#201F1E',
2709
2735
  tooltipFillColor: '#FFFFFF',
2710
2736
  tooltipFontColor: '#323130',
2737
+ tooltipFontSize: '13px',
2711
2738
  tooltipFillOpacity: 1,
2712
2739
  tooltipTextOpacity: 1,
2713
2740
  legendTitleColor: '#201F1E',
2714
2741
  legendTextColor: '#201F1E',
2715
2742
  fontFamily: 'Segoe UI',
2716
2743
  fontSize: '14px',
2744
+ fontWeight: 'Normal',
2717
2745
  subtitleFontSize: '12px',
2718
2746
  legendFontSize: '12px',
2719
2747
  labelFontFamily: 'Segoe UI'
@@ -2723,30 +2751,78 @@ function getThemeStyle(theme) {
2723
2751
  style = {
2724
2752
  backgroundColor: 'rgba(255,255,255, 0.0)',
2725
2753
  titleFontColor: '#F3F2F1',
2754
+ titleFontWeight: 'Normal',
2726
2755
  subTitleFontColor: '#F3F2F1',
2727
2756
  tooltipFillColor: '#252423',
2728
2757
  tooltipFontColor: '#F3F2F1',
2758
+ tooltipFontSize: '13px',
2729
2759
  tooltipFillOpacity: 1,
2730
2760
  tooltipTextOpacity: 1,
2731
2761
  legendTitleColor: '#F3F2F1',
2732
2762
  legendTextColor: '#F3F2F1',
2733
2763
  fontFamily: 'Segoe UI',
2734
2764
  fontSize: '14px',
2765
+ fontWeight: 'Normal',
2735
2766
  subtitleFontSize: '12px',
2736
2767
  legendFontSize: '12px',
2737
2768
  labelFontFamily: 'Segoe UI'
2738
2769
  };
2739
2770
  break;
2771
+ case 'material3':
2772
+ style = {
2773
+ backgroundColor: 'transparent',
2774
+ titleFontColor: '#1C1B1F',
2775
+ titleFontWeight: '500',
2776
+ subTitleFontColor: '#1C1B1F',
2777
+ tooltipFillColor: '#313033',
2778
+ tooltipFontColor: '#F4EFF4',
2779
+ tooltipFontSize: '14px',
2780
+ tooltipFillOpacity: 1,
2781
+ tooltipTextOpacity: 1,
2782
+ legendTitleColor: '#1C1B1F',
2783
+ legendTextColor: '#49454E',
2784
+ fontFamily: 'Roboto',
2785
+ fontSize: '16px',
2786
+ fontWeight: '400',
2787
+ subtitleFontSize: '14px',
2788
+ legendFontSize: '14px',
2789
+ labelFontFamily: 'Roboto'
2790
+ };
2791
+ break;
2792
+ case 'material3dark':
2793
+ style = {
2794
+ backgroundColor: 'transparent',
2795
+ titleFontColor: '#E6E1E5',
2796
+ titleFontWeight: '500',
2797
+ subTitleFontColor: '#E6E1E5',
2798
+ tooltipFillColor: '#E6E1E5',
2799
+ tooltipFontColor: '#313033',
2800
+ tooltipFontSize: '14px',
2801
+ tooltipFillOpacity: 1,
2802
+ tooltipTextOpacity: 1,
2803
+ legendTitleColor: '#E6E1E5',
2804
+ legendTextColor: '#CAC4D0',
2805
+ fontFamily: 'Roboto',
2806
+ fontSize: '16px',
2807
+ fontWeight: '400',
2808
+ subtitleFontSize: '14px',
2809
+ legendFontSize: '14px',
2810
+ labelFontFamily: 'Roboto'
2811
+ };
2812
+ break;
2740
2813
  default:
2741
2814
  style = {
2742
2815
  backgroundColor: '#FFFFFF',
2743
2816
  titleFontColor: '#424242',
2817
+ titleFontWeight: 'Normal',
2744
2818
  subTitleFontColor: '#424242',
2745
2819
  tooltipFillColor: '#363F4C',
2746
2820
  tooltipFontColor: '#ffffff',
2821
+ tooltipFontSize: '13px',
2747
2822
  legendTitleColor: '#353535',
2748
2823
  legendTextColor: '#353535',
2749
2824
  fontSize: '15px',
2825
+ fontWeight: 'Normal',
2750
2826
  subtitleFontSize: '14px',
2751
2827
  legendFontSize: '13px',
2752
2828
  fontFamily: 'Roboto, Noto, Sans-serif'
@@ -2815,7 +2891,19 @@ class Print {
2815
2891
  }
2816
2892
  }
2817
2893
  else {
2818
- div.appendChild(treeMap.element.cloneNode(true));
2894
+ const exportElement = treeMap.element.cloneNode(true);
2895
+ let backgroundElement = exportElement.childNodes[1];
2896
+ if (!isNullOrUndefined(backgroundElement)) {
2897
+ backgroundElement = backgroundElement.childNodes[0];
2898
+ const backgroundColor = backgroundElement.getAttribute('fill');
2899
+ if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
2900
+ exportElement.childNodes[1].childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
2901
+ }
2902
+ else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
2903
+ exportElement.childNodes[1].childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
2904
+ }
2905
+ }
2906
+ div.appendChild(exportElement);
2819
2907
  }
2820
2908
  return div;
2821
2909
  }
@@ -2872,12 +2960,23 @@ class ImageExport {
2872
2960
  'width': treeMap.availableSize.width.toString()
2873
2961
  }
2874
2962
  });
2963
+ const exportElement = treeMap.svgObject.cloneNode(true);
2964
+ const backgroundElement = exportElement.childNodes[0];
2965
+ if (!isNullOrUndefined(backgroundElement)) {
2966
+ const backgroundColor = backgroundElement.getAttribute('fill');
2967
+ if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
2968
+ exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
2969
+ }
2970
+ else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
2971
+ exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
2972
+ }
2973
+ }
2875
2974
  const isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
2876
2975
  const svgData = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
2877
- treeMap.svgObject.outerHTML +
2976
+ exportElement.outerHTML +
2878
2977
  '</svg>';
2879
2978
  const url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
2880
- [(new XMLSerializer()).serializeToString(treeMap.svgObject)], { type: 'image/svg+xml' }));
2979
+ [(new XMLSerializer()).serializeToString(exportElement)], { type: 'image/svg+xml' }));
2881
2980
  if (type === 'SVG') {
2882
2981
  if (allowDownload) {
2883
2982
  triggerDownload(fileName, type, url, isDownload);
@@ -2963,10 +3062,12 @@ class PdfExport {
2963
3062
  const backgroundElement = exportElement.childNodes[0];
2964
3063
  if (!isNullOrUndefined(backgroundElement)) {
2965
3064
  const backgroundColor = backgroundElement.getAttribute('fill');
2966
- if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Bootstrap5Dark'
2967
- || treeMap.theme === 'Fluent' || treeMap.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
3065
+ if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
2968
3066
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
2969
3067
  }
3068
+ else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
3069
+ exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
3070
+ }
2970
3071
  }
2971
3072
  const url = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(exportElement)], { type: 'image/svg+xml' }));
2972
3073
  const image = new Image();
@@ -3079,7 +3180,7 @@ let TreeMap = class TreeMap extends Component {
3079
3180
  processDataManager() {
3080
3181
  let dataModule;
3081
3182
  let queryModule;
3082
- let ajaxModule;
3183
+ let fetchApiModule;
3083
3184
  let localAjax;
3084
3185
  if (this.dataSource instanceof DataManager) {
3085
3186
  dataModule = this.dataSource;
@@ -3094,12 +3195,12 @@ let TreeMap = class TreeMap extends Component {
3094
3195
  }
3095
3196
  else if (this.dataSource instanceof TreeMapAjax) {
3096
3197
  localAjax = this.dataSource;
3097
- ajaxModule = new Ajax(localAjax.dataOptions, localAjax.type, localAjax.async, localAjax.contentType);
3098
- ajaxModule.onSuccess = (args) => {
3099
- this.dataSource = JSON.parse('[' + args + ']')[0];
3198
+ fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
3199
+ fetchApiModule.onSuccess = (args) => {
3200
+ this.dataSource = args;
3100
3201
  this.renderTreeMapElements();
3101
3202
  };
3102
- ajaxModule.send(localAjax.sendData);
3203
+ fetchApiModule.send(localAjax.sendData);
3103
3204
  }
3104
3205
  else {
3105
3206
  this.renderTreeMapElements();
@@ -3201,6 +3302,7 @@ let TreeMap = class TreeMap extends Component {
3201
3302
  const titlePadding = 10;
3202
3303
  const width = (this.availableSize.width - this.margin.right - this.margin.left);
3203
3304
  style.fontFamily = style.fontFamily || this.themeStyle.fontFamily;
3305
+ style.fontWeight = style.fontWeight || this.themeStyle.titleFontWeight;
3204
3306
  style.size = style.size || (type === 'title' ? this.themeStyle.fontSize : this.themeStyle.subtitleFontSize);
3205
3307
  if (title.text) {
3206
3308
  if (isNullOrUndefined(groupEle)) {
@@ -3618,6 +3720,7 @@ let TreeMap = class TreeMap extends Component {
3618
3720
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3619
3721
  this.trigger(resize, args, (observedArgs) => {
3620
3722
  this.render();
3723
+ this.refreshing = false;
3621
3724
  });
3622
3725
  }, 500);
3623
3726
  }
@@ -4400,6 +4503,7 @@ class TreeMapLegend {
4400
4503
  let legendHeight = (legend.height.length > 1) ? (legend.height.indexOf('%') > -1) ?
4401
4504
  (treemap.availableSize.height / 100) * parseFloat(legend.height) : parseFloat(legend.height) : null;
4402
4505
  titleTextStyle.fontFamily = treemap.themeStyle.fontFamily || titleTextStyle.fontFamily;
4506
+ titleTextStyle.fontWeight = titleTextStyle.fontWeight || treemap.themeStyle.titleFontWeight;
4403
4507
  titleTextStyle.size = treemap.themeStyle.legendFontSize || titleTextStyle.size;
4404
4508
  const legendTitleSize = measureText(legendTitle, titleTextStyle);
4405
4509
  let startX = 0;
@@ -4408,6 +4512,7 @@ class TreeMapLegend {
4408
4512
  const itemTextStyle = legend.textStyle;
4409
4513
  itemTextStyle.size = itemTextStyle.size || treemap.themeStyle.legendFontSize;
4410
4514
  itemTextStyle.fontFamily = itemTextStyle.fontFamily || treemap.themeStyle.fontFamily;
4515
+ itemTextStyle.fontWeight = itemTextStyle.fontWeight || treemap.themeStyle.fontWeight;
4411
4516
  if (legendMode === 'Default') {
4412
4517
  legendWidth = (isNullOrUndefined(legendWidth)) ? treemap.areaRect.width : legendWidth;
4413
4518
  legendHeight = (isNullOrUndefined(legendHeight)) ? treemap.areaRect.height : legendHeight;
@@ -5922,7 +6027,10 @@ class TreeMapTooltip {
5922
6027
  }
5923
6028
  location = getMousePosition(pageX, pageY, this.treemap.svgObject);
5924
6029
  location.y = (this.tooltipSettings.template) ? location.y + 10 : location.y;
6030
+ this.tooltipSettings.textStyle.size = this.tooltipSettings.textStyle.size || this.treemap.themeStyle.tooltipFontSize;
5925
6031
  this.tooltipSettings.textStyle.fontFamily = this.treemap.themeStyle.fontFamily;
6032
+ this.tooltipSettings.textStyle.fontStyle = !isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle) ? this.tooltipSettings.textStyle.fontStyle : 'Normal';
6033
+ this.tooltipSettings.textStyle.fontWeight = this.tooltipSettings.textStyle.fontWeight || this.treemap.themeStyle.fontWeight;
5926
6034
  this.tooltipSettings.textStyle.color = this.treemap.themeStyle.tooltipFontColor
5927
6035
  || this.tooltipSettings.textStyle.color;
5928
6036
  this.tooltipSettings.textStyle.opacity = this.treemap.themeStyle.tooltipTextOpacity