I am using the EmbeddedChartBuilder to create charts dynamically, which is working fine. Basic example:
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = spreadsheet.getSheetByName('Charts');
var chart = sheet.newChart()
.setPosition(1, 1, 0, 0)
.setChartType(Charts.ChartType.AREA)
.addRange(spreadsheet.getSheetByName('Data').getRange("A1:A10"))
.build();
sheet.insertChart(chart);
However I need to customize the charts using the setOption
method. The documentation says:
Sets advanced options for this chart. See https://developers.google.com/chart/interactive/docs/reference for what options are available.
But following the link they give (/chart/interactive/docs/reference), the only thing I see is this:
Trying to find vAxis
doesn't lead anywhere. Looking at another page on advanced chart customization, once again I see examples but not the reference:
var options = {
width: 400,
height: 240,
title: 'Toppings I Like On My Pizza',
colors: ['#e0440e', '#e6693e', '#ec8f6e', '#f3b49f', '#f6c7b6']
};
Where is the list of all available options for the setOption
method?
You can find options for various chart types on the Guides page (instead of the Reference page) of the link you posted. For example, options for Bar chart type are here: https://developers.google.com/chart/interactive/docs/gallery/barchart#configuration-options