diff --git a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html index eab89f53d..5d881c604 100644 --- a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html +++ b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html @@ -3,7 +3,14 @@
- Performance + Performance + {{ + user?.settings?.performanceCalculationType === 'ROI' + ? '(Time-Weighted)' + : '' + }} @if (user?.subscription?.type === 'Basic') { } diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index cead3827e..12c5ba424 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -17,6 +17,7 @@ import type { DateRange, GroupBy } from '@ghostfolio/common/types'; +import { PerformanceCalculationType } from '@ghostfolio/common/types/performance-calculation-type.type'; import { translate } from '@ghostfolio/ui/i18n'; import { Clipboard } from '@angular/cdk/clipboard'; @@ -305,6 +306,7 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { { date, netPerformanceInPercentageWithCurrencyEffect, + timeWeightedPerformanceInPercentageWithCurrencyEffect, totalInvestmentValueWithCurrencyEffect, valueInPercentage, valueWithCurrencyEffect @@ -325,7 +327,11 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { } this.performanceDataItemsInPercentage.push({ date, - value: netPerformanceInPercentageWithCurrencyEffect + value: + this.user?.settings?.performanceCalculationType === + PerformanceCalculationType.ROI + ? timeWeightedPerformanceInPercentageWithCurrencyEffect + : netPerformanceInPercentageWithCurrencyEffect }); }