diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bbf8f58..c31e65a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. 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 + +### Changed + +- Increased the historical data chart of the _Fear & Greed Index_ (market mood) to 30 days + ## 1.93.0 - 21.12.2021 ### Added diff --git a/apps/api/src/app/symbol/symbol.service.ts b/apps/api/src/app/symbol/symbol.service.ts index 2649ef5d..b120d7ea 100644 --- a/apps/api/src/app/symbol/symbol.service.ts +++ b/apps/api/src/app/symbol/symbol.service.ts @@ -8,7 +8,7 @@ import { MarketDataService } from '@ghostfolio/api/services/market-data.service' import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { DATE_FORMAT } from '@ghostfolio/common/helper'; import { Injectable, Logger } from '@nestjs/common'; -import { DataSource, MarketData } from '@prisma/client'; +import { DataSource } from '@prisma/client'; import { format, subDays } from 'date-fns'; import { LookupItem } from './interfaces/lookup-item.interface'; @@ -36,17 +36,17 @@ export class SymbolService { let historicalData: HistoricalDataItem[]; if (includeHistoricalData) { - const days = 10; + const days = 30; const marketData = await this.marketDataService.getRange({ dateQuery: { gte: subDays(new Date(), days) }, symbols: [dataGatheringItem.symbol] }); - historicalData = marketData.map(({ date, marketPrice }) => { + historicalData = marketData.map(({ date, marketPrice: value }) => { return { - date: date.toISOString(), - value: marketPrice + value, + date: date.toISOString() }; }); } diff --git a/apps/client/src/app/components/home-market/home-market.html b/apps/client/src/app/components/home-market/home-market.html index c721d4c7..0ef4b5ef 100644 --- a/apps/client/src/app/components/home-market/home-market.html +++ b/apps/client/src/app/components/home-market/home-market.html @@ -12,7 +12,7 @@
- Last 10 Days + Last 30 Days