Browse Source
Bugfix/fix performance chart (#119)
* Fix value of performance chart
* Update changelog
pull/121/head
Thomas
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/portfolio.service.ts
|
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
|
- Introduced a user service implemented as an observable store (single source of truth for state) |
|
|
- Introduced a user service implemented as an observable store (single source of truth for state) |
|
|
|
|
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
|
|
|
|
- Fixed the performance chart by considering the investment |
|
|
|
|
|
|
|
|
## 1.7.0 - 22.05.2021 |
|
|
## 1.7.0 - 22.05.2021 |
|
|
|
|
|
|
|
|
### Changed |
|
|
### Changed |
|
|
|
@ -158,8 +158,8 @@ export class PortfolioService { |
|
|
return { |
|
|
return { |
|
|
date: format(parseISO(portfolioItem.date), 'yyyy-MM-dd'), |
|
|
date: format(parseISO(portfolioItem.date), 'yyyy-MM-dd'), |
|
|
grossPerformancePercent: portfolioItem.grossPerformancePercent, |
|
|
grossPerformancePercent: portfolioItem.grossPerformancePercent, |
|
|
marketPrice: portfolioItem.value || null, |
|
|
marketPrice: portfolioItem.value ?? null, |
|
|
value: portfolioItem.value || null |
|
|
value: portfolioItem.value - portfolioItem.investment ?? null |
|
|
}; |
|
|
}; |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|