如何在轻量级图表中格式化参考线?
以下是轻量级图表。如您所见,水平线市场 ( US$449,308,044
) 占用了如此多的空间。
有没有办法格式化这个文本?
var chart = createChart(ref.current, {
width: width,
height: height,
layout: {
backgroundColor: 'transparent',
textColor: textColor,
},
rightPriceScale: {
scaleMargins: {
top: topScale,
bottom: 0,
},
borderVisible: false,
},
timeScale: {
borderVisible: false,
},
grid: {
horzLines: {
color: 'rgba(197, 203, 206, 0.5)',
visible: false,
},
vertLines: {
color: 'rgba(197, 203, 206, 0.5)',
visible: false,
},
},
crosshair: {
horzLine: {
visible: false,
labelVisible: false,
},
vertLine: {
visible: true,
style: 0,
width: 2,
color: 'rgba(32, 38, 46, 0.1)',
labelVisible: false,
},
},
localization: {
priceFormatter: (val) => formattedNum(val, true),
},
});