Render charts and dashboards straight from SQL — the ggplot-rs grammar of graphics, emitted as SVG.
Installing and Loading
INSTALL anofox_visualization FROM community;
LOAD anofox_visualization;
Example
-- 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"]]}');
About anofox_visualization
anofox_visualization renders charts as SVG from inside DuckDB, using the ggplot-rs grammar-of-graphics engine. This community build provides the rendering surface:
- anofox_render(spec VARCHAR) -> VARCHAR — a JSON panel spec -> SVG
- anofox_bar / anofox_line / anofox_scatter / anofox_area (x, y)
- anofox_xy(x, y, kind := 'BARCHART', width := 640, height := 400)
- anofox_xyc(x, y, series, kind := 'BARCHART_STACKED')
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.
The full toolkit — an interactive in-browser dashboard builder, locked read-only dashboard serving, and a CLI — is available from a source build of the project at https://github.com/DataZooDE/anofox-visualization.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| anofox_area | macro | NULL | NULL | |
| anofox_bar | macro | NULL | NULL | |
| anofox_line | macro | NULL | NULL | |
| anofox_render | scalar | NULL | NULL | |
| anofox_scatter | macro | NULL | NULL | |
| anofox_xy | macro | NULL | NULL | |
| anofox_xyc | macro | NULL | NULL |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
This extension does not add any settings.