Stay organized with collections Save and categorize content based on your preferences.
ContainerInfoAccess the chart's position within a sheet. Can be updated using the EmbeddedChart.modify()
function.
const sheet = SpreadsheetApp.getActiveSheet(); const chart = sheet.getCharts()[0]; const modifiedChart = chart.modify().setPosition(5, 5, 0, 0).build(); sheet.updateChart(modifiedChart);Methods Method Return type Brief description
getAnchorColumn()
Integer
The chart's left side is anchored in this column. getAnchorRow()
Integer
The chart's top side is anchored in this row. getOffsetX()
Integer
The chart's upper left hand corner is offset from the anchor column by this many pixels. getOffsetY()
Integer
The chart's upper left hand corner is offset from the anchor row by this many pixels. Detailed documentation getAnchorColumn()
The chart's left side is anchored in this column.
ReturnInteger
— 1-indexed column (that is, column C is 3).
getAnchorRow()
The chart's top side is anchored in this row.
ReturnInteger
— 1-indexed row (that is, row 5 returns 5).
getOffsetX()
The chart's upper left hand corner is offset from the anchor column by this many pixels.
ReturnInteger
— The horizontal offset in pixels for the upper left hand corner of the chart.
getOffsetY()
The chart's upper left hand corner is offset from the anchor row by this many pixels.
ReturnInteger
— The vertical offset in pixels for the upper left hand corner of the chart.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-12 UTC."],[[["`ContainerInfo` allows you to access and update an embedded chart's position within a Google Sheet."],["You can get the chart's anchor column and row, which determine its main positioning."],["`OffsetX` and `OffsetY` properties provide pixel-level control over the chart's placement relative to the anchor point."],["Use the `modify()` and `setPosition()` functions along with `updateChart()` to change the chart's position programmatically."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4