diff --git a/CHANGELOG.md b/CHANGELOG.md index ccfc78976..fa0a2b53b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Introduced a user service implemented as an observable store (single source of truth for state) +### Fixed + +- Fixed the performance chart by considering the investment + ## 1.7.0 - 22.05.2021 ### Changed diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 6ce441907..b13f4b88b 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -158,8 +158,8 @@ export class PortfolioService { return { date: format(parseISO(portfolioItem.date), 'yyyy-MM-dd'), grossPerformancePercent: portfolioItem.grossPerformancePercent, - marketPrice: portfolioItem.value || null, - value: portfolioItem.value || null + marketPrice: portfolioItem.value ?? null, + value: portfolioItem.value - portfolioItem.investment ?? null }; }); }