sheets_create_chart
Create a chart in a Google Sheets spreadsheet with specified type, position, and data series. Customize with title, axes, legend, and more.
Instructions
Create a chart in a Google Sheets spreadsheet. Sheet names with spaces should be quoted in ranges (e.g., "My Sheet"!A1:B5). Position uses overlayPosition with anchorCell containing sheetId, rowIndex, and columnIndex.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Chart title (optional) | |
| legend | No | Legend configuration | |
| series | Yes | Array of data series for the chart | |
| altText | No | Alternative text for accessibility | |
| leftAxis | No | Left (Y) axis configuration | |
| position | Yes | Chart position settings with overlay position. Use overlayPosition.anchorCell.sheetId to specify the sheet. | |
| subtitle | No | Chart subtitle (optional) | |
| chartType | Yes | Type of chart to create | |
| rightAxis | No | Right (Y) axis configuration | |
| domainAxis | No | Domain (X) axis configuration | |
| domainRange | No | Optional domain range in A1 notation (e.g., "A2:A5" or "My Sheet"!A2:A5). If not provided, column A will be used | |
| spreadsheetId | Yes | The ID of the spreadsheet (found in the URL after /d/) | |
| backgroundColor | No | Chart background color |