diff --git a/CHANGELOG.md b/CHANGELOG.md index cc3e201d9..a60ec5dee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased -- Refactored the investment chart component to standalone ### Changed - Refactored the header component to standalone +- Refactored the investment chart component to standalone ## 2.197.0 - 2025-09-07 diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts index 28d53891a..f493db926 100644 --- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts +++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts @@ -2,6 +2,7 @@ import { CreateAccountBalanceDto } from '@ghostfolio/api/app/account-balance/cre import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface'; import { GfDialogFooterComponent } from '@ghostfolio/client/components/dialog-footer/dialog-footer.component'; import { GfDialogHeaderComponent } from '@ghostfolio/client/components/dialog-header/dialog-header.component'; +import { GfInvestmentChartComponent } from '../investment-chart/investment-chart.component'; import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { NUMERICAL_PRECISION_THRESHOLD_6_FIGURES } from '@ghostfolio/common/config'; @@ -63,6 +64,7 @@ import { AccountDetailDialogParams } from './interfaces/interfaces'; GfDialogFooterComponent, GfDialogHeaderComponent, GfHoldingsTableComponent, + GfInvestmentChartComponent, GfValueComponent, IonIcon, MatButtonModule, diff --git a/apps/client/src/app/components/investment-chart/investment-chart.component.ts b/apps/client/src/app/components/investment-chart/investment-chart.component.ts index a41185e98..05a481508 100644 --- a/apps/client/src/app/components/investment-chart/investment-chart.component.ts +++ b/apps/client/src/app/components/investment-chart/investment-chart.component.ts @@ -16,6 +16,7 @@ import { LineChartItem } from '@ghostfolio/common/interfaces'; import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface'; import { ColorScheme, GroupBy } from '@ghostfolio/common/types'; +import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, Component, @@ -24,7 +25,6 @@ import { OnDestroy, ViewChild } from '@angular/core'; -import { CommonModule } from '@angular/common'; import { BarController, BarElement, @@ -44,13 +44,13 @@ import { isAfter } from 'date-fns'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; @Component({ - selector: 'gf-investment-chart', changeDetection: ChangeDetectionStrategy.OnPush, - templateUrl: './investment-chart.component.html', + imports: [CommonModule, NgxSkeletonLoaderModule], + selector: 'gf-investment-chart', styleUrls: ['./investment-chart.component.scss'], - imports: [CommonModule, NgxSkeletonLoaderModule] + templateUrl: './investment-chart.component.html' }) -export class InvestmentChartComponent implements OnChanges, OnDestroy { +export class GfInvestmentChartComponent implements OnChanges, OnDestroy { @Input() benchmarkDataItems: InvestmentItem[] = []; @Input() benchmarkDataLabel = ''; @Input() colorScheme: ColorScheme; diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index 36cd09056..26d474f73 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -1,4 +1,5 @@ import { GfBenchmarkComparatorComponent } from '@ghostfolio/client/components/benchmark-comparator/benchmark-comparator.component'; +import { GfInvestmentChartComponent } from '@ghostfolio/client/components/investment-chart/investment-chart.component'; import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; @@ -46,6 +47,7 @@ import { takeUntil } from 'rxjs/operators'; @Component({ imports: [ GfBenchmarkComparatorComponent, + GfInvestmentChartComponent, GfPremiumIndicatorComponent, GfToggleComponent, GfValueComponent,