Repository navigation
Render Targets
A target is the form a chart takes: a Mermaid block, a web page, a picture, an office file, a URL or text for a terminal. Each one has a file in kb/targets/ with its syntax, limits and test record, and every chart file says how well each target can draw it: native, approx (approximately), image (only as a rendered picture) or none.
$ python scripts/cw.py targets
chartjs web tested x1 Web, canvas (Chart.js) [none]
d2 markdown untested D2 diagram (node-and-edge only) [d2]
docx office tested x1 Word document (PNG via python-docx) [python]
echarts web tested x1 Web, interactive (Apache ECharts) [none]
gdocs office tested x1 Google Docs (images via HTML import or Drive upload) [none]
gsheets office untested Google Sheets native chart (Sheets API EmbeddedChart) [none]
matplotlib image tested x1 Static image via Python (matplotlib and friends) [python]
mermaid markdown tested x1 Markdown (Mermaid) [mmdc]
observable-plot web untested Observable Plot (web, SVG marks) [browser]
plantuml markdown untested PlantUML chart (@startchart) [plantuml]
plotly web tested x1 Web, interactive (Plotly) [none]
pptx office tested x1 PowerPoint native chart (python-pptx) [python]
quickchart image tested x1 Chart as a URL image (QuickChart) [none]
terminal terminal tested x1 Terminal and plain chat (Unicode) [none]
vega-lite web tested x1 Web and static images (Vega-Lite) [vl_convert]
xlsx office tested x1 Excel native chart (openpyxl) [python]The last column is the renderer the target file names. What each target's build writes, and what render needs to finish it:
| Target | Use it for |
build writes |
render needs |
|---|---|---|---|
mermaid |
Markdown on GitHub, GitLab, Obsidian, Notion | a fenced mermaid block |
nothing to show it in those hosts; mmdc, or Node for npx, to make an SVG or PNG |
vega-lite |
web pages, and the default route to PNG, SVG and PDF | a Vega-Lite 6 spec (JSON); --html for a page |
vl-convert-python for PNG, SVG and PDF |
echarts |
web pages: sankey, sunburst, treemap, gauge, large data, dark mode | an ECharts option (JSON); --html for a page |
nothing (a page loads ECharts from a CDN) |
plotly |
web pages: candlestick, 3D, statistical charts | a Plotly figure (JSON); --html for a page |
nothing (a page loads Plotly from a CDN) |
chartjs |
web pages that already use Chart.js | a Chart.js config (JSON); --html for a page |
nothing (a page loads Chart.js from a CDN) |
observable-plot |
Observable notebooks and Framework sites | a Plot mark snippet; --html for a page |
a browser; no PNG |
matplotlib |
PNG or SVG when Vega-Lite cannot draw the chart | a Python script | matplotlib |
pptx |
an editable chart in PowerPoint | a Python script | python-pptx |
xlsx |
an editable chart in Excel, with its data sheet | a Python script | openpyxl |
docx |
a Word document with the chart as a picture and a caption | a Python script |
python-docx and vl-convert-python
|
gdocs |
Google Docs | no builder: use a quickchart URL or a PNG |
the Google Drive or Docs API, outside cw.py
|
gsheets |
a native Google Sheets chart | the values plus an addChart request (JSON) |
the Sheets API, outside cw.py
|
quickchart |
chat or email where an image link works | a Markdown image whose URL holds the whole chart | nothing (quickchart.io draws it) |
plantuml |
docs that already use PlantUML (@startchart, 1.2026.0 and later) |
PlantUML text |
plantuml; without it render prints a kroki.io link |
d2 |
a network or tree in a D2 document | D2 edges | the d2 program |
terminal |
a terminal, a chat reply, a commit message | block sparklines and bars | nothing |
build --target gdocs stops with gdocs has no builder: build a quickchart URL or a vega-lite PNG and follow kb/targets/gdocs.md.
build has code for these. Any other chart and target pair is written by the agent from the recipe in the chart's file (cw.py show <slug> --section build --target <target>).
| Target | Charts build writes |
|---|---|
| mermaid | line, multi-line, step, bar, column, area, grouped-bar (no legend), pie, donut, sankey, alluvial, quadrant, radar |
| vega-lite | line, multi-line, step, bar, column, grouped-bar, stacked-bar, stacked-bar-100, area, stacked-area, scatter, bubble, heatmap, histogram, boxplot, pie, donut, strip, dot, lollipop, dumbbell, slope, waterfall, calendar-heatmap, diverging-bar, small-multiples, bullet, range-band, connected-scatter, bump |
| echarts | line, multi-line, step, area, stacked-area, bar, column, grouped-bar, stacked-bar, stacked-bar-100, scatter, bubble, pie, donut, radar, funnel, sankey, alluvial, heatmap |
| plotly | line, multi-line, step, area, stacked-area, scatter, bubble, bar, column, grouped-bar, stacked-bar, pie, donut, histogram, boxplot, heatmap, waterfall, dumbbell, bullet |
| chartjs, quickchart | line, multi-line, area, step, bar, column, grouped-bar, stacked-bar, pie, donut, scatter, bubble, radar, polar-area |
| matplotlib | line, multi-line, step, area, bar, column, grouped-bar, scatter, histogram, pie, donut, boxplot, waterfall, dumbbell, bullet |
| pptx, xlsx | bar, column, grouped-bar, stacked-bar, stacked-bar-100, line, multi-line, area, stacked-area, pie, donut, radar, scatter, bubble |
| docx | everything vega-lite builds |
| gsheets | bar, column, grouped-bar, stacked-bar, stacked-bar-100, line, multi-line, area, stacked-area, step, scatter, pie, donut |
| plantuml | bar, column, grouped-bar, stacked-bar, line, multi-line, sparkline, area, stacked-area, scatter |
| observable-plot | line, multi-line, sparkline, step, connected-scatter, area, stacked-area, column, bar, grouped-bar, stacked-bar, stacked-bar-100, diverging-bar, lollipop, dot-plot, scatter, bubble, strip, beeswarm, boxplot, histogram, heatmap, correlogram, adjacency-matrix, calendar-heatmap, waffle, small-multiples, density-2d, hexbin, slope |
| terminal | line, sparkline, area, step, bar, column |
| d2 | network, tree, dendrogram |
This list comes from the skill's references/build-and-verify.md. The examples in this wiki ran the mermaid, vega-lite, echarts, matplotlib, pptx, xlsx, docx, quickchart and terminal builders. To list the charts a target can draw at all, natively or otherwise:
$ python scripts/cw.py list --target terminal
area change-over-time How does the volume of one measure change over time?
bar magnitude How big is each category, and which is largest?
column change-over-time How much was there in each period, and how do the totals compare period to period?
line change-over-time How does a value change over time, and how do a few series compare as they change?
small-multiples change-over-time How does the same pattern differ across many categories, each shown in its own small panel?
sparkline change-over-time What is the recent shape of a trend, at a glance, next to the number it belongs to?
stat-tile single-value What is the current value, and how has it changed?
step change-over-time When did a level change, and what was it in between?
table table What are the exact values, across several measures per row, and where are the patterns?chartwright was built and tested on one Windows PC. Each target file records where its build and render were proven, in a tested: list. In 0.8.4 every record is from Windows on 2026-09-18:
| Target | Record |
|---|---|
| mermaid | build and render to SVG and PNG through npx mermaid-cli; blocks placed in a real README |
| vega-lite | build and render to PNG and SVG through vl-convert 1.9; inspected |
| matplotlib | script built and PNG rendered with matplotlib 3.11; inspected |
| terminal | sparklines and block bars printed with UTF-8 forced |
| quickchart | URL built; the live URL returned a PNG |
| chartjs, echarts, plotly | JSON built and page written; page not opened in a browser |
| pptx | rendered a 34 KB deck; not opened in PowerPoint |
| xlsx | rendered a workbook; not opened in Excel |
| docx | rendered; the picture is in the file; not opened in Word |
| gdocs | a Doc was created from HTML with QuickChart images through a Drive connector; not checked by eye |
| gsheets, plantuml, d2, observable-plot | untested |
Untested means unproven, not broken. The chartwright skill tells you when a target is untested on your system and asks before it goes on. If it works for you, it can record the result with cw.py tested (see Commands), and a pull request with that change helps the next person. Failures are recorded the same way.
The runs behind this wiki (2026-10-03, Windows 11, Python 3.14.6) also rendered vega-lite to SVG and PNG, matplotlib to PNG, and wrote pptx, xlsx and docx files. None were opened in their programs.
From the README's Privacy section:
-
quickchartputs the chart, data included, in a quickchart.io URL. Anyone who opens the image fetches it from quickchart.io, so do not use it for private data. -
render --target plantumlwithout a localplantumlprints a kroki.io link that holds the diagram source. - The web page targets load their charting library from cdn.jsdelivr.net or cdn.plot.ly when the page is opened. The data stays in the page.
-
render --target mermaidwithoutmmdchasnpxdownload@mermaid-js/mermaid-cli@12.0.0from npm and run it locally.
This 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