From f1c2d367a04ff8bf11f6d538f6c6d6307670f009 Mon Sep 17 00:00:00 2001 From: ramseshk Date: Tue, 4 Aug 2026 08:44:12 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20historical=20chart=20blank=20=E2=80=94=20?= =?UTF-8?q?ISO=20time=20strings=20rejected=20by=20LightweightCharts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The historical runner stores equity curve times as ISO strings like "2026-07-05T07:00:00" but LightweightCharts only accepts Unix timestamps. Chart was loading 721 data points but rendering blank because time values were silently rejected. Changes: - renderBTDetail: convert string times to Unix timestamps before setData() - openDetail: same conversion for live/paper detail charts - pushEquity: same conversion for main area equity charts All chart codepaths now handle both string ISO and numeric timestamps. --- dashboard/static/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/static/index.html b/dashboard/static/index.html index ae785ff..6fd7b50 100644 --- a/dashboard/static/index.html +++ b/dashboard/static/index.html @@ -322,7 +322,7 @@ function renderBTDetail(full){ // Equity chart if(!detChart)initDetChart(); var pts=[],curve=full.equity_curve||[]; - for(var i=0;i0){detSer.setData(pts);detChart.timeScale().fitContent();setTimeout(function(){detChart.timeScale().fitContent()},200)} // Trades table (show pnl_net or pnl_gross based on toggle) var trows='',tlist=full.trades||[]; @@ -391,7 +391,7 @@ function openDetail(name,tab){ if(!detChart)initDetChart(); var eqData=Array.isArray(equity)?equity:(equity[name]||[]); if(eqData.length>0){ - var pts=[];for(var i=0;i