datasette-charts: charts that count every row, not one page

Simon Willison released datasette-charts, an alpha Datasette plugin that suggests charts and aggregates them in SQL across a full table or query.

Datasette users can now get suggested charts for any table or SQL query, with each chart aggregating the whole result set rather than just the page of rows on screen. Simon Willison released datasette-charts 0.1a0 on Nov 23, 2026. He says he started it as a prototype with Claude Fable 5.2 on a Sunday, after thinking about the problem for over a year.

The plugin defines several chart types, built on vendored D3, Observable Plot and topojson-client. Each comes with heuristics for spotting when it suits a given set of rows. Suggestion thumbnails at the top are real charts drawn from your data. Selecting one opens the full chart with editing tools, or you can build one from scratch. Chart state lives in the URL fragment, so a chart can be bookmarked or shared.

The main change is scale. Willison notes that earlier plugins such as datasette-vega charted only the current page, generally up to 100 rows. datasette-charts compiles each chart to a SQL query that aggregates the entire result set with GROUP BY, time bucketing and window functions. Each query returns at most 5,000 rows for display. On larger tables, the plugin uses sampling to help pick which charts to suggest, without evaluating the full result set.

A day later, version 0.2a0 added Datasette Agent integration. You can ask the chat for a chart, and it uses the same suggestion and generation tools. Willison's post on X says the live demo on agent.datasette.io requires a GitHub sign-in. It also links a Datasette Lite demo that runs in the browser.

The useful part is that the aggregation runs in SQL across the full result set, so you don't have to trust a chart drawn from a 100-row slice. Willison calls the plugin "still very much an alpha". His posts don't say how much of the code Claude wrote or how he checked it. They also don't explain how a chart handles an aggregation that would return more than 5,000 rows, or when sampled suggestions might pick a poor chart type.

Try it: Open the Datasette Lite demo linked from Willison's post, pick a suggested chart, then copy the URL into a new tab. If the same chart reloads, the fragment-based sharing works. Then compare the chart's totals against a GROUP BY query of your own to check the numbers.

Sources