Bugfix/fix performance chart (#119)
* Fix value of performance chart * Update changelog
This commit is contained in:
parent
95bcdea69b
commit
8e13f6ef9b
@ -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
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user