| 
						
						
							
								
							
						
						
					 | 
					@ -40,11 +40,11 @@ import 'chartjs-adapter-date-fns'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import annotationPlugin from 'chartjs-plugin-annotation'; | 
					 | 
					 | 
					import annotationPlugin from 'chartjs-plugin-annotation'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { | 
					 | 
					 | 
					import { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  isAfter, | 
					 | 
					 | 
					  isAfter, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  subDays, | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  subYears, | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  startOfMonth, | 
					 | 
					 | 
					  startOfMonth, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  startOfWeek, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  startOfYear, | 
					 | 
					 | 
					  startOfYear, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					  startOfWeek | 
					 | 
					 | 
					  subDays, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  subYears | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} from 'date-fns'; | 
					 | 
					 | 
					} from 'date-fns'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					@Component({ | 
					 | 
					 | 
					@Component({ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -280,7 +280,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  private getChartXAxis() { | 
					 | 
					 | 
					  private getChartXAxis() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    let min: number; | 
					 | 
					 | 
					    let min: number | undefined; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    let unit: 'day' | 'month' | 'week' | 'year' = 'year'; | 
					 | 
					 | 
					    let unit: 'day' | 'month' | 'week' | 'year' = 'year'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    switch (this.dateRange) { | 
					 | 
					 | 
					    switch (this.dateRange) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -293,7 +293,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        unit = 'day'; | 
					 | 
					 | 
					        unit = 'day'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        break; | 
					 | 
					 | 
					        break; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      case 'wtd': | 
					 | 
					 | 
					      case 'wtd': | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        min = startOfWeek(new Date()).getTime(); | 
					 | 
					 | 
					        min = startOfWeek(new Date(), { weekStartsOn: 1 }).getTime(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        unit = 'day'; | 
					 | 
					 | 
					        unit = 'day'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        break; | 
					 | 
					 | 
					        break; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      case 'ytd': | 
					 | 
					 | 
					      case 'ytd': | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -308,9 +308,28 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        min = subYears(new Date(), 5).getTime(); | 
					 | 
					 | 
					        min = subYears(new Date(), 5).getTime(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        unit = 'year'; | 
					 | 
					 | 
					        unit = 'year'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        break; | 
					 | 
					 | 
					        break; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      case 'max': | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        // For 'max', we don't set a min value to show all available data
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        // Use 'year' unit for better scale with long-term data
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        unit = 'year'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        break; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      default: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        // For any other value (like specific years), use year unit
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        unit = 'year'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        break; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    return { | 
					 | 
					 | 
					    const config: any = { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      type: 'time', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      time: { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        unit, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        // Add display formats for better readability
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        displayFormats: { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          day: 'MMM d', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          month: 'MMM yyyy', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          year: 'yyyy' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      border: { | 
					 | 
					 | 
					      border: { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        color: `rgba(${getTextColor(this.colorScheme)}, 0.1)`, | 
					 | 
					 | 
					        color: `rgba(${getTextColor(this.colorScheme)}, 0.1)`, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        width: this.groupBy ? 0 : 1 | 
					 | 
					 | 
					        width: this.groupBy ? 0 : 1 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -318,13 +337,15 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      display: true, | 
					 | 
					 | 
					      display: true, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      grid: { | 
					 | 
					 | 
					      grid: { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        display: false | 
					 | 
					 | 
					        display: false | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      }, | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      min, | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      type: 'time', | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      time: { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        unit | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      } | 
					 | 
					 | 
					      } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }; | 
					 | 
					 | 
					    }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    // Only add min if it's defined (not for 'max' range)
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    if (min !== undefined) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      config.min = min; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    return config; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  private getTooltipPluginConfiguration() { | 
					 | 
					 | 
					  private getTooltipPluginConfiguration() { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |