Browse Source

Bugfix/missing first data point in portfolio evolution chart (#8089)

* Fix missing first data point in portfolio evolution chart

* Update changelog
pull/8096/head^2
Thomas Kaul 1 day ago
committed by GitHub
parent
commit
696d5d9882
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 10
      apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts

4
CHANGELOG.md

@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the language localization for Spanish (`es`) - Improved the language localization for Spanish (`es`)
### Fixed
- Fixed the missing first data point in the portfolio evolution chart on the analysis page
## 3.81.0 - 2026-10-07 ## 3.81.0 - 2026-10-07
### Changed ### Changed

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

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

Loading…
Cancel
Save