Render a chart to SVG
render_microchartRender a chart to a self-contained SVG with embedded styles and generated alt text, suitable for inline display in model replies or table cells.
Instructions
Render a chart to a finished, self-contained SVG (styles embedded) plus its generated alt text — for surfaces that can't run React. Pass the series as data; put other props (value, target, curve, color, width) in props. Each chart takes its own data shape — get_microchart returns a valid sample to adapt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Primary series (array), or a keyed object for charts that take one; omit for scalar charts. | |
| type | Yes | Chart slug, e.g. "sparkline". | |
| props | No | Other props (value, target, color, …). | |
| format | No | `svg` (default) or `bare`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | Yes | ||
| width | Yes | ||
| height | Yes | ||
| library | Yes | ||
| summary | Yes | The chart's generated accessible name — its alt text. | |
| mimeType | Yes |