Keynote: add chart
keynote_add_chartAdd a chart to an existing Keynote slide from row/column data, with options for chart type and grouping. Preview changes on a copy before applying.
Instructions
Add a chart to a slide from data. rows = series names, columns = category names, data = one list of numbers per row (rows × columns). type: bar | stacked_bar | horizontal_bar | stacked_horizontal_bar | line | area | stacked_area | pie | scatter (or *_3d). group_by: row | column. Text and other charts are verified untouched. dry_run=true previews the change on a copy without touching the file. Use for a chart on an existing slide. In a new deck, put the chart in keynote_build_deck's outline instead; for exact numbers use keynote_add_table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | One list of numbers per row name, each as long as columns. | |
| path | Yes | Path to the .key deck (absolute, or starting with ~). | |
| rows | Yes | Row names, e.g. ["2025", "2026"] (series when group_by="row"). | |
| type | No | bar | stacked_bar | horizontal_bar | stacked_horizontal_bar | line | area | stacked_area | pie | scatter (or a *_3d variant). | bar |
| slide | Yes | Slide number, 1-based (keynote_list_slides lists them). | |
| columns | Yes | Column names, e.g. ["Q1", "Q2", "Q3"]. | |
| dry_run | No | true = make the change on a throwaway copy, run every check, and return what would change; the file itself is not touched. Use it before broad or risky edits and show the user. | |
| group_by | No | row (each row is a series) | column. | row |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||