@syncfusion/ej2-treemap 20.2.36 → 20.2.45
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/CHANGELOG.md +6 -0
- 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 +28 -10
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +31 -13
- 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.js +6 -7
- package/src/treemap/model/base.js +3 -3
- package/src/treemap/model/interface.d.ts +4 -0
- package/src/treemap/model/theme.js +16 -0
- package/src/treemap/treemap.js +6 -3
- package/dist/ts/treemap/layout/legend.ts +0 -991
- package/dist/ts/treemap/layout/render-panel.ts +0 -722
- package/dist/ts/treemap/model/base.ts +0 -800
- package/dist/ts/treemap/model/constants.ts +0 -118
- package/dist/ts/treemap/model/image-export.ts +0 -109
- package/dist/ts/treemap/model/interface.ts +0 -554
- package/dist/ts/treemap/model/pdf-export.ts +0 -103
- package/dist/ts/treemap/model/print.ts +0 -93
- package/dist/ts/treemap/model/theme.ts +0 -202
- package/dist/ts/treemap/treemap.ts +0 -1575
- package/dist/ts/treemap/user-interaction/highlight-selection.ts +0 -530
- package/dist/ts/treemap/user-interaction/tooltip.ts +0 -203
- package/dist/ts/treemap/utils/enum.ts +0 -222
- package/dist/ts/treemap/utils/helper.ts +0 -1181
|
@@ -198,7 +198,7 @@ __decorate$1([
|
|
|
198
198
|
class SubTitleSettings extends CommonTitleSettings {
|
|
199
199
|
}
|
|
200
200
|
__decorate$1([
|
|
201
|
-
Complex({
|
|
201
|
+
Complex({ fontFamily: 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({
|
|
212
|
+
Complex({ fontFamily: 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({
|
|
273
|
+
Complex({ fontFamily: null }, Font)
|
|
274
274
|
], LegendSettings.prototype, "textStyle", void 0);
|
|
275
275
|
__decorate$1([
|
|
276
276
|
Property(null)
|
|
@@ -2334,6 +2334,9 @@ function getThemeStyle(theme) {
|
|
|
2334
2334
|
tooltipFontColor: '#ffffff',
|
|
2335
2335
|
legendTitleColor: '#DADADA',
|
|
2336
2336
|
legendTextColor: '#DADADA',
|
|
2337
|
+
fontSize: '15px',
|
|
2338
|
+
subtitleFontSize: '14px',
|
|
2339
|
+
legendFontSize: '13px',
|
|
2337
2340
|
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
2338
2341
|
};
|
|
2339
2342
|
break;
|
|
@@ -2346,6 +2349,9 @@ function getThemeStyle(theme) {
|
|
|
2346
2349
|
tooltipFontColor: '#ffffff',
|
|
2347
2350
|
legendTitleColor: '#FFFFFF',
|
|
2348
2351
|
legendTextColor: '#FFFFFF',
|
|
2352
|
+
fontSize: '15px',
|
|
2353
|
+
subtitleFontSize: '14px',
|
|
2354
|
+
legendFontSize: '13px',
|
|
2349
2355
|
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
2350
2356
|
};
|
|
2351
2357
|
break;
|
|
@@ -2362,6 +2368,7 @@ function getThemeStyle(theme) {
|
|
|
2362
2368
|
legendTextColor: '#212529',
|
|
2363
2369
|
fontFamily: 'HelveticaNeue-Medium',
|
|
2364
2370
|
fontSize: '16px',
|
|
2371
|
+
subtitleFontSize: '14px',
|
|
2365
2372
|
legendFontSize: '14px',
|
|
2366
2373
|
labelFontFamily: 'HelveticaNeue'
|
|
2367
2374
|
};
|
|
@@ -2379,6 +2386,7 @@ function getThemeStyle(theme) {
|
|
|
2379
2386
|
legendTextColor: '#374151',
|
|
2380
2387
|
fontFamily: 'Inter',
|
|
2381
2388
|
fontSize: '14px',
|
|
2389
|
+
subtitleFontSize: '12px',
|
|
2382
2390
|
legendFontSize: '12px',
|
|
2383
2391
|
labelFontFamily: 'Inter'
|
|
2384
2392
|
};
|
|
@@ -2396,6 +2404,7 @@ function getThemeStyle(theme) {
|
|
|
2396
2404
|
legendTextColor: '#D1D5DB',
|
|
2397
2405
|
fontFamily: 'Inter',
|
|
2398
2406
|
fontSize: '14px',
|
|
2407
|
+
subtitleFontSize: '12px',
|
|
2399
2408
|
legendFontSize: '12px',
|
|
2400
2409
|
labelFontFamily: 'Inter'
|
|
2401
2410
|
};
|
|
@@ -2413,6 +2422,7 @@ function getThemeStyle(theme) {
|
|
|
2413
2422
|
legendTextColor: '#212529',
|
|
2414
2423
|
fontFamily: 'Helvetica Neue',
|
|
2415
2424
|
fontSize: '14px',
|
|
2425
|
+
subtitleFontSize: '12px',
|
|
2416
2426
|
legendFontSize: '12px',
|
|
2417
2427
|
labelFontFamily: 'Helvetica Neue'
|
|
2418
2428
|
};
|
|
@@ -2430,6 +2440,7 @@ function getThemeStyle(theme) {
|
|
|
2430
2440
|
legendTextColor: '#FFFFFF',
|
|
2431
2441
|
fontFamily: 'Helvetica Neue',
|
|
2432
2442
|
fontSize: '14px',
|
|
2443
|
+
subtitleFontSize: '12px',
|
|
2433
2444
|
legendFontSize: '12px',
|
|
2434
2445
|
labelFontFamily: 'Helvetica Neue'
|
|
2435
2446
|
};
|
|
@@ -2447,6 +2458,7 @@ function getThemeStyle(theme) {
|
|
|
2447
2458
|
legendTextColor: '#201F1E',
|
|
2448
2459
|
fontFamily: 'Segoe UI',
|
|
2449
2460
|
fontSize: '14px',
|
|
2461
|
+
subtitleFontSize: '12px',
|
|
2450
2462
|
legendFontSize: '12px',
|
|
2451
2463
|
labelFontFamily: 'Segoe UI'
|
|
2452
2464
|
};
|
|
@@ -2464,6 +2476,7 @@ function getThemeStyle(theme) {
|
|
|
2464
2476
|
legendTextColor: '#F3F2F1',
|
|
2465
2477
|
fontFamily: 'Segoe UI',
|
|
2466
2478
|
fontSize: '14px',
|
|
2479
|
+
subtitleFontSize: '12px',
|
|
2467
2480
|
legendFontSize: '12px',
|
|
2468
2481
|
labelFontFamily: 'Segoe UI'
|
|
2469
2482
|
};
|
|
@@ -2477,6 +2490,9 @@ function getThemeStyle(theme) {
|
|
|
2477
2490
|
tooltipFontColor: '#ffffff',
|
|
2478
2491
|
legendTitleColor: '#353535',
|
|
2479
2492
|
legendTextColor: '#353535',
|
|
2493
|
+
fontSize: '15px',
|
|
2494
|
+
subtitleFontSize: '14px',
|
|
2495
|
+
legendFontSize: '13px',
|
|
2480
2496
|
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
2481
2497
|
};
|
|
2482
2498
|
break;
|
|
@@ -2924,12 +2940,15 @@ let TreeMap = class TreeMap extends Component {
|
|
|
2924
2940
|
}
|
|
2925
2941
|
}
|
|
2926
2942
|
renderTitle(title, type, bounds, groupEle) {
|
|
2927
|
-
const style =
|
|
2943
|
+
const style = {
|
|
2944
|
+
color: title.textStyle.color, size: title.textStyle.size, fontFamily: title.textStyle.fontFamily,
|
|
2945
|
+
fontStyle: title.textStyle.fontStyle, fontWeight: title.textStyle.fontWeight, opacity: title.textStyle.opacity
|
|
2946
|
+
};
|
|
2928
2947
|
let height;
|
|
2929
2948
|
const titlePadding = 10;
|
|
2930
2949
|
const width = (this.availableSize.width - this.margin.right - this.margin.left);
|
|
2931
|
-
|
|
2932
|
-
|
|
2950
|
+
style.fontFamily = style.fontFamily || this.themeStyle.fontFamily;
|
|
2951
|
+
style.size = style.size || (type === 'title' ? this.themeStyle.fontSize : this.themeStyle.subtitleFontSize);
|
|
2933
2952
|
if (title.text) {
|
|
2934
2953
|
if (isNullOrUndefined(groupEle)) {
|
|
2935
2954
|
groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
|
|
@@ -4081,8 +4100,8 @@ class TreeMapLegend {
|
|
|
4081
4100
|
const shapePadding = legend.shapePadding;
|
|
4082
4101
|
const itemTextStyle = legend.textStyle;
|
|
4083
4102
|
const legendLength = this.legendCollections.length;
|
|
4084
|
-
|
|
4085
|
-
|
|
4103
|
+
itemTextStyle.size = itemTextStyle.size || treemap.themeStyle.legendFontSize;
|
|
4104
|
+
itemTextStyle.fontFamily = itemTextStyle.fontFamily || treemap.themeStyle.fontFamily;
|
|
4086
4105
|
if (legendMode === 'Default') {
|
|
4087
4106
|
legendWidth = (isNullOrUndefined(legendWidth)) ? treemap.areaRect.width : legendWidth;
|
|
4088
4107
|
legendHeight = (isNullOrUndefined(legendHeight)) ? treemap.areaRect.height : legendHeight;
|
|
@@ -4093,7 +4112,7 @@ class TreeMapLegend {
|
|
|
4093
4112
|
if (isNullOrUndefined(this.totalPages[this.page])) {
|
|
4094
4113
|
this.totalPages[this.page] = { Page: (this.page + 1), Collection: [] };
|
|
4095
4114
|
}
|
|
4096
|
-
const legendTextSize = measureText(legendItem['legendName'],
|
|
4115
|
+
const legendTextSize = measureText(legendItem['legendName'], itemTextStyle);
|
|
4097
4116
|
this.textMaxWidth = Math.max(this.textMaxWidth, legendTextSize.width);
|
|
4098
4117
|
if (i === 0) {
|
|
4099
4118
|
startX = shapeX = (leftPadding + (shapeWidth / 2));
|
|
@@ -4190,7 +4209,6 @@ class TreeMapLegend {
|
|
|
4190
4209
|
};
|
|
4191
4210
|
}
|
|
4192
4211
|
else {
|
|
4193
|
-
const itemTextStyle = legend.textStyle;
|
|
4194
4212
|
const legendLength = this.legendCollections.length;
|
|
4195
4213
|
const rectWidth = (orientation === 'Horizontal') ? (isNullOrUndefined(legendWidth)) ? (treemap.areaRect.width / legendLength) :
|
|
4196
4214
|
(legendWidth / legendLength) : (isNullOrUndefined(legendWidth)) ? defaultSize : legendWidth;
|