Bugfix/fix gaps in portfolio performance charts (#3311)

* Fix gaps in charts

* Update changelog
pull/3312/head
Thomas Kaul 8 months ago committed by GitHub
parent 895c4fe299
commit 551b83a6e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Upgraded `angular` from version `17.3.3` to `17.3.5`
- Upgraded `Nx` from version `18.2.3` to `18.3.3`
### Fixed
- Fixed gaps in the portfolio performance charts by considering `BUY` and `SELL` activities
## 2.73.0 - 2024-04-17
### Added

@ -334,8 +334,10 @@ export class TWRPortfolioCalculator extends PortfolioCalculator {
if (isChartMode) {
const datesWithOrders = {};
for (const order of orders) {
datesWithOrders[order.date] = true;
for (const { date, type } of orders) {
if (['BUY', 'SELL'].includes(type)) {
datesWithOrders[date] = true;
}
}
while (isBefore(day, end)) {

Loading…
Cancel
Save