microcharts
v0.1.17Find, wire, and render microcharts — word-sized React charts with generated alt text.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
find_microchart Find a chart by question
Rank microcharts chart types against a plain-language question about data ("is it trending?", "error budget", "part to whole"). Returns candidates with the reason each matched. Start here when you know the question, not the chart.
| Parameter | Type | Description |
|---|---|---|
question * | string | What the data needs to show, in plain language. |
dataShape | string | Optional filter, e.g. "number[]". |
limit | integer | Max results (default 6). |
get_microchart Get a chart's props + example
Full wiring detail for one chart by slug: import paths, its props plus the shared props, data shape, best/avoid guidance, a copy-runnable example, and `sample` — the example as JSON props you can pass straight to render_microchart.
| Parameter | Type | Description |
|---|---|---|
slug * | string | Chart slug, e.g. "sparkline". |
render_microchart Render a chart to SVG
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.
| Parameter | Type | Description |
|---|---|---|
type * | string | Chart slug, e.g. "sparkline". |
data | Primary series (array), or a keyed object for charts that take one; omit for scalar charts. | |
format | string | `svg` (default) or `bare`. |
props | object | Other props (value, target, color, …). |