Repository navigation
v0.11.0
Plot in the browser — WASM bindings, hover tooltips, and a DuckDB-Wasm spatial demo.
Browser (WASM)
- New
wasmfeature:wasm::render_geo(spec) -> String(wasm-bindgen) compiles towasm32and renders SVG via the plotters-freeSvgBackend. Small bundle (~310 KB.wasm, no polars, no fonts).wasm-pack build --target web --no-default-features --features wasm. - Hover: every mark is a real DOM element — new
DrawBackend::set_tooltipmakesSvgBackendemit a<title>per feature (from alabelmapping + fill value), so you get native hover tooltips with zero JS, plus CSS:hover. A general SVG feature. - Demo (
web/): DuckDB-Wasm loads thespatialextension in-browser, reads Natural Earth world countries from a CDN,ST_AsTexts them to WKT, and ggplot-rs renders an interactive world choropleth.
Also
The render_svg_native path (used on wasm) supports facets too. Native builds are unchanged — all wasm code is not(target_arch = "wasm32") / feature-gated.
For many points: aggregate in DuckDB (GROUP BY / hexbin / sample) and render the summary; a canvas/WebGL backend is the future path for raw large-N.
🤖 Generated with Claude Code
