Add Chart Slide to PowerPoint
office_ppt_add_chartGenerate a PowerPoint slide with a chart from data series. Choose from area, bar, bubble, doughnut, line, pie, radar, or scatter charts with optional legends, titles, and colors.
Instructions
Create a new PowerPoint (.pptx) with one slide containing a chart.
Args:
filePath (string): Path where the presentation will be created
chart (object): Chart configuration
type (string): Chart type: "area" | "bar" | "bar3D" | "bubble" | "doughnut" | "line" | "pie" | "radar" | "scatter"
data (array): Data series. Each series has:
labels (string[]): Category labels
name (string): Series name
values (number[]): Data values
options (object, optional):
showLegend (boolean): Show legend
showTitle (boolean): Show title
chartColors (string[]): Custom color palette
barDirection ("bar" | "col"): Bar direction (for bar charts)
barGrouping ("clustered" | "stacked" | "percentStacked"): Bar grouping
dataLabelFormat (string): Data label format code (e.g. "#,##0")
Examples:
Use when: "Create a bar chart showing quarterly sales data"
Use when: "Generate a pie chart of market share distribution"
Use when: "Make a line chart of revenue trends over time"
Not for: Simple text slides with bullets (use office_create_powerpoint instead)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path for the new PowerPoint file | |
| chart | Yes |