Repository navigation
Recipes
Each recipe ran as shown from a fresh clone of 0.8.4 on 2026-10-03, on Windows 11 with Python 3.14.6. The renderers were vl-convert 1.9.0, matplotlib 3.11.2, python-pptx 1.0.2, openpyxl 3.1.5 and python-docx 1.2.0. The data files are the ones on Home and How charts are picked and built: regions.csv (sales for North, South and East) and sales.csv (the same regions split into products A and B). With the skill installed, you would ask the agent for each of these in a sentence, and it would run the same commands.
A Mermaid block appended to a report renders in place on GitHub, GitLab and Obsidian. Given this report.md.
# Quarterly report
Sales rose in the South.$ python scripts/cw.py build --chart bar --target mermaid --data regions.csv --x region --y sales --title "South leads on sales" >> report.md
$ cat report.md
# Quarterly report
Sales rose in the South.
```mermaid
xychart-beta
title "South leads on sales"
x-axis ["North", "South", "East"]
y-axis "sales" 0 --> 250
bar [200, 225, 130]
```A note about combined rows would go to standard error, so it stays out of the file. The skill puts the block right after the claim it supports, not at the end.
The pptx target writes a python-pptx script, and render runs it. The chart in the deck is a real PowerPoint chart, with its data, not a picture:
$ python scripts/cw.py build --chart column --target pptx --data sales.csv --x region --y sales --series product --out chart.py --png deck.pptx
wrote chart.py (993 chars)
$ python scripts/cw.py render --target pptx --in chart.py --out deck.pptx
wrote deck.pptx (34722 bytes)The size changes by a few bytes from run to run, because the file is a zip with timestamps. The deck was not opened in PowerPoint.
Word charts cannot be written with python-docx, so the docx target renders the Vega-Lite chart to a PNG and writes a document with a heading, the picture six inches wide, and a caption. It needs vl-convert-python and python-docx:
$ python scripts/cw.py build --chart bar --target docx --data regions.csv --x region --y sales --title "South leads on sales" --out chart.py --png report.docx
wrote chart.py (1001 chars)
$ python scripts/cw.py render --target docx --in chart.py --out report.docx
wrote report.docx (52763 bytes)For a longer document, render the PNG yourself (next recipe) and place it with your own tools.
These hosts reject or spoil SVG, so render a PNG at twice the size. The dumbbell shows two values per category, here from cities.csv with before and after columns (Austin 10 to 14, Dallas 12 to 11, Houston 9 to 15):
$ python scripts/cw.py build --chart dumbbell --target vega-lite --data cities.csv --x city --y before --y2 after --out dumbbell.vl.json
wrote dumbbell.vl.json (1059 chars)
$ python scripts/cw.py render --target vega-lite --in dumbbell.vl.json --out dumbbell.png
wrote dumbbell.png (186097 bytes)Keep dumbbell.vl.json beside the PNG, so the chart can be rebuilt when the numbers change.
$ python scripts/cw.py build --chart grouped-bar --target xlsx --data sales.csv --x region --y sales --series product --out chart.py --png book.xlsx
wrote chart.py (747 chars)
$ python scripts/cw.py render --target xlsx --in chart.py --out book.xlsx
wrote book.xlsx (6617 bytes)As with PowerPoint, the size varies by a byte or two, and the workbook was not opened in Excel.
Mermaid has no funnel, and ECharts does. --html writes a page that loads ECharts from cdn.jsdelivr.net. Given funnel.csv with the stages Visited 12000, Signed up 3100, Activated 1450 and Paid 380:
$ python scripts/cw.py build --chart funnel --target echarts --data funnel.csv --x stage --y users --html --out funnel.html
wrote funnel.html (966 chars)The page was written, not opened in a browser.
pick --json gives the ranking as data:
$ python scripts/cw.py pick --question "share of budget by department" --shape n,q --json | python -c "import json,sys; print(json.load(sys.stdin)['picks'][0]['slug'])"
donutThe donut's entry rules it out for more than five slices or for slices of similar size (show donut --section not), and the skill reads that section before it builds. A script that takes the top pick without that check gets what the score says.
Saved as loop.sh.
for t in mermaid terminal quickchart; do
python scripts/cw.py build --chart bar --target $t --data regions.csv --x region --y sales --out "bar.$t.txt"
done$ sh loop.sh
wrote bar.mermaid.txt (147 chars)
wrote bar.terminal.txt (142 chars)
wrote bar.quickchart.txt (481 chars)
$ cat bar.terminal.txt
sales by region
North ███████████████████████████ 200
South ██████████████████████████████ 225
East █████████████████ 130This wiki describes chartwright 0.8.4 (tag v0.8.4, commit 34b1871) and was last updated on 2026-10-03. The plugin is MIT licensed. Report problems in the issues.
Using it
- Getting started
- How the skills work
- How charts are picked and built
- Render targets
- Commands
- Recipes
- Works with
- FAQ
The releases
Contributing
Elsewhere