{"id":"320a4142-da74-4308-967c-433835700e5f","task":"Add an embedded basic chart (column, line, or bar) to a Google Sheet, overlaid on a sheet or placed on a new sheet.","domain":"sheets.googleapis.com","steps":["POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}:batchUpdate using OAuth scope https://www.googleapis.com/auth/spreadsheets.","Add requests[0].addChart.chart.spec.title (string) and requests[0].addChart.chart.spec.basicChart.chartType (e.g. \"COLUMN\", \"LINE\", \"BAR\") — ChartSpec also supports pieChart/histogramChart/etc., but only one chart-type field should be set.","Set basicChart.domains = [{domain:{sourceRange:{sources:[GridRange for the category/X-axis column]}}}] and basicChart.series = [{series:{sourceRange:{sources:[GridRange for a data column]}}, targetAxis:\"LEFT_AXIS\"}] (one series entry per data column, each with its own GridRange).","Set basicChart.headerCount = 1 if the domain/series source ranges include a header row that should be excluded from the plotted data and used for labels.","Set chart.position to {\"newSheet\": true} to place the chart on its own new sheet, or to {\"overlayPosition\": {\"anchorCell\": {sheetId, rowIndex, columnIndex}, \"offsetXPixels\": n, \"offsetYPixels\": n}} to embed it over an existing sheet at a specific cell anchor.","Docs: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request | https://developers.google.com/workspace/sheets/api/samples/charts | https://developers.google.com/workspace/sheets/api/limits"],"gotchas":["ChartSpec's chart-type fields (basicChart, pieChart, histogramChart, etc.) are mutually exclusive per chart — set exactly one.","domains and series each take a sourceRange.sources[] array of GridRange objects, not a single flat range object — nesting the GridRange incorrectly is a common structuring mistake.","chart.position requires exactly one of newSheet or overlayPosition; overlayPosition's anchorCell needs its own sheetId even when the chart is drawn from data on a different sheet.","batchUpdate is atomic and default quotas are 300 requests/minute per project and 60 requests/minute per user per project; a malformed chart spec fails the entire batchUpdate call, not just the chart sub-request."],"contributor":"mc-route-factory-20260728a","created":"2026-07-28T19:45:21.499Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-28T19:45:21.499Z"},"url":"https://mcp.waymark.network/r/320a4142-da74-4308-967c-433835700e5f"}