Browse Source

Simplify labels in treemap chart

pull/3912/head
tushar-agarwal7 11 months ago
parent
commit
9431db7378
  1. 8
      libs/ui/src/lib/treemap-chart/treemap-chart.component.ts

8
libs/ui/src/lib/treemap-chart/treemap-chart.component.ts

@ -155,13 +155,13 @@ export class GfTreemapChartComponent
formatter(ctx) { formatter(ctx) {
const netPerformancePercentWithCurrencyEffect = const netPerformancePercentWithCurrencyEffect =
ctx.raw._data.netPerformancePercentWithCurrencyEffect; ctx.raw._data.netPerformancePercentWithCurrencyEffect;
return [ return [
ctx.raw._data.name, ctx.raw._data.symbol, // Only show the symbol
ctx.raw._data.symbol,
`${netPerformancePercentWithCurrencyEffect > 0 ? '+' : ''}${(ctx.raw._data.netPerformancePercentWithCurrencyEffect * 100).toFixed(2)}%` `${netPerformancePercentWithCurrencyEffect > 0 ? '+' : ''}${(ctx.raw._data.netPerformancePercentWithCurrencyEffect * 100).toFixed(2)}%`
]; ];
}, }
,
position: 'top' position: 'top'
}, },
spacing: 1, spacing: 1,

Loading…
Cancel
Save