Install and load
Run these commands in a Haybarn SQL session. The extension is available from the community repository.
INSTALL miniplot FROM community;
LOAD miniplot FROM community;
Try it in a temporary SQL session with miniplot already loaded. Queries run in this tab; examples using files or services need their own setup.
Using upstream DuckDB? Follow the maintainer’s installation instructions.
Usage example
Pure HTML: no file writes or browser launch
-- Pure HTML: no file writes or browser launch
SELECT pie_chart_html(['A', 'B'], [1.0, 2.0], 'Shares');
-- Numeric/time x axes are supported for line and area charts
SELECT line_chart_html(
[TIMESTAMP '2026-01-01 10:00:00', TIMESTAMP '2026-01-01 12:00:00'],
[12.5, 15.0], 'Measurements'
);
-- A structured narrative report with a chart
SELECT chart_report_html(
'{"title":"Summary","sections":[{"heading":"Findings","text":"B is twice A.","data":[{"type":"bar","x":["A","B"],"y":[1,2]}]}]}'
);
-- Discover installed overloads, types, and runnable examples
SELECT function_name, parameters, parameter_types, description, examples
FROM duckdb_functions()
WHERE function_name IN ('chart_report_html', 'scatter_gl_chart_html', 'chart_export');
Provided by nkwork9999. Not yet verified on Haybarn 2.0.0.
Sample data & setupAbout this extension
Interactive visualization from DuckDB SQL using Plotly.js. Includes bar, line, area, scatter, 3D scatter, histogram, box, pie, donut, horizontal bar, violin, bubble, heatmap, contour, step, radar, and WebGL scatter charts. Numeric and date/time axes preserve numeric spacing and UTC handling for zoned timestamps.
HTML-returning functions work without file writes or browser launches. Native file/browser functions support temporary or explicit output paths and respect DuckDB's external-access setting. Plotly.js is loaded from a CDN for ordinary HTML viewing; a browser connection or cached bundle is needed.
Project overview from the community descriptor.
Documentation and resources
Project and build details
- Repository
- nkwork9999/miniplot
- License
- MIT
- Maintainers
- nkwork9999
- Written in
- C++
- Build source
01eb3f812f15- Build definition
- Community descriptor