From 4ea744ce62692c2be246feaf1fcb69799ed2172f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A8=B8=EB=8B=88=ED=8E=98=EB=8B=88?= Date: Wed, 18 Mar 2026 22:22:44 +0900 Subject: [PATCH] feat: replace simulated sine wave chart with real snapshot data Portfolio value chart now uses actual snapshot API data instead of generated simulation. Shows empty state message when no snapshots exist. Co-Authored-By: Claude Opus 4.6 --- frontend/src/app/portfolio/[id]/page.tsx | 78 ++++++++++++------------ 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/frontend/src/app/portfolio/[id]/page.tsx b/frontend/src/app/portfolio/[id]/page.tsx index f3e57ca..69c5917 100644 --- a/frontend/src/app/portfolio/[id]/page.tsx +++ b/frontend/src/app/portfolio/[id]/page.tsx @@ -41,6 +41,13 @@ interface Transaction { realized_pnl: number | null; } +interface SnapshotListItem { + id: number; + portfolio_id: number; + total_value: number; + snapshot_date: string; +} + interface PortfolioDetail { id: number; name: string; @@ -66,31 +73,13 @@ const CHART_COLORS = [ 'hsl(199.4, 95.5%, 53.8%)', ]; -// Generate sample chart data for portfolio value over time -function generateChartData(totalValue: number | null): AreaData