Most charting plugins for Datasette, the open-source data exploration tool, have only ever graphed the current page of results—typically capped at 100 rows. With the release of datasette-charts 0.1a0, that's changed: you can now build and share charts that aggregate across an entire table or the output of any SQL query, even when that means millions of rows.
The new plugin, built by Simon Willison, supports multiple chart types via vendored D3, Observable Plot, and topojson-client. Each chart type comes with its own heuristics for when it might fit your data, and the plugin suggests visualisations with live, data-driven thumbnails. Selecting a suggestion expands it into a full chart, which you can further modify, or you can construct your own from scratch.
Charting the full dataset with SQL aggregation
The key advance here is how the plugin compiles each chart into a SQL query that aggregates over the entire result set. This means charts are not limited to a single page, but can represent trends and distributions across potentially millions of rows. The aggregation leverages GROUP BY, time bucketing, and window functions. To keep things responsive, the result is capped at 5,000 rows per chart.
For very large tables, the plugin uses sampling to generate chart suggestions without having to process the entire dataset up front. This makes it possible to get useful visual previews even when working with big data.
Sharable, persistent charts via URL fragments
A feature carried over from previous Datasette visualisation plugins: the current state of your chart is saved in the URL fragment (the part after #). This makes it trivial to bookmark a chart or share it with a teammate—no need to export or re-run queries.




