'How to format reference line in lightweight charts?
How to format reference line in lightweight charts?
Following is lightweight chart.
As you can se the horizontal line market (US$449,308,044
) is taking so much space.
Is there a way to format this text?
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),
},
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|