diff --git a/docs/source/examples/gui_examples.md b/docs/source/examples/gui_examples.md index 06780680..d4003234 100644 --- a/docs/source/examples/gui_examples.md +++ b/docs/source/examples/gui_examples.md @@ -1,5 +1,18 @@ # Alternative GUI's +## Static Charts for Flask or FastAPI +```python +from lightweight_charts.widgets import StaticLWC +import jinja2 + +@app.route('/static-chart') +def static_chart(): + chart = StaticLWC() + df = pd.read_csv('ohlcv.csv') + chart.set(df) + chart.load() + return render_template(jinja2.Template(f'{chart._html}')) +``` ## PyQt5 / PySide6 @@ -95,4 +108,4 @@ df = pd.read_csv('ohlcv.csv') chart.set(df) chart.load() -``` \ No newline at end of file +```