add_chart
Add a chart to a PowerPoint slide with custom categories, series, axis titles, colors, and legend. Supports column, bar, line, area, and scatter charts with data labels.
Instructions
Add a chart to a slide with comprehensive formatting options.
x_axis_title labels the CATEGORY axis and y_axis_title labels the VALUE axis, whatever the chart's orientation — the names are not screen directions. On column, line and area charts the category axis is the horizontal one, so x/y read as expected. On a BAR chart the bars run sideways: the category axis is VERTICAL and the value axis HORIZONTAL, so x_axis_title appears on the vertical axis. Naming a bar chart's axes by where they look on screen is the usual way these two end up swapped.
A 'scatter' chart is the exception to both: it has no category axis, so pass its x values (as numbers) in categories and the matching y values in series_values. Use 'line_markers' when the horizontal axis is really a list of labels.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | Yes | ||
| left | Yes | ||
| title | No | ||
| width | Yes | ||
| height | Yes | ||
| categories | Yes | ||
| chart_type | Yes | ||
| has_legend | No | ||
| slide_index | Yes | ||
| color_scheme | No | ||
| series_names | Yes | ||
| x_axis_title | No | ||
| y_axis_title | No | ||
| series_values | Yes | ||
| has_data_labels | No | ||
| legend_position | No | right | |
| presentation_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |