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
- Claude Code and Codex: install the plugin. It adds the boardplot MCP server and the
boardplot-chartskill. See AI agents in the README. - Other MCP clients: install the package globally and add the stdio server
boardplot-mcp. See MCP setup for the configuration. - React apps: follow React installation.
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:
- Give the data as a file. Name a CSV or JSON export in the prompt, for example
data/orders.csv. For a supported row mapping, the agent passes the file asrowsFile, so the numbers go directly into the chart. Other chart data shapes go inspec.data. See Rows as data. - Name the destination. Say "for a slide", "for a Word report" or "for a dashboard". The agent then sets the
target, which sets the type sizes for that medium. See Sizing. - Give your brand colors. Give the hex codes of your highlight and series colors, or a theme file. The agent passes them as a theme, for example
{ "preset": "standard", "overrides": { "color": { "highlight": "#0B5CAD" } } }. See the theme reference. - Say what each chart should show. A title that states the finding, such as "Online orders keep growing", gives a better chart than "Orders by week".
React installation
In an existing React project, install boardplot:
npm install boardplotBoardplot 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:
- Reads the data from your file, or from the chart it replaces.
- Writes the spec, using
boardplot_describewhen the chart contract is unfamiliar. - Calls
boardplot_renderwithtarget: "slide",format: "png"and the size of the picture box, for exampleoptions.size: { "width": 660, "height": 372, "unit": "pt" }. - 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:
- Give the size of the picture box, or say "full slide". A box that is too small for the chart is refused, and the error's
suggestnames the size that fits, for example "Pass height 372pt.". - Ask for SVG instead of PNG when the deck stays in PowerPoint. A
slideSVG carries its size in pt and stays sharp at any zoom. - For a dark slide background, ask for a dark preset such as
standard-dark. A transparent background keeps the theme's background color in the label halos.
Limits:
- The charts are pictures. Colleagues cannot edit their data in PowerPoint. To change a chart, ask the agent to draw it again.
- Keynote: the agent builds a
.pptxfile, and Keynote opens it. - Google Slides does not insert SVG files. Use PNG there.
- A PNG draws with the fonts installed on the machine that renders. For a brand font, see Custom fonts.
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.


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:
- Analyzes the data and decides which finding each chart shows.
- Calls
boardplot_renderwithreturn: ["reading", "svg"]. UsesrowsFilewhen the chart supports the file's row mapping, or suppliesspec.data. The answer carries the chart's SVG markup insvg. - Puts each SVG inline in the page. The page needs no script and loads nothing from the network to show the charts.
- Reads the
readingof each render, the numbers boardplot computed (totals, differences, growth rates), and uses them in the text, so text and chart agree.
Tips:
- Ask the agent to state the finding in each chart title.
- Ask it to check the warnings of each render, such as
label-hidden, before it writes the page. - Say the column width of the page if it is not about 720 px. The agent renders at that width instead of shrinking a wider chart.
Limits:
- The SVG is a static image: no hover cards or filters. Those need the React components.
- The SVG names the theme's font stack and embeds no font. The preset themes use system fonts. A brand web font must be loaded by the page.
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.

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:
- Chooses chart types from the requested result. Calls
boardplot_listwhen the type is uncertain andboardplot_describewhen its fields are unfamiliar. - Uses the per-type components, such as
ColumnChartfromboardplot/react/column, withsize="container", so each chart lays out in its card. - Wraps the page in
BoardplotThemewithtarget="dashboard"and your theme, so every chart shares one look. - 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:
- Inspect the component's refusals and warnings in the rendered page. MCP can check a standalone spec when needed. A separate MCP render is not required to build a React chart.
- Name the chart for each card if you know it, for example "a waterfall for the margin bridge".
- When you move a dashboard, ask the agent to list each old chart with the boardplot type it chose.
Limits:
- React 18 or 19. The package has ES module entries only.
boardplot_listnames chart forms that boardplot does not draw. The agent keeps those charts in the old library or proposes another type.- A parent that takes its width from its content keeps the chart at its fallback width. See container sizing.
- A strict content security policy needs a style nonce. See content security policy.
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.

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:
- Give the page format and margins, or the text column width.
- Ask for the
printtarget. Areportchart in print keeps screen type sizes.
Limits:
- The charts are pictures. Colleagues cannot edit their data in Word.
- A PNG draws with the fonts installed on the machine that renders.
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.

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)" --quietIt 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:
- Keep the templates in the repository. Each run then draws the same charts with new data.
- Give every template a
name. It names the output file. Without it each chart writeschart.png, and with--overwritethe next chart replaces it. - Name every series with its label in the template. A series that only the rows name prints its raw id.
- Write each run to a dated folder, or pass
--overwrite. A taken file name otherwise gets-2.
Limits:
- The MCP server reads
rowsFileonly from its allowed folders: the client's roots, its working directory, the system temp folder and the folders inBOARDPLOT_ROWS_ROOTS. Other paths are refused withrows-outside-roots. - PNG needs
@resvg/resvg-js, an optional dependency, or Chrome. On Linux, resvg also needs one of the fonts listed in the manual. Without those fonts, boardplot tries Chrome. If Chrome is unavailable too, the render returns SVG withraster-fonts-missing. See PNG output. - A CSV with grouping marks in numbers, such as
1.234,5, is refused. Export plain numbers.
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.
