Browse Source

Add performance calculation type hint

pull/7896/head
Thomas Kaul 4 weeks ago
parent
commit
d7b85935a7
  1. 2
      apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts
  2. 10
      apps/client/src/app/pages/portfolio/analysis/analysis-page.html

2
apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts

@ -21,6 +21,7 @@ import type {
GroupBy,
ToggleOption
} from '@ghostfolio/common/types';
import { PerformanceCalculationType } from '@ghostfolio/common/types/performance-calculation-type.type';
import { translate } from '@ghostfolio/ui/i18n';
import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator';
import { DataService } from '@ghostfolio/ui/services';
@ -99,6 +100,7 @@ export class GfAnalysisPageComponent implements OnInit {
{ label: $localize`Yearly`, value: 'year' }
];
protected performance: PortfolioPerformance;
protected readonly PerformanceCalculationType = PerformanceCalculationType;
protected performanceDataItems: HistoricalDataItem[];
protected performanceDataItemsInPercentage: HistoricalDataItem[];
protected readonly portfolioEvolutionDataLabel = $localize`Investment`;

10
apps/client/src/app/pages/portfolio/analysis/analysis-page.html

@ -254,6 +254,16 @@
<div class="d-flex ml-3 py-1">
<div class="flex-grow-1 mr-2 text-truncate">
<ng-container i18n>Net Performance</ng-container>
@if (
user?.settings?.performanceCalculationType ===
PerformanceCalculationType.ROAI
) {
<abbr
class="d-none d-sm-inline-block initialism ml-2 text-muted"
title="Return on Average Investment"
>(ROAI)</abbr
>
}
</div>
<div class="d-flex justify-content-end">
<gf-value

Loading…
Cancel
Save