Skip to content
DuckDB community extension

anofox_visualization

Render charts and dashboards straight from SQL — the ggplot-rs grammar of graphics, emitted as SVG.

01 / SETUP

Install and load

Run these commands in a Haybarn SQL session. The extension is available from the community repository.

Haybarn 2.0.0 · SQL
INSTALL anofox_visualization FROM community;
LOAD anofox_visualization FROM community;

Using upstream DuckDB? Follow the maintainer’s installation instructions.

02 / QUERY

Usage example

One scalar plus convenience macros. Pass columns; get an SVG per group.

SQL
-- One scalar plus convenience macros. Pass columns; get an SVG per group.
WITH sales AS (SELECT * FROM (VALUES ('app', 30), ('web', 22), ('api', 12)) t(ch, n))
SELECT anofox_bar(ch, n) FROM sales;          -- <svg> bar chart

-- Any chart kind via anofox_xy(..., kind := ...), or the raw JSON spec:
SELECT anofox_render('{"rows":[{"c0":"a","c1":3}],"roles":[[0,"XAXIS"],[1,"BARCHART"]]}');

Provided by DataZooDE. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

anofox_visualization renders charts as SVG from inside DuckDB, using the ggplot-rs grammar-of-graphics engine. This community build provides the rendering surface:

The convenience macros aggregate rows via list(), so SELECT anofox_bar(x, y) FROM t returns one SVG for the group. Chart kinds include bars/lines/areas/points, distributions (histogram, boxplot, violin), heatmaps, and WKT-geometry choropleth maps.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
DataZooDE/anofox-visualization
License
BSL 1.1
Maintainers
sipemu
Written in
C++
Build source
59835096d73b
Build definition
Community descriptor