stlite
stlite copied to clipboard
Support st.bokeh_chart
It raises an error such as
6.8fc22a8b.chunk.js:1 TypeError: Cannot read properties of undefined (reading 'embed')
at BokehChart.tsx:109:13
at BokehChart.tsx:123:5
at Ls (6.8fc22a8b.chunk.js:1:1608317)
at t.unstable_runWithPriority (6.8fc22a8b.chunk.js:1:1626130)
at qi (6.8fc22a8b.chunk.js:1:1548488)
at Ns (6.8fc22a8b.chunk.js:1:1607778)
at 6.8fc22a8b.chunk.js:1:1607689
at B (6.8fc22a8b.chunk.js:1:1625189)
at E.port1.onmessage (6.8fc22a8b.chunk.js:1:1623911)
The original Streamlit frontend loads the bokeh JS scripts from index.html and sets the global Bokeh object.
https://github.com/streamlit/streamlit/blob/1.13.0/frontend/public/index.html#L35-L41
If BokehJS is bundled to the Streamlit frontend, it becomes easier for stlite to import it too. -> https://github.com/streamlit/streamlit/issues/5528
Experimental PR: #344
Bokeh v3 is now installable on Pyodide, but Streamlit only supports v2.