Many Chart options for EmbeddedChartBuilder.setOption() function not available to Google Apps Script
问题 I've created a simple script to create a chart on a sheet, using Sheet#newChart function buildVitalsChart(){ var ss = SpreadsheetApp.getActive(); var sh = ss.getSheetByName('Vitals Chart'); var rg = sh.getRange('A1:E'); var allChts = sh.getCharts(); var idA = []; for(var i = 0; i < allChts.length; i++){ sh.removeChart(allChts[i]); } SpreadsheetApp.flush(); var cht = sh.newChart() .asLineChart() .addRange(rg) .setPosition(2, 6, 0, 0) .setOption('title', 'Vitals') .build() sh.insertChart(cht);