From afaf783afb06169566646235b9b1130475a3bd62 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 13 Jul 2025 19:16:28 +0200 Subject: [PATCH] Feature/improve labels of line chart components (#5162) * Improve labels * Update changelog --- CHANGELOG.md | 2 ++ .../asset-profile-dialog/asset-profile-dialog.component.ts | 2 ++ .../asset-profile-dialog/asset-profile-dialog.html | 4 +++- .../holding-detail-dialog.component.ts | 3 +++ .../holding-detail-dialog/holding-detail-dialog.html | 6 ++++-- apps/client/src/app/components/home-market/home-market.html | 2 +- .../app/components/home-overview/home-overview.component.ts | 1 + .../src/app/components/home-overview/home-overview.html | 2 +- apps/client/src/app/components/markets/markets.html | 2 +- .../benchmark-detail-dialog/benchmark-detail-dialog.html | 2 +- libs/ui/src/lib/line-chart/line-chart.component.stories.ts | 4 +++- libs/ui/src/lib/line-chart/line-chart.component.ts | 4 ++-- 12 files changed, 24 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1ce65a87..c94387049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Improved the label for asset profiles with `MANUAL` data source in the chart of the asset profile details dialog in the admin control panel +- Improved the label for asset profiles with `MANUAL` data source in the chart of the holding detail dialog - Improved the language localization for Chinese (`zh`) - Improved the language localization for Dutch (`nl`) - Improved the language localization for French (`fr`) diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts index b9982cc81..400078d79 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts @@ -49,6 +49,7 @@ import { Prisma, SymbolProfile } from '@prisma/client'; +import { isUUID } from 'class-validator'; import { format } from 'date-fns'; import { StatusCodes } from 'http-status-codes'; import { addIcons } from 'ionicons'; @@ -144,6 +145,7 @@ export class AssetProfileDialog implements OnDestroy, OnInit { public isBenchmark = false; public isDataGatheringEnabled: boolean; public isEditAssetProfileIdentifierMode = false; + public isUUID = isUUID; public marketDataItems: MarketData[] = []; public modeValues = [ diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html index 53e87cf45..993cf9b12 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html @@ -72,10 +72,12 @@ [colorScheme]="user?.settings?.colorScheme" [historicalDataItems]="historicalDataItems" [isAnimated]="true" + [label]=" + isUUID(data.symbol) ? (assetProfile?.name ?? data.symbol) : data.symbol + " [locale]="data.locale" [showXAxis]="true" [showYAxis]="true" - [symbol]="data.symbol" />