Skip to content

v0.11.0

Choose a tag to compare

@sipemu sipemu released this 06 Jul 14:34
· 632 commits to main since this release

Plot in the browser — WASM bindings, hover tooltips, and a DuckDB-Wasm spatial demo.

Browser (WASM)

  • New wasm feature: wasm::render_geo(spec) -> String (wasm-bindgen) compiles to wasm32 and renders SVG via the plotters-free SvgBackend. 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_tooltip makes SvgBackend emit a <title> per feature (from a label mapping + fill value), so you get native hover tooltips with zero JS, plus CSS :hover. A general SVG feature.
  • Demo (web/): DuckDB-Wasm loads the spatial extension in-browser, reads Natural Earth world countries from a CDN, ST_AsTexts them to WKT, and ggplot-rs renders an interactive world choropleth.

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