Browse Source

Feature/Simplify labels in treemap chart (#3912)

* Simplify labels in treemap chart

* Update changelog
pull/3909/merge
Tushar Agarwal 3 months ago
committed by GitHub
parent
commit
3289bd5cc9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 3
      libs/ui/src/lib/treemap-chart/treemap-chart.component.ts

1
CHANGELOG.md

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Improved the labels of the chart of the holdings tab on the home page (experimental)
- Exposed the timeout of the portfolio snapshot computation as an environment variable (`PROCESSOR_PORTFOLIO_SNAPSHOT_COMPUTATION_TIMEOUT`) - Exposed the timeout of the portfolio snapshot computation as an environment variable (`PROCESSOR_PORTFOLIO_SNAPSHOT_COMPUTATION_TIMEOUT`)
- Improved the portfolio unit tests to work with exported activity files - Improved the portfolio unit tests to work with exported activity files

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

@ -151,13 +151,12 @@ export class GfTreemapChartComponent
align: 'left', align: 'left',
color: ['white'], color: ['white'],
display: true, display: true,
font: [{ size: 14 }, { size: 11 }, { lineHeight: 2, size: 14 }], font: [{ size: 16 }, { lineHeight: 1.5, size: 14 }],
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, ctx.raw._data.symbol,
`${netPerformancePercentWithCurrencyEffect > 0 ? '+' : ''}${(ctx.raw._data.netPerformancePercentWithCurrencyEffect * 100).toFixed(2)}%` `${netPerformancePercentWithCurrencyEffect > 0 ? '+' : ''}${(ctx.raw._data.netPerformancePercentWithCurrencyEffect * 100).toFixed(2)}%`
]; ];

Loading…
Cancel
Save