update pay function
This commit is contained in:
@@ -110,16 +110,27 @@ const TradingViewChart: React.FC<TradingViewChartProps> = ({
|
|||||||
timeVisible: true,
|
timeVisible: true,
|
||||||
secondsVisible: false,
|
secondsVisible: false,
|
||||||
rightOffset: 12,
|
rightOffset: 12,
|
||||||
barSpacing: 3,
|
barSpacing: 6, // 增加条形间距,减少拥挤
|
||||||
fixLeftEdge: false,
|
fixLeftEdge: false,
|
||||||
lockVisibleTimeRangeOnResize: true,
|
lockVisibleTimeRangeOnResize: true,
|
||||||
rightBarStaysOnScroll: true,
|
rightBarStaysOnScroll: true,
|
||||||
borderVisible: true,
|
borderVisible: true,
|
||||||
visible: true,
|
visible: true,
|
||||||
|
// 控制时间标签的最小间距(像素)
|
||||||
|
tickMarkMaxCharacterLength: 8,
|
||||||
},
|
},
|
||||||
localization: {
|
localization: {
|
||||||
locale: 'zh-CN',
|
locale: 'zh-CN',
|
||||||
dateFormat: 'yyyy-MM-dd',
|
// 自定义时间格式化,根据时间范围智能显示
|
||||||
|
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}`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
handleScroll: {
|
handleScroll: {
|
||||||
mouseWheel: true,
|
mouseWheel: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user