Feature/add allocations by market chart (#2171)

* Add allocations by (advanced) market

* Fix public page

* Update changelog
This commit is contained in:
Thomas Kaul
2023-07-24 20:04:34 +02:00
committed by GitHub
parent 16b9fbe00e
commit 622bb8b0cf
20 changed files with 860 additions and 479 deletions

View File

@@ -1,6 +1,6 @@
import { AssetClass, AssetSubClass, DataSource, Tag } from '@prisma/client';
import { Market, MarketState } from '../types';
import { Market, MarketAdvanced, MarketState } from '../types';
import { Country } from './country.interface';
import { Sector } from './sector.interface';
@@ -20,6 +20,7 @@ export interface PortfolioPosition {
marketChangePercent?: number;
marketPrice: number;
markets?: { [key in Market]: number };
marketsAdvanced?: { [key in MarketAdvanced]: number };
marketState: MarketState;
name: string;
netPerformance: number;

View File

@@ -5,6 +5,7 @@ import type { ColorScheme } from './color-scheme.type';
import type { DateRange } from './date-range.type';
import type { Granularity } from './granularity.type';
import type { GroupBy } from './group-by.type';
import type { MarketAdvanced } from './market-advanced.type';
import type { MarketDataPreset } from './market-data-preset.type';
import type { MarketState } from './market-state.type';
import type { Market } from './market.type';
@@ -24,6 +25,7 @@ export type {
Granularity,
GroupBy,
Market,
MarketAdvanced,
MarketDataPreset,
MarketState,
OrderWithAccount,

View File

@@ -0,0 +1,7 @@
export type MarketAdvanced =
| 'asiaPacific'
| 'emergingMarkets'
| 'europe'
| 'japan'
| 'northAmerica'
| 'otherMarkets';