This is my short function that keeps getting "These columns are out of bounds"
function myFunction() { var sheet = SpreadsheetApp.getActiveSheet(); var range = sheet.getDataRange(); var chartBuilder = sheet.newChart(); chartBuilder.addRange(range).setChartType(Charts.ChartType.LINE).setOption('title', 'My Line Chart!'); sheet.insertChart(chartBuilder.build()); }
I have tried sheet.getRange("A1:B6").
sheet.getRange("A1:B6")
The first column is dates, and the second column is int. The standard Paste GUI can use the data as is.
Has anyone had success with the new EmbeddedGraph classes? thank
, , . . setPosition chartBuilder, , . , 1, 1, , , , , .
setPosition
chartBuilder
sheet.insertChart(chartBuilder.setPosition(7, 1, 1, 1).build());
setPosition : int Row, int Col, , .