Browse Source
			
			
			Bugfix/fix gaps in portfolio performance charts (#3311)
			
				* Fix gaps in charts
* Update changelog
			
			
				pull/3312/head
			
			
		 
		
			
				
					
						
						Thomas Kaul
					
					2 years ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: B5690EEEBB952194
						
					
				
			
		
		
		
	
		
			
				 2 changed files with 
8 additions and 
2 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
 
			
				- 
					
					
					 
					apps/api/src/app/portfolio/calculator/twr/portfolio-calculator.ts
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
					@ -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 `angular` from version `17.3.3` to `17.3.5` | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					- Upgraded `Nx` from version `18.2.3` to `18.3.3` | 
					 | 
					 | 
					- 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 | 
					 | 
					 | 
					## 2.73.0 - 2024-04-17 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					### Added | 
					 | 
					 | 
					### Added | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
					@ -334,8 +334,10 @@ export class TWRPortfolioCalculator extends PortfolioCalculator { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    if (isChartMode) { | 
					 | 
					 | 
					    if (isChartMode) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      const datesWithOrders = {}; | 
					 | 
					 | 
					      const datesWithOrders = {}; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      for (const order of orders) { | 
					 | 
					 | 
					      for (const { date, type } of orders) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        datesWithOrders[order.date] = true; | 
					 | 
					 | 
					        if (['BUY', 'SELL'].includes(type)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          datesWithOrders[date] = true; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      } | 
					 | 
					 | 
					      } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      while (isBefore(day, end)) { | 
					 | 
					 | 
					      while (isBefore(day, end)) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |