Bugfix/fix broken allocation charts in presenter view (#6689)

* Fix broken allocation charts in presenter view

* Update changelog

---------

Co-authored-by: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
pull/6673/merge
David Requeno 1 day ago committed by GitHub
parent b994d98359
commit dd31c18e2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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
### Added

@ -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;
}
}

@ -25,11 +25,9 @@
<mat-card-content>
<mat-progress-bar
mode="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"
/>

Loading…
Cancel
Save