- plotly

Interactive Plotly with Pyscript

import js import json import plotly import plotly.graph_objects as go from pyodide.http import pyfetch, FetchResponse from typing import Optional, Any from js import console import asyncio import js url = 'https://openmc-data-storage.github.io/isotope_xs_plotter_pyscript/src/li6_205.json' response = await pyfetch(url= url, method="GET") data = await response.json() print(data) fig = go.Figure(data=go.Scatter(x=data['energy'], y=data['xs'])) graphJSON = json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder) js.plot(graphJSON,"my_chart")