@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.
- package/.eslintrc.json +1 -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 +126 -18
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +126 -18
- 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 +15 -12
- package/src/treemap/layout/legend.js +2 -0
- package/src/treemap/layout/render-panel.js +2 -1
- package/src/treemap/model/base-model.d.ts +7 -4
- package/src/treemap/model/base.d.ts +7 -4
- package/src/treemap/model/base.js +5 -5
- package/src/treemap/model/image-export.js +14 -3
- package/src/treemap/model/interface.d.ts +15 -1
- package/src/treemap/model/pdf-export.js +4 -2
- package/src/treemap/model/print.js +14 -2
- package/src/treemap/model/theme.js +72 -0
- package/src/treemap/treemap-model.d.ts +1 -1
- package/src/treemap/treemap.js +8 -6
- package/src/treemap/user-interaction/tooltip.js +3 -0
- package/src/treemap/utils/enum.d.ts +5 -1
- package/src/treemap/utils/helper.d.ts +1 -1
- package/src/treemap/utils/helper.js +4 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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';
|
|
@@ -199,7 +199,7 @@ var Font = /** @__PURE__ @class */ (function (_super) {
|
|
|
199
199
|
Property(defaultFont)
|
|
200
200
|
], Font.prototype, "fontFamily", void 0);
|
|
201
201
|
__decorate$1([
|
|
202
|
-
Property('
|
|
202
|
+
Property('')
|
|
203
203
|
], Font.prototype, "fontWeight", void 0);
|
|
204
204
|
__decorate$1([
|
|
205
205
|
Property('Normal')
|
|
@@ -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({ fontFamily: null }, Font)
|
|
237
|
+
Complex({ fontFamily: null, fontWeight: 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({ fontFamily: null }, Font)
|
|
253
|
+
Complex({ fontFamily: null, fontWeight: 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({ fontFamily: null }, Font)
|
|
324
|
+
Complex({ size: '12px', fontFamily: null, fontWeight: null }, Font)
|
|
325
325
|
], LegendSettings.prototype, "textStyle", void 0);
|
|
326
326
|
__decorate$1([
|
|
327
327
|
Property(null)
|
|
@@ -486,7 +486,7 @@ var TooltipSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
486
486
|
Complex({}, Border)
|
|
487
487
|
], TooltipSettings.prototype, "border", void 0);
|
|
488
488
|
__decorate$1([
|
|
489
|
-
Complex({ fontFamily: defaultFont, size:
|
|
489
|
+
Complex({ fontFamily: defaultFont, size: null, fontWeight: null }, Font)
|
|
490
490
|
], TooltipSettings.prototype, "textStyle", void 0);
|
|
491
491
|
return TooltipSettings;
|
|
492
492
|
}(ChildProperty));
|
|
@@ -1006,9 +1006,12 @@ function findHightLightItems(data, items, mode, treeMap) {
|
|
|
1006
1006
|
function getTemplateFunction(template) {
|
|
1007
1007
|
var templateFn = null;
|
|
1008
1008
|
try {
|
|
1009
|
-
if (document.querySelectorAll(template).length) {
|
|
1009
|
+
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
1010
1010
|
templateFn = compile(document.querySelector(template).innerHTML.trim());
|
|
1011
1011
|
}
|
|
1012
|
+
else {
|
|
1013
|
+
templateFn = compile(template);
|
|
1014
|
+
}
|
|
1012
1015
|
}
|
|
1013
1016
|
catch (e) {
|
|
1014
1017
|
templateFn = compile(template);
|
|
@@ -2425,6 +2428,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2425
2428
|
treeMap.enableRtl ? renderText + ' [-]' : '[-] ' + renderText : renderText;
|
|
2426
2429
|
textStyle = (isLeafItem ? leaf.labelStyle : levels[index].headerStyle);
|
|
2427
2430
|
textStyle.fontFamily = this_1.treemap.themeStyle.labelFontFamily || textStyle.fontFamily;
|
|
2431
|
+
textStyle.fontWeight = textStyle.fontWeight || this_1.treemap.themeStyle.fontWeight;
|
|
2428
2432
|
border = isLeafItem ? leaf.border : levels[index].border;
|
|
2429
2433
|
position = !isLeafItem ? (levels[index].headerAlignment) === 'Near' ? 'TopLeft' : (levels[index].headerAlignment) === 'Center' ?
|
|
2430
2434
|
'TopCenter' : 'TopRight' : leaf.labelPosition;
|
|
@@ -2584,7 +2588,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2584
2588
|
secondaryEle, groupId, rect, position, template, item, isLeafItem) {
|
|
2585
2589
|
var templateId = isLeafItem ? groupId + '_LabelTemplate' : groupId + '_HeaderTemplate';
|
|
2586
2590
|
var baseTemplateId = isLeafItem ? '_LabelTemplate' : '_HeaderTemplate';
|
|
2587
|
-
if (isNullOrUndefined(template['prototype'])) {
|
|
2591
|
+
if (isNullOrUndefined(template['prototype']) && typeof template === 'string') {
|
|
2588
2592
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2589
2593
|
var keys = Object.keys(item['data']);
|
|
2590
2594
|
for (var i = 0; i < keys.length; i++) {
|
|
@@ -2685,12 +2689,15 @@ function getThemeStyle(theme) {
|
|
|
2685
2689
|
style = {
|
|
2686
2690
|
backgroundColor: color,
|
|
2687
2691
|
titleFontColor: '#FFFFFF',
|
|
2692
|
+
titleFontWeight: 'Normal',
|
|
2688
2693
|
subTitleFontColor: '#FFFFFF',
|
|
2689
2694
|
tooltipFillColor: '#363F4C',
|
|
2690
2695
|
tooltipFontColor: '#ffffff',
|
|
2696
|
+
tooltipFontSize: '13px',
|
|
2691
2697
|
legendTitleColor: '#DADADA',
|
|
2692
2698
|
legendTextColor: '#DADADA',
|
|
2693
2699
|
fontSize: '15px',
|
|
2700
|
+
fontWeight: 'Normal',
|
|
2694
2701
|
subtitleFontSize: '14px',
|
|
2695
2702
|
legendFontSize: '13px',
|
|
2696
2703
|
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
@@ -2700,12 +2707,15 @@ function getThemeStyle(theme) {
|
|
|
2700
2707
|
style = {
|
|
2701
2708
|
backgroundColor: '#000000',
|
|
2702
2709
|
titleFontColor: '#FFFFFF',
|
|
2710
|
+
titleFontWeight: 'Normal',
|
|
2703
2711
|
subTitleFontColor: '#FFFFFF',
|
|
2704
2712
|
tooltipFillColor: '#363F4C',
|
|
2705
2713
|
tooltipFontColor: '#ffffff',
|
|
2714
|
+
tooltipFontSize: '13px',
|
|
2706
2715
|
legendTitleColor: '#FFFFFF',
|
|
2707
2716
|
legendTextColor: '#FFFFFF',
|
|
2708
2717
|
fontSize: '15px',
|
|
2718
|
+
fontWeight: 'Normal',
|
|
2709
2719
|
subtitleFontSize: '14px',
|
|
2710
2720
|
legendFontSize: '13px',
|
|
2711
2721
|
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
@@ -2715,15 +2725,18 @@ function getThemeStyle(theme) {
|
|
|
2715
2725
|
style = {
|
|
2716
2726
|
backgroundColor: '#FFFFFF',
|
|
2717
2727
|
titleFontColor: '#212529',
|
|
2728
|
+
titleFontWeight: 'Normal',
|
|
2718
2729
|
subTitleFontColor: '#212529',
|
|
2719
2730
|
tooltipFillColor: '#000000',
|
|
2720
2731
|
tooltipFontColor: '#FFFFFF',
|
|
2732
|
+
tooltipFontSize: '13px',
|
|
2721
2733
|
tooltipFillOpacity: 1,
|
|
2722
2734
|
tooltipTextOpacity: 0.9,
|
|
2723
2735
|
legendTitleColor: '#212529',
|
|
2724
2736
|
legendTextColor: '#212529',
|
|
2725
2737
|
fontFamily: 'HelveticaNeue-Medium',
|
|
2726
2738
|
fontSize: '16px',
|
|
2739
|
+
fontWeight: 'Normal',
|
|
2727
2740
|
subtitleFontSize: '14px',
|
|
2728
2741
|
legendFontSize: '14px',
|
|
2729
2742
|
labelFontFamily: 'HelveticaNeue'
|
|
@@ -2733,15 +2746,18 @@ function getThemeStyle(theme) {
|
|
|
2733
2746
|
style = {
|
|
2734
2747
|
backgroundColor: 'transparent',
|
|
2735
2748
|
titleFontColor: '#374151',
|
|
2749
|
+
titleFontWeight: 'Normal',
|
|
2736
2750
|
subTitleFontColor: '#374151',
|
|
2737
2751
|
tooltipFillColor: '#111827',
|
|
2738
2752
|
tooltipFontColor: '#F9FAFB',
|
|
2753
|
+
tooltipFontSize: '13px',
|
|
2739
2754
|
tooltipFillOpacity: 1,
|
|
2740
2755
|
tooltipTextOpacity: 1,
|
|
2741
2756
|
legendTitleColor: '#374151',
|
|
2742
2757
|
legendTextColor: '#374151',
|
|
2743
2758
|
fontFamily: 'Inter',
|
|
2744
2759
|
fontSize: '14px',
|
|
2760
|
+
fontWeight: 'Normal',
|
|
2745
2761
|
subtitleFontSize: '12px',
|
|
2746
2762
|
legendFontSize: '12px',
|
|
2747
2763
|
labelFontFamily: 'Inter'
|
|
@@ -2751,14 +2767,17 @@ function getThemeStyle(theme) {
|
|
|
2751
2767
|
style = {
|
|
2752
2768
|
backgroundColor: 'transparent',
|
|
2753
2769
|
titleFontColor: '#D1D5DB',
|
|
2770
|
+
titleFontWeight: 'Normal',
|
|
2754
2771
|
subTitleFontColor: '#D1D5DB',
|
|
2755
2772
|
tooltipFillColor: '#F9FAFB',
|
|
2756
2773
|
tooltipFontColor: '#1F2937',
|
|
2774
|
+
tooltipFontSize: '13px',
|
|
2757
2775
|
tooltipFillOpacity: 1,
|
|
2758
2776
|
tooltipTextOpacity: 1,
|
|
2759
2777
|
legendTitleColor: '#D1D5DB',
|
|
2760
2778
|
legendTextColor: '#D1D5DB',
|
|
2761
2779
|
fontFamily: 'Inter',
|
|
2780
|
+
fontWeight: 'Normal',
|
|
2762
2781
|
fontSize: '14px',
|
|
2763
2782
|
subtitleFontSize: '12px',
|
|
2764
2783
|
legendFontSize: '12px',
|
|
@@ -2769,15 +2788,18 @@ function getThemeStyle(theme) {
|
|
|
2769
2788
|
style = {
|
|
2770
2789
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
2771
2790
|
titleFontColor: '#212529',
|
|
2791
|
+
titleFontWeight: 'Normal',
|
|
2772
2792
|
subTitleFontColor: '#212529',
|
|
2773
2793
|
tooltipFillColor: '#212529',
|
|
2774
2794
|
tooltipFontColor: '#F9FAFB',
|
|
2795
|
+
tooltipFontSize: '13px',
|
|
2775
2796
|
tooltipFillOpacity: 1,
|
|
2776
2797
|
tooltipTextOpacity: 1,
|
|
2777
2798
|
legendTitleColor: '#212529',
|
|
2778
2799
|
legendTextColor: '#212529',
|
|
2779
2800
|
fontFamily: 'Helvetica Neue',
|
|
2780
2801
|
fontSize: '14px',
|
|
2802
|
+
fontWeight: 'Normal',
|
|
2781
2803
|
subtitleFontSize: '12px',
|
|
2782
2804
|
legendFontSize: '12px',
|
|
2783
2805
|
labelFontFamily: 'Helvetica Neue'
|
|
@@ -2787,15 +2809,18 @@ function getThemeStyle(theme) {
|
|
|
2787
2809
|
style = {
|
|
2788
2810
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
2789
2811
|
titleFontColor: '#FFFFFF',
|
|
2812
|
+
titleFontWeight: 'Normal',
|
|
2790
2813
|
subTitleFontColor: '#FFFFFF',
|
|
2791
2814
|
tooltipFillColor: '#E9ECEF',
|
|
2792
2815
|
tooltipFontColor: '#212529',
|
|
2816
|
+
tooltipFontSize: '13px',
|
|
2793
2817
|
tooltipFillOpacity: 1,
|
|
2794
2818
|
tooltipTextOpacity: 1,
|
|
2795
2819
|
legendTitleColor: '#FFFFFF',
|
|
2796
2820
|
legendTextColor: '#FFFFFF',
|
|
2797
2821
|
fontFamily: 'Helvetica Neue',
|
|
2798
2822
|
fontSize: '14px',
|
|
2823
|
+
fontWeight: 'Normal',
|
|
2799
2824
|
subtitleFontSize: '12px',
|
|
2800
2825
|
legendFontSize: '12px',
|
|
2801
2826
|
labelFontFamily: 'Helvetica Neue'
|
|
@@ -2805,15 +2830,18 @@ function getThemeStyle(theme) {
|
|
|
2805
2830
|
style = {
|
|
2806
2831
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
2807
2832
|
titleFontColor: '#201F1E',
|
|
2833
|
+
titleFontWeight: 'Normal',
|
|
2808
2834
|
subTitleFontColor: '#201F1E',
|
|
2809
2835
|
tooltipFillColor: '#FFFFFF',
|
|
2810
2836
|
tooltipFontColor: '#323130',
|
|
2837
|
+
tooltipFontSize: '13px',
|
|
2811
2838
|
tooltipFillOpacity: 1,
|
|
2812
2839
|
tooltipTextOpacity: 1,
|
|
2813
2840
|
legendTitleColor: '#201F1E',
|
|
2814
2841
|
legendTextColor: '#201F1E',
|
|
2815
2842
|
fontFamily: 'Segoe UI',
|
|
2816
2843
|
fontSize: '14px',
|
|
2844
|
+
fontWeight: 'Normal',
|
|
2817
2845
|
subtitleFontSize: '12px',
|
|
2818
2846
|
legendFontSize: '12px',
|
|
2819
2847
|
labelFontFamily: 'Segoe UI'
|
|
@@ -2823,30 +2851,78 @@ function getThemeStyle(theme) {
|
|
|
2823
2851
|
style = {
|
|
2824
2852
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
2825
2853
|
titleFontColor: '#F3F2F1',
|
|
2854
|
+
titleFontWeight: 'Normal',
|
|
2826
2855
|
subTitleFontColor: '#F3F2F1',
|
|
2827
2856
|
tooltipFillColor: '#252423',
|
|
2828
2857
|
tooltipFontColor: '#F3F2F1',
|
|
2858
|
+
tooltipFontSize: '13px',
|
|
2829
2859
|
tooltipFillOpacity: 1,
|
|
2830
2860
|
tooltipTextOpacity: 1,
|
|
2831
2861
|
legendTitleColor: '#F3F2F1',
|
|
2832
2862
|
legendTextColor: '#F3F2F1',
|
|
2833
2863
|
fontFamily: 'Segoe UI',
|
|
2834
2864
|
fontSize: '14px',
|
|
2865
|
+
fontWeight: 'Normal',
|
|
2835
2866
|
subtitleFontSize: '12px',
|
|
2836
2867
|
legendFontSize: '12px',
|
|
2837
2868
|
labelFontFamily: 'Segoe UI'
|
|
2838
2869
|
};
|
|
2839
2870
|
break;
|
|
2871
|
+
case 'material3':
|
|
2872
|
+
style = {
|
|
2873
|
+
backgroundColor: 'transparent',
|
|
2874
|
+
titleFontColor: '#1C1B1F',
|
|
2875
|
+
titleFontWeight: '500',
|
|
2876
|
+
subTitleFontColor: '#1C1B1F',
|
|
2877
|
+
tooltipFillColor: '#313033',
|
|
2878
|
+
tooltipFontColor: '#F4EFF4',
|
|
2879
|
+
tooltipFontSize: '14px',
|
|
2880
|
+
tooltipFillOpacity: 1,
|
|
2881
|
+
tooltipTextOpacity: 1,
|
|
2882
|
+
legendTitleColor: '#1C1B1F',
|
|
2883
|
+
legendTextColor: '#49454E',
|
|
2884
|
+
fontFamily: 'Roboto',
|
|
2885
|
+
fontSize: '16px',
|
|
2886
|
+
fontWeight: '400',
|
|
2887
|
+
subtitleFontSize: '14px',
|
|
2888
|
+
legendFontSize: '14px',
|
|
2889
|
+
labelFontFamily: 'Roboto'
|
|
2890
|
+
};
|
|
2891
|
+
break;
|
|
2892
|
+
case 'material3dark':
|
|
2893
|
+
style = {
|
|
2894
|
+
backgroundColor: 'transparent',
|
|
2895
|
+
titleFontColor: '#E6E1E5',
|
|
2896
|
+
titleFontWeight: '500',
|
|
2897
|
+
subTitleFontColor: '#E6E1E5',
|
|
2898
|
+
tooltipFillColor: '#E6E1E5',
|
|
2899
|
+
tooltipFontColor: '#313033',
|
|
2900
|
+
tooltipFontSize: '14px',
|
|
2901
|
+
tooltipFillOpacity: 1,
|
|
2902
|
+
tooltipTextOpacity: 1,
|
|
2903
|
+
legendTitleColor: '#E6E1E5',
|
|
2904
|
+
legendTextColor: '#CAC4D0',
|
|
2905
|
+
fontFamily: 'Roboto',
|
|
2906
|
+
fontSize: '16px',
|
|
2907
|
+
fontWeight: '400',
|
|
2908
|
+
subtitleFontSize: '14px',
|
|
2909
|
+
legendFontSize: '14px',
|
|
2910
|
+
labelFontFamily: 'Roboto'
|
|
2911
|
+
};
|
|
2912
|
+
break;
|
|
2840
2913
|
default:
|
|
2841
2914
|
style = {
|
|
2842
2915
|
backgroundColor: '#FFFFFF',
|
|
2843
2916
|
titleFontColor: '#424242',
|
|
2917
|
+
titleFontWeight: 'Normal',
|
|
2844
2918
|
subTitleFontColor: '#424242',
|
|
2845
2919
|
tooltipFillColor: '#363F4C',
|
|
2846
2920
|
tooltipFontColor: '#ffffff',
|
|
2921
|
+
tooltipFontSize: '13px',
|
|
2847
2922
|
legendTitleColor: '#353535',
|
|
2848
2923
|
legendTextColor: '#353535',
|
|
2849
2924
|
fontSize: '15px',
|
|
2925
|
+
fontWeight: 'Normal',
|
|
2850
2926
|
subtitleFontSize: '14px',
|
|
2851
2927
|
legendFontSize: '13px',
|
|
2852
2928
|
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
@@ -2915,7 +2991,19 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
2915
2991
|
}
|
|
2916
2992
|
}
|
|
2917
2993
|
else {
|
|
2918
|
-
|
|
2994
|
+
var exportElement = treeMap.element.cloneNode(true);
|
|
2995
|
+
var backgroundElement = exportElement.childNodes[1];
|
|
2996
|
+
if (!isNullOrUndefined(backgroundElement)) {
|
|
2997
|
+
backgroundElement = backgroundElement.childNodes[0];
|
|
2998
|
+
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
2999
|
+
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3000
|
+
exportElement.childNodes[1].childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
3001
|
+
}
|
|
3002
|
+
else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3003
|
+
exportElement.childNodes[1].childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
div.appendChild(exportElement);
|
|
2919
3007
|
}
|
|
2920
3008
|
return div;
|
|
2921
3009
|
};
|
|
@@ -2973,12 +3061,23 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
2973
3061
|
'width': treeMap.availableSize.width.toString()
|
|
2974
3062
|
}
|
|
2975
3063
|
});
|
|
3064
|
+
var exportElement = treeMap.svgObject.cloneNode(true);
|
|
3065
|
+
var backgroundElement = exportElement.childNodes[0];
|
|
3066
|
+
if (!isNullOrUndefined(backgroundElement)) {
|
|
3067
|
+
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
3068
|
+
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3069
|
+
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
3070
|
+
}
|
|
3071
|
+
else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3072
|
+
exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
3073
|
+
}
|
|
3074
|
+
}
|
|
2976
3075
|
var isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
|
|
2977
3076
|
var svgData = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
|
|
2978
|
-
|
|
3077
|
+
exportElement.outerHTML +
|
|
2979
3078
|
'</svg>';
|
|
2980
3079
|
var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
|
|
2981
|
-
[(new XMLSerializer()).serializeToString(
|
|
3080
|
+
[(new XMLSerializer()).serializeToString(exportElement)], { type: 'image/svg+xml' }));
|
|
2982
3081
|
if (type === 'SVG') {
|
|
2983
3082
|
if (allowDownload) {
|
|
2984
3083
|
triggerDownload(fileName, type, url, isDownload);
|
|
@@ -3065,10 +3164,12 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
3065
3164
|
var backgroundElement = exportElement.childNodes[0];
|
|
3066
3165
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
3067
3166
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
3068
|
-
if ((treeMap.theme === 'Tailwind' || treeMap.theme === '
|
|
3069
|
-
|| treeMap.theme === 'Fluent' || treeMap.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3167
|
+
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3070
3168
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
3071
3169
|
}
|
|
3170
|
+
else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3171
|
+
exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
3172
|
+
}
|
|
3072
3173
|
}
|
|
3073
3174
|
var url = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(exportElement)], { type: 'image/svg+xml' }));
|
|
3074
3175
|
var image = new Image();
|
|
@@ -3199,7 +3300,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3199
3300
|
var _this = this;
|
|
3200
3301
|
var dataModule;
|
|
3201
3302
|
var queryModule;
|
|
3202
|
-
var
|
|
3303
|
+
var fetchApiModule;
|
|
3203
3304
|
var localAjax;
|
|
3204
3305
|
if (this.dataSource instanceof DataManager) {
|
|
3205
3306
|
dataModule = this.dataSource;
|
|
@@ -3214,12 +3315,12 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3214
3315
|
}
|
|
3215
3316
|
else if (this.dataSource instanceof TreeMapAjax) {
|
|
3216
3317
|
localAjax = this.dataSource;
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
_this.dataSource =
|
|
3318
|
+
fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
|
|
3319
|
+
fetchApiModule.onSuccess = function (args) {
|
|
3320
|
+
_this.dataSource = args;
|
|
3220
3321
|
_this.renderTreeMapElements();
|
|
3221
3322
|
};
|
|
3222
|
-
|
|
3323
|
+
fetchApiModule.send(localAjax.sendData);
|
|
3223
3324
|
}
|
|
3224
3325
|
else {
|
|
3225
3326
|
this.renderTreeMapElements();
|
|
@@ -3321,6 +3422,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3321
3422
|
var titlePadding = 10;
|
|
3322
3423
|
var width = (this.availableSize.width - this.margin.right - this.margin.left);
|
|
3323
3424
|
style.fontFamily = style.fontFamily || this.themeStyle.fontFamily;
|
|
3425
|
+
style.fontWeight = style.fontWeight || this.themeStyle.titleFontWeight;
|
|
3324
3426
|
style.size = style.size || (type === 'title' ? this.themeStyle.fontSize : this.themeStyle.subtitleFontSize);
|
|
3325
3427
|
if (title.text) {
|
|
3326
3428
|
if (isNullOrUndefined(groupEle)) {
|
|
@@ -3747,6 +3849,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3747
3849
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3748
3850
|
_this.trigger(resize, args_1, function (observedArgs) {
|
|
3749
3851
|
_this.render();
|
|
3852
|
+
_this.refreshing = false;
|
|
3750
3853
|
});
|
|
3751
3854
|
}, 500);
|
|
3752
3855
|
}
|
|
@@ -4540,6 +4643,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4540
4643
|
var legendHeight = (legend.height.length > 1) ? (legend.height.indexOf('%') > -1) ?
|
|
4541
4644
|
(treemap.availableSize.height / 100) * parseFloat(legend.height) : parseFloat(legend.height) : null;
|
|
4542
4645
|
titleTextStyle.fontFamily = treemap.themeStyle.fontFamily || titleTextStyle.fontFamily;
|
|
4646
|
+
titleTextStyle.fontWeight = titleTextStyle.fontWeight || treemap.themeStyle.titleFontWeight;
|
|
4543
4647
|
titleTextStyle.size = treemap.themeStyle.legendFontSize || titleTextStyle.size;
|
|
4544
4648
|
var legendTitleSize = measureText(legendTitle, titleTextStyle);
|
|
4545
4649
|
var startX_1 = 0;
|
|
@@ -4548,6 +4652,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4548
4652
|
var itemTextStyle = legend.textStyle;
|
|
4549
4653
|
itemTextStyle.size = itemTextStyle.size || treemap.themeStyle.legendFontSize;
|
|
4550
4654
|
itemTextStyle.fontFamily = itemTextStyle.fontFamily || treemap.themeStyle.fontFamily;
|
|
4655
|
+
itemTextStyle.fontWeight = itemTextStyle.fontWeight || treemap.themeStyle.fontWeight;
|
|
4551
4656
|
if (legendMode === 'Default') {
|
|
4552
4657
|
legendWidth = (isNullOrUndefined(legendWidth)) ? treemap.areaRect.width : legendWidth;
|
|
4553
4658
|
legendHeight = (isNullOrUndefined(legendHeight)) ? treemap.areaRect.height : legendHeight;
|
|
@@ -6071,7 +6176,10 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6071
6176
|
}
|
|
6072
6177
|
location = getMousePosition(pageX, pageY, this.treemap.svgObject);
|
|
6073
6178
|
location.y = (this.tooltipSettings.template) ? location.y + 10 : location.y;
|
|
6179
|
+
this.tooltipSettings.textStyle.size = this.tooltipSettings.textStyle.size || this.treemap.themeStyle.tooltipFontSize;
|
|
6074
6180
|
this.tooltipSettings.textStyle.fontFamily = this.treemap.themeStyle.fontFamily;
|
|
6181
|
+
this.tooltipSettings.textStyle.fontStyle = !isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle) ? this.tooltipSettings.textStyle.fontStyle : 'Normal';
|
|
6182
|
+
this.tooltipSettings.textStyle.fontWeight = this.tooltipSettings.textStyle.fontWeight || this.treemap.themeStyle.fontWeight;
|
|
6075
6183
|
this.tooltipSettings.textStyle.color = this.treemap.themeStyle.tooltipFontColor
|
|
6076
6184
|
|| this.tooltipSettings.textStyle.color;
|
|
6077
6185
|
this.tooltipSettings.textStyle.opacity = this.treemap.themeStyle.tooltipTextOpacity
|