Export chart
export_chartExport a Datawrapper chart as PNG, SVG, PDF, or a ZIP for self-hosting. Choose print-ready CMYK, transparent backgrounds, dark mode, custom dimensions, or vector output.
Instructions
Datawrapper: export a chart as PNG, SVG or PDF (print quality, CMYK, transparent background, dark mode, custom size), or as a ZIP with index.html and the scripts to host the published chart yourself. PNG is returned as an image; SVG/PDF/ZIP as an embedded resource. In local (stdio) mode save_to writes the file into the configured export directory. SVG/PDF require a paid Datawrapper plan. Uses 1 export from the monthly quota.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chart_id": "<chart_id>"
},
"name": "export_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dark | No | ||
| logo | No | ||
| mode | No | PDF color mode (cmyk for print). | |
| unit | No | ||
| zoom | No | PNG pixel density (default 2 = retina). | |
| plain | No | Only the chart, without title/description/footer. | |
| scale | No | PDF scale factor. | |
| theme | No | Render with another theme without changing the chart. | |
| width | No | Width in `unit` (default 600 px). | |
| format | No | Default png. zip: self-hosting package of the published chart (size options do not apply). | |
| height | No | Height or 'auto' (default). | |
| logo_id | No | Which logo to show when the theme defines several. | |
| save_to | No | stdio only: file name inside DW_EXPORT_DIR (default ./exports). | |
| chart_id | Yes | ||
| ligatures | No | Typographic ligatures (default true). | |
| full_vector | No | SVG/PDF: export everything as vectors, including the basemap of locator maps (otherwise raster). Tilted maps, basemap labels and 3D buildings stay raster. | |
| transparent | No | ||
| border_color | No | ||
| border_width | No |