From 8e2d2c772457ca28f07160f97a72aa725ef6a49e Mon Sep 17 00:00:00 2001 From: tushar-agarwal7 Date: Sat, 12 Oct 2024 08:38:55 +0000 Subject: [PATCH] Adjust font sizes in treemap chart and maintain tooltip functionality --- libs/ui/src/lib/treemap-chart/treemap-chart.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts b/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts index 1f77d69f0..ccc1c9d3b 100644 --- a/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts +++ b/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts @@ -151,16 +151,15 @@ export class GfTreemapChartComponent align: 'left', color: ['white'], display: true, - font: [{ size: 14 }, { size: 14 }, { lineHeight: 2, size: 14 }], + font: { size: 14, lineHeight: 2 }, formatter(ctx) { const netPerformancePercentWithCurrencyEffect = ctx.raw._data.netPerformancePercentWithCurrencyEffect; return [ - ctx.raw._data.symbol, - `${netPerformancePercentWithCurrencyEffect > 0 ? '+' : ''}${(ctx.raw._data.netPerformancePercentWithCurrencyEffect * 100).toFixed(2)}%` + `${(netPerformancePercentWithCurrencyEffect > 0 ? '+' : '')}${(ctx.raw._data.netPerformancePercentWithCurrencyEffect * 100).toFixed(2)}%` ]; }, position: 'top' - }, + }, spacing: 1, tree: this.holdings }