Reputation: 6855
EmbeddedChartBuilder allows to set range out of sheet:
builder.addRange(sheet.getRange('A1:A2'))
Is there way to set chart data without a range? Something like this seems should be reasonable:
builder.setData([1, 2, 3])
Upvotes: 0
Views: 269
Reputation: 50799
It is not possible to set values directly from a array to Embedded Chart builder
.
Charts service: Static Server side charts
Use Charts
class to create a datatable and use it to create a server side chart. This could then be inserted as a static image in the spreadsheet.
Html Charts: Live charts from Google viz Use google-visualization(Google charts) to create a live html chart and show it in the sidebar/modal dialogs.
Google sheets range:
Set the array to a range in sheets and add that range to embedded chart builder.
Upvotes: 2