Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Bugfix/fix broken allocation charts in presenter view (#6689)
David Requenodd31c18e2dce
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d6a5392436..dff59ac5ae 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -17,6 +17,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Extended the terms of service for the _Ghostfolio_ SaaS (cloud) to include _Paid Plans_ and _Refund Policy_- Upgraded `prisma` from version `6.19.0` to `6.19.3`+### Fixed++- Fixed the allocations by account chart on the allocations page in the _Presenter View_+- Fixed the allocations by asset class chart on the allocations page in the _Presenter View_+- Fixed the allocations by currency chart on the allocations page in the _Presenter View_+- Fixed the allocations by ETF provider chart on the allocations page in the _Presenter View_+- Fixed the allocations by platform chart on the allocations page in the _Presenter View_+## 2.252.0 - 2026-03-02### Addeddiff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.tsindex 367716d2df..b0282c937e 100644--- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts@@ -159,10 +159,9 @@ export class GfAllocationsPageComponent implements OnInit {if (state?.user) {this.user = state.user;- this.worldMapChartFormat =- this.hasImpersonationId || this.user.settings.isRestrictedView- ? `{0}%`- : `{0} ${this.user?.settings?.baseCurrency}`;+ this.worldMapChartFormat = this.showValuesInPercentage()+ ? `{0}%`+ : `{0} ${this.user?.settings?.baseCurrency}`;this.isLoading = true;@@ -310,7 +309,7 @@ export class GfAllocationsPageComponent implements OnInit {] of Object.entries(this.portfolioDetails.accounts)) {let value = 0;- if (this.hasImpersonationId) {+ if (this.showValuesInPercentage()) {value = valueInPercentage;} else {value = valueInBaseCurrency;@@ -328,7 +327,7 @@ export class GfAllocationsPageComponent implements OnInit {)) {let value = 0;- if (this.hasImpersonationId) {+ if (this.showValuesInPercentage()) {value = position.allocationInPercentage;} else {value = position.valueInBaseCurrency;@@ -491,7 +490,7 @@ export class GfAllocationsPageComponent implements OnInit {] of Object.entries(this.portfolioDetails.platforms)) {let value = 0;- if (this.hasImpersonationId) {+ if (this.showValuesInPercentage()) {value = valueInPercentage;} else {value = valueInBaseCurrency;@@ -506,7 +505,7 @@ export class GfAllocationsPageComponent implements OnInit {this.topHoldings = Object.values(this.topHoldingsMap).map(({ name, value }) => {- if (this.hasImpersonationId || this.user.settings.isRestrictedView) {+ if (this.showValuesInPercentage()) {return {name,allocationInPercentage: value,@@ -597,4 +596,8 @@ export class GfAllocationsPageComponent implements OnInit {this.router.navigate(['.'], { relativeTo: this.route });});}++ public showValuesInPercentage() {+ return this.hasImpersonationId || this.user?.settings?.isRestrictedView;+ }}diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.html b/apps/client/src/app/pages/portfolio/allocations/allocations-page.htmlindex 8d55038405..0b75c6d8f2 100644--- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.html+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.html@@ -25,11 +25,9 @@<mat-card-content><mat-progress-barmode="determinate"- [title]="- `${(- portfolioDetails?.summary?.filteredValueInPercentage * 100- ).toFixed(2)}%`- "+ [title]="`${(+ portfolioDetails?.summary?.filteredValueInPercentage * 100+ ).toFixed(2)}%`"[value]="portfolioDetails?.summary?.filteredValueInPercentage * 100"/></mat-card-content>@@ -49,7 +47,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="platforms"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[keys]="['id']"[locale]="user?.settings?.locale"/>@@ -71,7 +69,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="holdings"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[keys]="['currency']"[locale]="user?.settings?.locale"/>@@ -93,7 +91,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="holdings"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[keys]="['assetClassLabel', 'assetSubClassLabel']"[locale]="user?.settings?.locale"/>@@ -114,7 +112,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="symbols"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[keys]="['symbol']"[locale]="user?.settings?.locale"[showLabels]="deviceType !== 'mobile'"@@ -138,7 +136,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="sectors"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[keys]="['name']"[locale]="user?.settings?.locale"[maxItems]="10"@@ -161,7 +159,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="continents"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[keys]="['name']"[locale]="user?.settings?.locale"/>@@ -183,7 +181,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="marketsAdvanced"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[locale]="user?.settings?.locale"/></mat-card-content>@@ -206,9 +204,7 @@<gf-world-map-chart[countries]="countries"[format]="worldMapChartFormat"- [isInPercent]="- hasImpersonationId || user.settings.isRestrictedView- "+ [isInPercent]="showValuesInPercentage()"[locale]="user?.settings?.locale"/></div>@@ -272,7 +268,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="countries"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[keys]="['name']"[locale]="user?.settings?.locale"[maxItems]="10"@@ -291,7 +287,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="accounts"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[keys]="['id']"[locale]="user?.settings?.locale"(proportionChartClicked)="onAccountChartClicked($event)"@@ -314,7 +310,7 @@[baseCurrency]="user?.settings?.baseCurrency"[colorScheme]="user?.settings?.colorScheme"[data]="holdings"- [isInPercent]="hasImpersonationId || user.settings.isRestrictedView"+ [isInPercent]="showValuesInPercentage()"[keys]="['etfProvider']"[locale]="user?.settings?.locale"/>