I am adding charts to a Google Sheet using Google Script
var chart = sheet.newChart()
.setChartType(Charts.ChartType.BAR)
.addRange(sheetdata.getRange("E2:E99"))
.setPosition(5, 5, 0, 0)
.setOption("title", "Leads")
.build();
sheet.insertChart(chart);
Aggragate
How do you set the Aggregate from Google Script. I have looked in the doco but cannot see it.
Any ideas welcome.