I’ve been playing with HTMX lately and wanted nicer charts without wiring a bunch of frontend code, so I wrote a small extension that connects *HTMX + ECharts + SSE*.
It lets you:
- stream chart updates over *Server‑Sent Events* (no full re‑render)
- fetch static ECharts options once
- or periodically *poll* an endpoint with a simple `data-url="/api/chart poll:1s"` syntax
The extension handles creating/disposing ECharts instances, ResizeObserver, SSE connections, and polling timers. You just return standard ECharts option objects from your endpoints.
in repo you can find gif with demo, the repo itself is a demo, in README you can find examples in bun/nodejs, c#, python.
oO0Jinx0Oo•1h ago
It lets you:
- stream chart updates over *Server‑Sent Events* (no full re‑render) - fetch static ECharts options once - or periodically *poll* an endpoint with a simple `data-url="/api/chart poll:1s"` syntax
The extension handles creating/disposing ECharts instances, ResizeObserver, SSE connections, and polling timers. You just return standard ECharts option objects from your endpoints.
in repo you can find gif with demo, the repo itself is a demo, in README you can find examples in bun/nodejs, c#, python.