Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 901 Bytes

README.md

File metadata and controls

34 lines (28 loc) · 901 Bytes

realtime plot

fun

An example showcasing how to use Chartistry with Leptos and SSR. It borrows heavily from Leptos' SSR mode axum example. more info and start demo ,please check "leptos" and "leptos-chartistry".

run

Run cargo-leptos watch (note the '-').

out

The chart redraws once per WebSocket frame, ~10 fps with the bundled feeds. alt text

plot

NOTE:

we can use websocket client to refresh data and plot in real time.

The page is served on 127.0.0.1:3000, and the feed endpoint is ws://127.0.0.1:8080/ws (see WS_URL in src/app.rs), so run the client and one of the servers below side by side.

client

websocket client refresh data

cargo leptos watch

python server

uv run server.py

rust axum websocket server

cargo run --example server