Hi Streamlit community
,
I am trying to embed the TradingEconomics Economic Calendar widget into my Streamlit app using their official JS snippet:
<div id="calendar-widget">
<script src="https://widgets.tradingeconomics.com/cl.js" async>
{
"colorTheme": "Dark",
"border": {
"radius": 15
}
}
</script>
</div>
I attempted to use it inside Streamlit with st.components.v1.html(), like this:
import streamlit as st
import streamlit.components.v1 as components
components.html(“”"
<div id="calendar-widget">
<script src=" https://widgets.tradingeconomics.com/cl.js " async>
{
"colorTheme": "Dark",
"border": {
"radius": 15
}
}
</script>
</div>
""", height=800)
…but it does not render the widget in Streamlit.
My goal:
-
Embed the calendar widget directly in Streamlit.
-
Be able to customize theme (Dark/Light) and border radius.