ppt_add_chart
Add a native Excel-backed chart to a PowerPoint slide by specifying chart type, categories, and series data. Supports column, bar, line, pie, and area charts.
Instructions
Add a native Excel-backed chart to a slide in a PowerPoint presentation.
Supported chart types:
- 'column_clustered', 'column_stacked', 'column_stacked_100'
- 'bar_clustered', 'bar_stacked', 'bar_stacked_100'
- 'line', 'line_markers', 'line_stacked'
- 'pie', 'pie_exploded', 'doughnut'
- 'area', 'area_stacked'
Args:
file_path: Path to the PowerPoint file (.pptx).
slide_idx: 0-based index of the slide.
chart_type: Chart type name (e.g., 'column_clustered', 'line', 'pie', 'bar_clustered').
categories: Category labels along the category axis (e.g. ['Q1', 'Q2', 'Q3', 'Q4']).
series_data: List of series dicts, each with 'name' (str) and 'values' (list of numbers).
Example: [{'name': 'Revenue', 'values': [100, 120, 140, 160]}]
title: Optional chart title.
left: Left offset position in inches (default: 1.0).
top: Top offset position in inches (default: 1.5).
width: Chart width in inches (default: 8.0).
height: Chart height in inches (default: 4.5).
backup: If True, create a backup of the original file before modifying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| left | No | ||
| title | No | ||
| width | No | ||
| backup | No | ||
| height | No | ||
| file_path | Yes | ||
| slide_idx | Yes | ||
| categories | Yes | ||
| chart_type | Yes | ||
| series_data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |