Bugfix/fix gaps in portfolio performance charts (#3311)
* Fix gaps in charts * Update changelog
This commit is contained in:
parent
895c4fe299
commit
551b83a6e3
@ -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…
x
Reference in New Issue
Block a user