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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"slide_index": "<slide_index>",
"chart_type": "<chart_type>",
"left": "<left>",
"top": "<top>",
"width": "<width>",
"height": "<height>",
"categories": "<categories>",
"series_names": "<series_names>",
"series_values": "<series_values>"
},
"name": "add_chart"
}
}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 |