is there any way to fitContent for right price scale in lightweight charts? I did not find any info for that in documentation.
I am trying to display two data series, but they are in different ranges (tens of thousands vs tens)
Here is my jsfiddle. I would appreciate any hint. https://jsfiddle.net/05zx4e76/5/
var chart = LightweightCharts.createChart(tvchart, {
width: '600',
height: '300',
rightPriceScale: {
visible: true,
borderColor: 'rgba(197, 203, 206, 1)',
lockVisibleTimeRangeOnResize: true,
},
localization: {
locale: 'en-US',
},
leftPriceScale: {
visible: true,
borderColor: 'rgba(197, 203, 206, 1)',
lockVisibleTimeRangeOnResize: true,
},
grid: {
horzLines: {
color: '#363C4E',
},
vertLines: {
color: '#2B2B43',
},
},
crosshair: {
mode: LightweightCharts.CrosshairMode.Normal,
},
timeScale: {
borderColor: 'rgba(197, 203, 206, 1)',
},
handleScroll: {
vertTouchDrag: false,
},
layout: {
backgroundColor: '#2B2B43',
lineColor: '#2B2B43',
textColor: '#D9D9D9',
}
});
chart.applyOptions({
timeScale: {
rightOffset: 12,
barSpacing: 3,
fixLeftEdge: false,
rightBarStaysOnScroll: false,
borderVisible: false,
borderColor: '#fff000',
visible: true,
timeVisible: true,
secondsVisible: false }
}
);