I'm trying to create a column chart in a google app script. The chart is created from a google sheet that I have. The chart appears as it should, but I'd like to make the label for the x-axis vertical. The chart that's being returned is being added to a StackPanel object. Here's the code I've created for the chart:
function createXPLeaderboard() {
var sheet = pointsSheet.getSheets()[1];
var cell = sheet.getRange("A1");
cell.setFormula("=QUERY(Sheet1!B1:T29, \"select D, E where D <> 'Avatar' order by E\", 1)");
var options = {'title':'Experience Points',
'width':'927',
'height':'510'};
var chart = Charts.newColumnChart()
.setDataTable(sheet.getDataRange())
//.setColors(["green", "red"])
//.setDimensions(1000, 400)
.setTitle("Experience Pointsn")
.setOption('option', options)
.build();
return chart;
}
The options are not working. I can't find any documentation on how to set them up. It seems that every site I see examples is for javascript embedded in HTML. I'm not a web developer, so my understanding about how everything works is pretty low :/