Merge branch 'feature_2025/251117_pref' of https://git.valuefrontier.cn/vf/vf_react into feature_2025/251117_pref
* 'feature_2025/251117_pref' of https://git.valuefrontier.cn/vf/vf_react: update pay function update pay function update pay function
This commit is contained in:
@@ -110,20 +110,25 @@ const TradingViewChart: React.FC<TradingViewChartProps> = ({
|
||||
timeVisible: true,
|
||||
secondsVisible: false,
|
||||
rightOffset: 12,
|
||||
barSpacing: 3,
|
||||
barSpacing: 6, // 增加条形间距,减少拥挤
|
||||
fixLeftEdge: false,
|
||||
lockVisibleTimeRangeOnResize: true,
|
||||
rightBarStaysOnScroll: true,
|
||||
borderVisible: true,
|
||||
visible: true,
|
||||
// 控制时间标签的最小间距(像素)
|
||||
tickMarkMaxCharacterLength: 8,
|
||||
},
|
||||
localization: {
|
||||
timeFormatter: (time: any) => {
|
||||
// 格式化时间显示
|
||||
const date = new Date(time * 1000);
|
||||
locale: 'zh-CN',
|
||||
// 自定义时间格式化,根据时间范围智能显示
|
||||
timeFormatter: (time) => {
|
||||
const date = new Date(time);
|
||||
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}`;
|
||||
},
|
||||
},
|
||||
@@ -174,9 +179,6 @@ const TradingViewChart: React.FC<TradingViewChartProps> = ({
|
||||
return timeA - timeB;
|
||||
});
|
||||
|
||||
console.log('📊 转换后的图表数据(前3条):', chartData.slice(0, 3));
|
||||
console.log('📊 数据总数:', chartData.length);
|
||||
|
||||
// 设置数据
|
||||
lineSeries.setData(chartData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user