Pin a chart onto a sheet
napkin_sheets_add_chartAdds a LIVE chart to a sheet — its SQL re-runs against the tabs on every view, so it never goes stale. Write the query with napkin_sheets_query first to confirm the shape (first column = x axis, numeric columns = series, or set x/series explicitly). Prefer aggregated queries (GROUP BY) — a chart of raw rows is rarely the answer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| sql | Yes | The SELECT to chart. | |
| type | Yes | ||
| title | Yes | Chart title. | |
| series | No | ||
| sheetId | Yes | Sheet id from napkin_sheets_list. | |
| stacked | No | Stack the series (bar/area only). | |
| workspace | No | Workspace slug. Personal tokens with no default workspace MUST pass this; tokens with a default can override per call. Ignored for workspace API keys. |