New Component: streamlit-lightweight-charts

Hello All

There is a new component in town, it is a Streamlit wrapper for the performant Tradingview’s Financial: lightweight-charts - a charting library specific for the Financial/Trading world - great for Financial data-science. Lots of examples on how to use - have a look…

GitHub: GitHub - freyastreamlit/streamlit-lightweight-charts: Streamlit wrapper for lightweight-charts
PyPi: streamlit-lightweight-charts · PyPI

Best,
Joe Rosa

6 Likes

Yey! Thank you @freyastreamlit ! It is just a thing I needed :slight_smile:

Looks very nice ! Could you give an example showing how to import data in lightweight-charts from a dataframe ?
Thanks
Best
Jerome

Hi Jerome

Done an example using Pandas: Multipane chart with Pandas

GitHub
/examples/MultiPaneChartsWithPandas.py

Best,

Joe Rosa

That’s great! Do you have any live demo streamlit apps to show these off? Source code and images are a great way to see how this works, but a link to a live streamlit app would be a great addition to the README!

For those like me who are curious what it actually looks like in a streamlit app, here you go:

2 Likes

Very helpful ! Thanks

How do we adjust the price scale from 2 to 5 decimal places?

its ok i figured it out

seriesCandlestickChart = [
{
“type”: ‘Candlestick’,
“data”: candles,
“options”: {
“upColor”: COLOR_BULL,
“downColor”: COLOR_BEAR,
“borderVisible”: False,
“wickUpColor”: COLOR_BULL,
“wickDownColor”: COLOR_BEAR,
“priceFormat”: {
“type”: ‘price’,
“precision”: 5,
“minMove”: 0.00001,
},
},
}
]

in case anyone else needs this info :slight_smile:

How to add these switcher in the chart?
callbacks