streamlit-lightweight-charts
streamlit-lightweight-charts copied to clipboard
ChartOptions 'barSpacing' not working
tried to play with the sample code 'Multipane Chart (intraday) from CSV' The default size of the chandlestick should be changed by varying the option 'barSpacing'. But seems this option have no effect on the chart after several tries. Now my solution is to set the 'minBarSpacing', but that is not the best, not sure the problem is from tradingview API side or this side
chartMultipaneOptions =
{
"width": 600,
"height": 400,
"layout": {
"background": {
"type": "solid",
"color": 'white'
},
"textColor": "black"
},
"grid": {
"vertLines": {
"color": "rgba(197, 203, 206, 0.5)"
},
"horzLines": {
"color": "rgba(197, 203, 206, 0.5)"
}
},
"crosshair": {
"mode": 0
},
"priceScale": {
"borderColor": "rgba(197, 203, 206, 0.8)"
},
"timeScale": {
"borderColor": "rgba(197, 203, 206, 0.8)",
"barSpacing": 10, # <- that is the problem I talk about
"minBarSpacing": 8,
"timeVisible": True,
"secondsVisible": False,
},
"watermark": {
"visible": True,
"fontSize": 48,
"horzAlign": 'center',
"vertAlign": 'center',
"color": 'rgba(171, 71, 188, 0.3)',
"text": 'Intraday',
}
},
]