我正在尝试调整当前代表3条线的区域图,以在两条线之间填充颜色。我将第一行的透明度更改为0%。第二条线的阴影一直延伸到x轴,最后一条线也是如此。这是我的脚本创建图表...
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('SPREADSHEET NAME'), true);
var sheet = spreadsheet.getActiveSheet();
var chart = sheet.newChart()
.asAreaChart()
.addRange(spreadsheet.getRange('\'DATA\'!B3:B15'))
.addRange(spreadsheet.getRange('\'DATA\'!I3:K15'))
.setMergeStrategy(Charts.ChartMergeStrategy.MERGE_COLUMNS)
.setTransposeRowsAndColumns(false)
.setNumHeaders(-1)
.setBackgroundColor('#f9f9f9')
.setOption('legend.position', 'bottom')
.setOption('title', 'TITLE')
.setOption('legend.textStyle.fontSize', 14)
.setOption('legend.textStyle.color', '#000000')
.setOption('legend.textStyle.bold', false)
.setOption('titleTextStyle.color', '#000000')
.setOption('titleTextStyle.alignment', 'center')
.setOption('titleTextStyle.bold', true)
.setOption('hAxis.slantedText', true)
.setOption('hAxis.slantedTextAngle', 0)
.setOption('hAxis.textStyle.fontSize', 10)
.setOption('hAxis.textStyle.color', '#000000')
.setOption('hAxis.textStyle.bold', true)
.setOption('vAxes.0.textStyle.fontSize', 10)
.setOption('vAxes.0.textStyle.color', '#000000')
.setOption('vAxes.0.textStyle.bold', true)
.setOption('series.0.color', '#b4a7d6')
.setOption('series.1.areaOpacity', 0)
.setOption('width', 807)
.setPosition(29, 10.9, 26, 19)
.build();
sheet.insertChart(chart);