Class ContainerInfo

容器資訊

存取工作表中的圖表位置。可以使用 EmbeddedChart.modify() 函式更新。

const sheet = SpreadsheetApp.getActiveSheet(); const chart = sheet.getCharts()[0]; const modifiedChart = chart.modify().setPosition(5, 5, 0, 0).build(); sheet.updateChart(modifiedChart);

方法

方法傳回類型簡短說明
getAnchorColumn()Integer圖表的左側會錨定在這個資料欄中。
getAnchorRow()Integer圖表的頂端會固定在這個資料列中。
getOffsetX()Integer圖表左上角與錨定欄的偏移量 (以像素為單位)。
getOffsetY()Integer圖表左上角與錨定列的偏移量 (以像素為單位)。

內容詳盡的說明文件

getAnchorColumn()

圖表的左側會錨定在這個資料欄中。

回攻員

Integer:以 1 為索引的資料欄 (也就是說,C 欄是 3)。


getAnchorRow()

圖表的頂端會固定在這個資料列中。

回攻員

Integer:以 1 為起始的列 (也就是說,第 5 列會傳回 5)。


getOffsetX()

圖表左上角與錨定欄的偏移量 (以像素為單位)。

回攻員

Integer:圖表左上角的水平偏移量 (以像素為單位)。


getOffsetY()

圖表左上角與錨定列的偏移量 (以像素為單位)。

回攻員

Integer:圖表左上角的垂直偏移量 (以像素為單位)。