@syncfusion/ej2-treemap 27.1.50 → 27.1.55

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.
@@ -376,7 +376,7 @@ __decorate([
376
376
  Property('TopLeft')
377
377
  ], LeafItemSettings.prototype, "labelPosition", void 0);
378
378
  __decorate([
379
- Complex({ color: null, size: null }, Font)
379
+ Complex({ color: null, size: null, fontFamily: null }, Font)
380
380
  ], LeafItemSettings.prototype, "labelStyle", void 0);
381
381
  __decorate([
382
382
  Property(null)
@@ -502,7 +502,7 @@ __decorate([
502
502
  Property('Near')
503
503
  ], LevelSettings.prototype, "headerAlignment", void 0);
504
504
  __decorate([
505
- Complex({ color: null, size: '13px' }, Font)
505
+ Complex({ color: null, size: '13px', fontFamily: null }, Font)
506
506
  ], LevelSettings.prototype, "headerStyle", void 0);
507
507
  __decorate([
508
508
  Property('TopLeft')
@@ -2326,10 +2326,18 @@ class LayoutPanel {
2326
2326
  renderText = !isLeafItem && childItems && childItems.length > 0 && this.treemap.enableDrillDown ?
2327
2327
  !item['isDrilled'] ? treeMap.enableRtl ? renderText + ' [+]' : '[+] ' + renderText :
2328
2328
  treeMap.enableRtl ? renderText + ' [-]' : '[-] ' + renderText : renderText;
2329
- textStyle = (isLeafItem ? leaf.labelStyle : levels[index].headerStyle);
2330
- textStyle.fontFamily = this.treemap.themeStyle.labelFontFamily || textStyle.fontFamily;
2331
- textStyle.fontWeight = textStyle.fontWeight || this.treemap.themeStyle.fontWeight;
2332
- textStyle.size = textStyle.size || this.treemap.themeStyle.labelFontSize;
2329
+ let fontFamily = (isLeafItem ? leaf.labelStyle.fontFamily : levels[index].headerStyle.fontFamily);
2330
+ fontFamily = fontFamily || this.treemap.themeStyle.labelFontFamily;
2331
+ let size = (isLeafItem ? leaf.labelStyle.size : levels[index].headerStyle.size);
2332
+ size = size || this.treemap.themeStyle.labelFontSize;
2333
+ let fontWeight = (isLeafItem ? leaf.labelStyle.fontWeight : levels[index].headerStyle.fontWeight);
2334
+ fontWeight = fontWeight || this.treemap.themeStyle.fontWeight;
2335
+ const color = (isLeafItem ? leaf.labelStyle.color : levels[index].headerStyle.color);
2336
+ const fontStyle = (isLeafItem ? leaf.labelStyle.fontStyle : levels[index].headerStyle.fontStyle);
2337
+ const textStyleOpacity = (isLeafItem ? leaf.labelStyle.opacity : levels[index].headerStyle.opacity);
2338
+ textStyle = {
2339
+ fontFamily: fontFamily, size: size, fontWeight: fontWeight, color: color, fontStyle: fontStyle, opacity: textStyleOpacity
2340
+ };
2333
2341
  border = isLeafItem ? leaf.border : levels[index].border;
2334
2342
  position = !isLeafItem ? (levels[index].headerAlignment) === 'Near' ? 'TopLeft' : (levels[index].headerAlignment) === 'Center' ?
2335
2343
  'TopCenter' : 'TopRight' : leaf.labelPosition;
@@ -2338,7 +2346,7 @@ class LayoutPanel {
2338
2346
  item['options'] = { border: border, opacity: opacity, fill: fill };
2339
2347
  eventArgs = {
2340
2348
  cancel: false, name: itemRendering, treemap: this.treemap, text: renderText,
2341
- currentItem: item, RenderItems: this.renderItems, options: item['options']
2349
+ currentItem: item, RenderItems: this.renderItems, options: item['options'], textColor: textStyle.color
2342
2350
  };
2343
2351
  this.treemap.trigger(itemRendering, eventArgs, (observedArgs) => {
2344
2352
  if (!observedArgs.cancel) {
@@ -2351,6 +2359,7 @@ class LayoutPanel {
2351
2359
  if (eventArgs.text !== renderText) {
2352
2360
  eventArgs.text = textFormatter(eventArgs.text, item['data'], this.treemap) || levelName;
2353
2361
  }
2362
+ textStyle.color = eventArgs.textColor ? eventArgs.textColor : textStyle.color;
2354
2363
  this.renderItemText(eventArgs.text.toString(), itemGroup, textStyle, rect, interSectAction, groupId, fill, position, connectorText);
2355
2364
  }
2356
2365
  if (template) {
@@ -2608,6 +2617,7 @@ function getThemeStyle(theme) {
2608
2617
  legendFontSize: '13px',
2609
2618
  fontFamily: 'Roboto, Noto, Sans-serif',
2610
2619
  labelFontSize: '12px',
2620
+ labelFontFamily: defaultFont,
2611
2621
  legendBorderColor: '#000000',
2612
2622
  legendBorderWidth: 0
2613
2623
  };
@@ -2629,6 +2639,7 @@ function getThemeStyle(theme) {
2629
2639
  legendFontSize: '13px',
2630
2640
  fontFamily: 'Roboto, Noto, Sans-serif',
2631
2641
  labelFontSize: '12px',
2642
+ labelFontFamily: defaultFont,
2632
2643
  legendBorderColor: '#000000',
2633
2644
  legendBorderWidth: 0
2634
2645
  };
@@ -2936,6 +2947,7 @@ function getThemeStyle(theme) {
2936
2947
  fontWeight: 'Normal',
2937
2948
  subtitleFontSize: '14px',
2938
2949
  legendFontSize: '13px',
2950
+ labelFontFamily: defaultFont,
2939
2951
  fontFamily: 'Roboto, Noto, Sans-serif',
2940
2952
  labelFontSize: '12px',
2941
2953
  legendBorderColor: '#000000',