Create a chart from a template with your data and a few knobs — returns an inline preview
create_from_templateThe template's design, your data, your words. knobs are the template's settings (get_template shows the schema): theme light|dark|editorial, dataType gradient|buckets|categories and surroundings true|false (then waterColor, landColor) for maps, title/description/source/brand {text, fontFamily, fontSize, color}, backgroundColor, and the scale knobs for the dataType (colormap and direction, range, breaks or classes, categoryColors/categoryOrder). data = {columns: [{id, type}], rows: [[…]]}: use the template's column ids, or exactly two columns (region first, value second) for a map. publish: true makes the URLs live in the same call. A success means it validated AND rendered — look at the preview. Region values that match nothing come back as a 400 listing each with its closest real codes, before anything is made — no separate check needed. config is the advanced path: the engine's settings, merged after the knobs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Typed columns + row-major rows, shaped like the template's example | |
| knobs | No | The template's knobs — get_template returns their schema | |
| config | No | ADVANCED: engine settings deep-merged after the knobs | |
| publish | No | true = published and live in this call; omit while you iterate | |
| template | Yes | Template id or slug from list_templates, or the page address (sweden/municipalities, us/texas/counties, london/wards) when you know the place |