From fdd58634e605cfd14e55c9e0e91c7d71d72b8f50 Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Thu, 20 Nov 2025 15:24:57 +0800 Subject: [PATCH] update pay function --- src/views/DataBrowser/TradingViewChart.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/views/DataBrowser/TradingViewChart.tsx b/src/views/DataBrowser/TradingViewChart.tsx index 598d3f06..a26b2cc9 100644 --- a/src/views/DataBrowser/TradingViewChart.tsx +++ b/src/views/DataBrowser/TradingViewChart.tsx @@ -118,14 +118,8 @@ const TradingViewChart: React.FC = ({ visible: true, }, localization: { - timeFormatter: (time: any) => { - // 格式化时间显示 - const date = new Date(time * 1000); - const year = date.getFullYear(); - const month = String(date.getMonth() + 1).padStart(2, '0'); - const day = String(date.getDate()).padStart(2, '0'); - return `${year}-${month}-${day}`; - }, + locale: 'zh-CN', + dateFormat: 'yyyy-MM-dd', }, handleScroll: { mouseWheel: true, @@ -174,9 +168,6 @@ const TradingViewChart: React.FC = ({ return timeA - timeB; }); - console.log('📊 转换后的图表数据(前3条):', chartData.slice(0, 3)); - console.log('📊 数据总数:', chartData.length); - // 设置数据 lineSeries.setData(chartData);