Browse Source
Merge branch 'main' into feature/improve-handling-of-platforms-in-accounts-import
pull/1820/head
Thomas Kaul
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
18 additions and
11 deletions
-
CHANGELOG.md
-
apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
|
### Changed |
|
|
### Changed |
|
|
|
|
|
|
|
|
|
|
|
- Improved the portfolio evolution chart (ignore first item) |
|
|
- Improved the accounts import by handling the platform |
|
|
- Improved the accounts import by handling the platform |
|
|
|
|
|
|
|
|
### Fixed |
|
|
### Fixed |
|
|
|
@ -308,18 +308,24 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { |
|
|
this.performanceDataItems = []; |
|
|
this.performanceDataItems = []; |
|
|
this.performanceDataItemsInPercentage = []; |
|
|
this.performanceDataItemsInPercentage = []; |
|
|
|
|
|
|
|
|
for (const { |
|
|
for (const [ |
|
|
|
|
|
index, |
|
|
|
|
|
{ |
|
|
date, |
|
|
date, |
|
|
netPerformanceInPercentage, |
|
|
netPerformanceInPercentage, |
|
|
totalInvestment, |
|
|
totalInvestment, |
|
|
value, |
|
|
value, |
|
|
valueInPercentage |
|
|
valueInPercentage |
|
|
} of chart) { |
|
|
} |
|
|
|
|
|
] of chart.entries()) { |
|
|
|
|
|
if (index > 0 || this.user?.settings?.dateRange === 'max') { |
|
|
|
|
|
// Ignore first item where value is 0
|
|
|
this.investments.push({ date, investment: totalInvestment }); |
|
|
this.investments.push({ date, investment: totalInvestment }); |
|
|
this.performanceDataItems.push({ |
|
|
this.performanceDataItems.push({ |
|
|
date, |
|
|
date, |
|
|
value: isNumber(value) ? value : valueInPercentage |
|
|
value: isNumber(value) ? value : valueInPercentage |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|
this.performanceDataItemsInPercentage.push({ |
|
|
this.performanceDataItemsInPercentage.push({ |
|
|
date, |
|
|
date, |
|
|
value: netPerformanceInPercentage |
|
|
value: netPerformanceInPercentage |
|
|