@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
|
@@ -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({
|
|
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({
|
|
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({
|
|
324
|
+
Complex({ fontFamily: null }, Font)
|
|
325
325
|
], LegendSettings.prototype, "textStyle", void 0);
|
|
326
326
|
__decorate$1([
|
|
327
327
|
Property(null)
|
|
@@ -2434,6 +2434,9 @@ function getThemeStyle(theme) {
|
|
|
2434
2434
|
tooltipFontColor: '#ffffff',
|
|
2435
2435
|
legendTitleColor: '#DADADA',
|
|
2436
2436
|
legendTextColor: '#DADADA',
|
|
2437
|
+
fontSize: '15px',
|
|
2438
|
+
subtitleFontSize: '14px',
|
|
2439
|
+
legendFontSize: '13px',
|
|
2437
2440
|
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
2438
2441
|
};
|
|
2439
2442
|
break;
|
|
@@ -2446,6 +2449,9 @@ function getThemeStyle(theme) {
|
|
|
2446
2449
|
tooltipFontColor: '#ffffff',
|
|
2447
2450
|
legendTitleColor: '#FFFFFF',
|
|
2448
2451
|
legendTextColor: '#FFFFFF',
|
|
2452
|
+
fontSize: '15px',
|
|
2453
|
+
subtitleFontSize: '14px',
|
|
2454
|
+
legendFontSize: '13px',
|
|
2449
2455
|
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
2450
2456
|
};
|
|
2451
2457
|
break;
|
|
@@ -2462,6 +2468,7 @@ function getThemeStyle(theme) {
|
|
|
2462
2468
|
legendTextColor: '#212529',
|
|
2463
2469
|
fontFamily: 'HelveticaNeue-Medium',
|
|
2464
2470
|
fontSize: '16px',
|
|
2471
|
+
subtitleFontSize: '14px',
|
|
2465
2472
|
legendFontSize: '14px',
|
|
2466
2473
|
labelFontFamily: 'HelveticaNeue'
|
|
2467
2474
|
};
|
|
@@ -2479,6 +2486,7 @@ function getThemeStyle(theme) {
|
|
|
2479
2486
|
legendTextColor: '#374151',
|
|
2480
2487
|
fontFamily: 'Inter',
|
|
2481
2488
|
fontSize: '14px',
|
|
2489
|
+
subtitleFontSize: '12px',
|
|
2482
2490
|
legendFontSize: '12px',
|
|
2483
2491
|
labelFontFamily: 'Inter'
|
|
2484
2492
|
};
|
|
@@ -2496,6 +2504,7 @@ function getThemeStyle(theme) {
|
|
|
2496
2504
|
legendTextColor: '#D1D5DB',
|
|
2497
2505
|
fontFamily: 'Inter',
|
|
2498
2506
|
fontSize: '14px',
|
|
2507
|
+
subtitleFontSize: '12px',
|
|
2499
2508
|
legendFontSize: '12px',
|
|
2500
2509
|
labelFontFamily: 'Inter'
|
|
2501
2510
|
};
|
|
@@ -2513,6 +2522,7 @@ function getThemeStyle(theme) {
|
|
|
2513
2522
|
legendTextColor: '#212529',
|
|
2514
2523
|
fontFamily: 'Helvetica Neue',
|
|
2515
2524
|
fontSize: '14px',
|
|
2525
|
+
subtitleFontSize: '12px',
|
|
2516
2526
|
legendFontSize: '12px',
|
|
2517
2527
|
labelFontFamily: 'Helvetica Neue'
|
|
2518
2528
|
};
|
|
@@ -2530,6 +2540,7 @@ function getThemeStyle(theme) {
|
|
|
2530
2540
|
legendTextColor: '#FFFFFF',
|
|
2531
2541
|
fontFamily: 'Helvetica Neue',
|
|
2532
2542
|
fontSize: '14px',
|
|
2543
|
+
subtitleFontSize: '12px',
|
|
2533
2544
|
legendFontSize: '12px',
|
|
2534
2545
|
labelFontFamily: 'Helvetica Neue'
|
|
2535
2546
|
};
|
|
@@ -2547,6 +2558,7 @@ function getThemeStyle(theme) {
|
|
|
2547
2558
|
legendTextColor: '#201F1E',
|
|
2548
2559
|
fontFamily: 'Segoe UI',
|
|
2549
2560
|
fontSize: '14px',
|
|
2561
|
+
subtitleFontSize: '12px',
|
|
2550
2562
|
legendFontSize: '12px',
|
|
2551
2563
|
labelFontFamily: 'Segoe UI'
|
|
2552
2564
|
};
|
|
@@ -2564,6 +2576,7 @@ function getThemeStyle(theme) {
|
|
|
2564
2576
|
legendTextColor: '#F3F2F1',
|
|
2565
2577
|
fontFamily: 'Segoe UI',
|
|
2566
2578
|
fontSize: '14px',
|
|
2579
|
+
subtitleFontSize: '12px',
|
|
2567
2580
|
legendFontSize: '12px',
|
|
2568
2581
|
labelFontFamily: 'Segoe UI'
|
|
2569
2582
|
};
|
|
@@ -2577,6 +2590,9 @@ function getThemeStyle(theme) {
|
|
|
2577
2590
|
tooltipFontColor: '#ffffff',
|
|
2578
2591
|
legendTitleColor: '#353535',
|
|
2579
2592
|
legendTextColor: '#353535',
|
|
2593
|
+
fontSize: '15px',
|
|
2594
|
+
subtitleFontSize: '14px',
|
|
2595
|
+
legendFontSize: '13px',
|
|
2580
2596
|
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
2581
2597
|
};
|
|
2582
2598
|
break;
|
|
@@ -3047,12 +3063,15 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3047
3063
|
}
|
|
3048
3064
|
};
|
|
3049
3065
|
TreeMap.prototype.renderTitle = function (title, type, bounds, groupEle) {
|
|
3050
|
-
var style =
|
|
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
|
+
};
|
|
3051
3070
|
var height;
|
|
3052
3071
|
var titlePadding = 10;
|
|
3053
3072
|
var width = (this.availableSize.width - this.margin.right - this.margin.left);
|
|
3054
|
-
|
|
3055
|
-
|
|
3073
|
+
style.fontFamily = style.fontFamily || this.themeStyle.fontFamily;
|
|
3074
|
+
style.size = style.size || (type === 'title' ? this.themeStyle.fontSize : this.themeStyle.subtitleFontSize);
|
|
3056
3075
|
if (title.text) {
|
|
3057
3076
|
if (isNullOrUndefined(groupEle)) {
|
|
3058
3077
|
groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
|
|
@@ -4224,8 +4243,8 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4224
4243
|
var shapePadding = legend.shapePadding;
|
|
4225
4244
|
var itemTextStyle = legend.textStyle;
|
|
4226
4245
|
var legendLength = this.legendCollections.length;
|
|
4227
|
-
|
|
4228
|
-
|
|
4246
|
+
itemTextStyle.size = itemTextStyle.size || treemap.themeStyle.legendFontSize;
|
|
4247
|
+
itemTextStyle.fontFamily = itemTextStyle.fontFamily || treemap.themeStyle.fontFamily;
|
|
4229
4248
|
if (legendMode === 'Default') {
|
|
4230
4249
|
legendWidth = (isNullOrUndefined(legendWidth)) ? treemap.areaRect.width : legendWidth;
|
|
4231
4250
|
legendHeight = (isNullOrUndefined(legendHeight)) ? treemap.areaRect.height : legendHeight;
|
|
@@ -4236,7 +4255,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4236
4255
|
if (isNullOrUndefined(this.totalPages[this.page])) {
|
|
4237
4256
|
this.totalPages[this.page] = { Page: (this.page + 1), Collection: [] };
|
|
4238
4257
|
}
|
|
4239
|
-
var legendTextSize = measureText(legendItem['legendName'],
|
|
4258
|
+
var legendTextSize = measureText(legendItem['legendName'], itemTextStyle);
|
|
4240
4259
|
this.textMaxWidth = Math.max(this.textMaxWidth, legendTextSize.width);
|
|
4241
4260
|
if (i === 0) {
|
|
4242
4261
|
startX_1 = shapeX = (leftPadding + (shapeWidth / 2));
|
|
@@ -4333,7 +4352,6 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4333
4352
|
};
|
|
4334
4353
|
}
|
|
4335
4354
|
else {
|
|
4336
|
-
var itemTextStyle_1 = legend.textStyle;
|
|
4337
4355
|
var legendLength_1 = this.legendCollections.length;
|
|
4338
4356
|
var rectWidth_1 = (orientation_1 === 'Horizontal') ? (isNullOrUndefined(legendWidth)) ? (treemap.areaRect.width / legendLength_1) :
|
|
4339
4357
|
(legendWidth / legendLength_1) : (isNullOrUndefined(legendWidth)) ? defaultSize : legendWidth;
|
|
@@ -4354,11 +4372,11 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4354
4372
|
var legendText = this.legendCollections[i]['legendName'];
|
|
4355
4373
|
var itemTextSize = new Size(0, 0);
|
|
4356
4374
|
if (labelAction === 'None') {
|
|
4357
|
-
itemTextSize = measureText(legendText,
|
|
4375
|
+
itemTextSize = measureText(legendText, itemTextStyle);
|
|
4358
4376
|
}
|
|
4359
4377
|
else if (labelAction === 'Trim') {
|
|
4360
|
-
legendText = textTrim((orientation_1 === 'Horizontal' ? rectWidth_1 : rectHeight_1), legendText,
|
|
4361
|
-
itemTextSize = measureText(legendText,
|
|
4378
|
+
legendText = textTrim((orientation_1 === 'Horizontal' ? rectWidth_1 : rectHeight_1), legendText, itemTextStyle);
|
|
4379
|
+
itemTextSize = measureText(legendText, itemTextStyle);
|
|
4362
4380
|
}
|
|
4363
4381
|
else {
|
|
4364
4382
|
legendText = '';
|