This article is related to the following error message:
- Error: There was an error updating the chart. Google returned 400: Requested writing within range
(Cell Range), but tried writing to column
- Example message:
This error message occurs when dynamic content produces extra columns that are not included in a chart. The number of columns returned by your dynamic content must equal the number of columns your chart will use. Any additional data columns will result in this error being returned.
For example, let's say I have the following chart in a template:
The source data looks like the following: (Click into the menu in the upper right of the chart and click "Open Source" to access)
Note the Series included in the chart. If our dynamic content returns a "Period 3" column of data in column D this error will appear. The number of columns returned by your dynamic content must be equal to the number of columns your chart is configured to use.
To resolve this issue, we simply add a 3rd Series of data to the chart with our Period 3 data.
This issue can also occur when "Use column A as labels" is not selected. Navigate to the chart editor as demonstrated above and scroll down to the bottom. Ensure "Use column A as labels" is selected.