Use cases with an AI agent

Contents: Install, PowerPoint or Keynote deck, Analysis page or Claude artifact, React dashboard, Word or PDF report, Recurring report.

This page shows how to get finished results from an AI agent such as Claude Code or Codex with boardplot: a slide deck, an analysis page, a React dashboard, a Word report or a weekly report. Install boardplot once, then name it in the prompt. The agent writes the chart specs, draws the charts with the boardplot tools and puts them into the result.

Choose the destination section for settings and examples. The worked examples include invented data, specs, finished files and build scripts. The manual is a reference for questions about the spec and tool behavior.

Install

To check the install, start a new session and ask:

Use Boardplot to draw a small column chart from sample data as PNG. Tell me the Boardplot version and the file path.

The agent calls boardplot_render and reports the output path and running version. Confirm that the requested PNG was produced. A rasterizer warning can accompany SVG fallback. The plugin setup has the full checks and the troubleshooting.

Tips for every use case:

React installation

In an existing React project, install boardplot:

npm install boardplot

Boardplot uses the project's React and React DOM dependencies. Import charts from their per-type entries, such as boardplot/react/column. The React reference covers components, sizing and server preparation.

PowerPoint or Keynote deck

You get: a new deck with boardplot charts, or the requested chart changes in an existing deck.

Example prompts:

Build a 10-slide quarterly review deck from data/q3-sales.csv. Use Boardplot for every chart.
Revise my presentation board-update.pptx and replace all charts with Boardplot charts. Keep the slide text and layout.
Add a revenue bridge from FY24 to FY25 to slide 4 of strategy.pptx, drawn with Boardplot, in our colours #0B5CAD and #A9C1D9.

What the agent does: Boardplot draws the chart images, and the agent's own PowerPoint tool, such as a pptx skill or a Python library, places them in the file. For each chart, the agent:

  1. Reads the data from your file, or from the chart it replaces.
  2. Writes the spec, using boardplot_describe when the chart contract is unfamiliar.
  3. Calls boardplot_render with target: "slide", format: "png" and the size of the picture box, for example options.size: { "width": 660, "height": 372, "unit": "pt" }.
  4. Checks ok, warnings and the returned format, then places the chart in the picture box. A PNG request can return SVG when a rasterizer is unavailable. See PNG output.

The PNG has 2 pixels per layout pixel, the default scale, and records 192 dpi. PowerPoint, Keynote and Word read the dpi, so they place a scale-2 PNG at the chart's own size, with sharp text. Without a size, a slide chart is 888 × 396 pt, the content area of a 16:9 slide.

Tips:

Limits:

Worked example: docs/examples/deck builds an eight-slide board deck, quarterly-review.pptx, in a consulting layout: action titles, KPI tiles, a price-volume-mix bridge, CAGR labels, IBCS variance charts, a market map and a P&L table with computed variances. Each chart fills its slot beside editable takeaways. The revise case turns board-update-before.pptx, with native PowerPoint charts, into board-update-after.pptx: the same data drawn by boardplot, in the same boxes, with the slide text unchanged.

Eight slides of the board deck

A slide with native PowerPoint charts and the same slide with boardplot charts

Analysis page or Claude artifact

You get: an analysis written as an HTML page, such as a Claude artifact or a report page, with the charts in the page.

Example prompts:

Analyse data/churn.csv: which customer segments churn most, and since when? Write the result as an artifact and draw every chart with Boardplot.
Write a one-page HTML report on last month's marketing spend from exports/spend.csv. Use Boardplot for the charts and our colours #0B5CAD and #A9C1D9.

What the agent does:

  1. Analyzes the data and decides which finding each chart shows.
  2. Calls boardplot_render with return: ["reading", "svg"]. Uses rowsFile when the chart supports the file's row mapping, or supplies spec.data. The answer carries the chart's SVG markup in svg.
  3. Puts each SVG inline in the page. The page needs no script and loads nothing from the network to show the charts.
  4. Reads the reading of each render, the numbers boardplot computed (totals, differences, growth rates), and uses them in the text, so text and chart agree.

Tips:

Limits:

Worked example: docs/examples/analysis-page has index.html, a gross margin review with a margin bridge, a category table with bars and a price-volume scatter with quadrants. Its headline, key numbers and findings take their numbers from the data and the reading of each render.

Margin review page with key numbers, three exhibits and next steps

React dashboard

You get: a new React or Next.js dashboard with boardplot charts, or an existing dashboard with its charts moved to boardplot.

Example prompts:

Build the sales dashboard in Next.js from the API in src/api/sales.ts and use Boardplot for the chart work.
Move the charts of this dashboard from our current chart library to Boardplot. Keep the data loading and the page layout as they are.

What the agent does:

  1. Chooses chart types from the requested result. Calls boardplot_list when the type is uncertain and boardplot_describe when its fields are unfamiliar.
  2. Uses the per-type components, such as ColumnChart from boardplot/react/column, with size="container", so each chart lays out in its card.
  3. Wraps the page in BoardplotTheme with target="dashboard" and your theme, so every chart shares one look.
  4. In Next.js, prepares the charts on the server with prepareChart, so the first paint shows the chart.

The React reference has each part: per-type components, container sizing, theme provider, server preparation, rows from a query and export.

Tips:

Limits:

Worked example: docs/examples/react-dashboard is a weekly trading dashboard in Vite and React: KPI tiles with sparklines, a channel KPI table that switches between two views, a region variance that compares with last year or plan, two weekly charts on one shared scale (ScaleGroup) and PNG and CSV export on each card. Run npm install and npm run dev in that folder.

Trading dashboard with KPI tiles, a channel KPI table, a region variance chart and two weekly line charts

Word or PDF report

You get: a Word document or PDF with print-quality charts.

Example prompts:

Write the monthly finance report as a Word document from exports/finance.csv. Draw the charts with Boardplot for print.
Turn this analysis into a PDF report on A4. Use Boardplot for all charts, 300 dpi.

What the agent does: Boardplot draws the chart images, and the agent's own Word or PDF tool places them in the document. For each chart, the agent calls boardplot_render with target: "print", the text column width in mm, for example options.size: { "width": 160, "unit": "mm" }, format: "png" and scale: 3.125 for 300 dpi. Word places the PNG at 160 mm.

Tips:

Limits:

Worked example: docs/examples/word-report has a three-page monthly management report, report.docx, and its PDF export, report.pdf: an executive summary, a P&L table with computed variances, monthly revenue with a forecast range, a price-volume-mix bridge and an EBIT bridge to budget, as print charts at 160 mm and 300 dpi.

Three pages of the monthly management report

Recurring report

You get: the same report every week or month, such as a weekly business review, with charts from the latest query export.

Example prompts:

Every Monday, read exports/orders.csv and write the weekly business review with Boardplot charts. Reuse the chart specs in reports/specs/.
Write a script that renders the charts in reports/specs/ from the latest exports with the Boardplot CLI, so our scheduled job can run it without an agent.

What the agent does: for charts with a supported row mapping, save one spec template per chart. Keep required metadata such as map packs, table columns and series labels. In each later run, call boardplot_render with the template, the new export as rowsFile and the source column names in columns. A refused render returns ok: false and errors with a path and, when available, a suggest or fix. Apply spec repairs to the spec and argument repairs to the tool arguments. A file-row error points to /rowsFile and identifies its source cell in displayPath. Edit that cell in the data file. See Reading errors and warnings.

A scheduled job needs no agent. It runs the CLI on the same templates:

boardplot render weekly-orders.json --rows exports/orders.csv \
  --columns category=week,series=channel,value=orders \
  --format png --out "out/$(date +%F)" --quiet

It writes out/<date>/weekly-orders.png, named after the template's name, and prints {"ok":true,"outputs":[...]} with the file path. The CLI exits 1 when it refuses the input, for example a renamed column (missing-column), and 2 for an internal error. Let the job fail on a non-zero exit.

Tips:

Limits:

Worked example: docs/examples/recurring-report is a weekly business review. render.sh, the CLI script for a scheduled job, draws three templates from three warehouse exports, including a table that computes the week-over-week, year-over-year and plan changes, and writes one page to send.

Weekly business review with revenue by week, a channel table and a region variance