Browse Source

Fix missing first data point in portfolio evolution chart

pull/8089/head
Thomas Kaul 1 week ago
parent
commit
8f9a0cd8b7
  1. 10
      apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts

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

@ -329,19 +329,14 @@ export class GfAnalysisPageComponent implements OnInit {
this.performanceDataItems = [];
this.performanceDataItemsInPercentage = [];
for (const [
index,
{
for (const {
date,
dividendInPercentageWithCurrencyEffect,
netPerformanceInPercentageWithCurrencyEffect,
totalInvestmentValueWithCurrencyEffect,
valueInPercentage,
valueWithCurrencyEffect
}
] of (chart ?? []).entries()) {
// Ignore first item where value is 0
if (index > 0 || this.user?.settings?.dateRange === 'max') {
} of chart ?? []) {
if (totalInvestmentValueWithCurrencyEffect !== undefined) {
this.investments.push({
date,
@ -359,7 +354,6 @@ export class GfAnalysisPageComponent implements OnInit {
value
});
}
}
if (isNumber(netPerformanceInPercentageWithCurrencyEffect)) {
this.performanceDataItemsInPercentage.push({

Loading…
Cancel
Save