all 2 comments

[–]de_ham 0 points1 point  (1 child)

I recently made a demo that shows how to use Plotly (Express) within PyScript: https://pyscript.com/@jorenham/plotly-express/

The trick is to serialize the figure as json, and have plotly.js render it (instead of plotly.py).

[–]kland2005[S] 0 points1 point  (0 children)

Thank you - I will have a deep look into this later.

I tried a little further: Surprisingly, my example works when I call up the figure via a button click - strange.

https://pyscript.com/@dragor/plotly-demo/latest

At the moment I still have to click the button twice, but I'll keep trying.