AI Coding Tools · [ 3 min read ]

datasette-charts 0.3a0 adds chart annotations

datasette-charts 0.3a0 adds lines, shaded areas, labels and point markers to rendered charts, editable live in the builder UI and generatable by Datasette Agent.

Key findings

  1. datasette-charts 0.3a0 released with chart annotations: lines, shaded areas, labels, or combinations
  2. Annotations serialize as JSON in the chart spec and URL fragment, so annotated charts are shareable links
  3. The chart builder UI edits annotations with live preview, no JSON editing required
  4. Datasette Agent can build annotated charts from natural-language prompts, including SQL export and CSV/TSV copy
Datasette-charts 0.3a0 adds chart annotations
Pexels / pixabay

datasette-charts 0.3a0, released on GitHub, adds annotations to rendered charts: you can now place lines, shaded areas, labels, or a combination of the three on top of any chart the plugin draws.

The release is tagged 0.3a0 on the datasette-charts repository.

What do annotations look like in practice?

The release notes show a bar chart of global power plant capacity, aggregated by decade from 1950 to 2019, with the y-axis "Total capacity_mw". Three annotations sit on it:

  • A gray shaded band spanning 1950 to 1990, labeled "Much smaller summed capacity in earlier decades"
  • A point marker on the 2000 bar, labeled "Largest decade total in these records: 1.157 million MW"
  • A dashed horizontal line labeled "1,000,000 MW reference"
  • A caption below the chart reading "Global plant records with commissioning years 1950–2019; coverage and missing years may affect comparisons."

Each annotation type is a JSON object in the chart's serialized state — the example carries a point annotation at x=2000, a range from x=1950 to x=1990, a line at y=1000000, and a text annotation positioned at left=0.02, top=0.04. The whole chart definition, including annotations, lives in the URL fragment, which means annotated charts are shareable as links.

The takeaway: annotations are data, not pixels — they serialize into the chart spec alongside encodings and options.

Can you edit them without writing JSON?

Yes. The same example chart runs in Datasette Lite, the in-browser build, with the chart builder UI exposing annotation editing. A screen recording shows an "Edit annotation" dialog with fields for "Kind", "Capacity_mw", "Label (optional)", "Label position", "Color" and "Line style", next to a live PREVIEW panel. Changing the line's value from 1000000 to 900000 and then 800000 moves the dashed reference line down the chart in step, and label text edits update instantly. The user then clicks "Save".

In short: the builder gives live preview of annotation edits, no spec editing required.

Does the agent know about them?

If you also install Datasette Agent, the agent will build annotated charts for you. The release notes demonstrate this on the agent.datasette.io demo with the prompt:

Show a chart comparing Simon's tagged content about LLMs with his tagged content about Datasette, with annotations

The agent produced a line chart titled "Total content_count per year by topic" covering 2017 to 2026, with two series — LLMs in blue and Datasette in orange. The annotations it chose: "Datasette peak year" pointing at 2020, and "LLM-tagged content rises" pointing at 2023. A note on the chart reads "Counts include posts, notes and links; 2026 is year-to-date."

The agent also exposes the generated chart's plumbing: controls for "Open in the chart builder", "Copy link", "This chart's SQL", "Copy TSV" and "Copy CSV" sit under the output.

So an LLM writing SQL can now add the interpretive layer — reference lines, region shading, callouts — that previously required hand-editing the spec.

datasette-charts remains a Datasette plugin, and this alpha release points at where it is heading: charts that carry their own commentary.

github.com (Original)

Price tags

Share this article:

More from James Calloway

James Calloway

Show full bio

Correspondent covering people, launches and day-to-day practice in AI-coding movement at Vibe Coder.

24 articles

Adjacent departments

« Previous article