Google 스크립트를 사용 중이므로 Default Services을 통해 Google 시각화 API를 사용할 수 있습니다. 여기에는 묻는 결과를 얻을 수있는 TableChartBuilder이 포함됩니다.
여기 an example은 차트를 게시하는 방법을 설명하는 Visualize Your Data: Charts in Google Apps Script!의 차트 예제를 기반으로합니다.
function doGet() {
// Populate the DataTable. We'll have the data labels in
// the first column, "Release", and then add two data columns,
// for "Income" and "Expenses"
var dataTable = Charts.newDataTable()
.addColumn(Charts.ColumnType.STRING, "Release")
.addColumn(Charts.ColumnType.NUMBER, "Income")
.addColumn(Charts.ColumnType.NUMBER, "Expenses")
.addRow(["1.0", 60, 55])
.addRow(["10.2", 50, 60])
.addRow(["2.10", 100, 50])
.addRow(["12.0.1", 70, 60])
.addRow(["2.0.0.142", 30, 50])
.addRow(["2.0.0.1_2", 114, 75])
.build();
// Build the chart.
var chart = Charts.newTableChart()
.setDataTable(dataTable)
.build();
// Add our chart to the UI and return it so that we can publish
// this UI as a service and access it via a URL.
var ui = UiApp.createApplication();
ui.add(chart);
return ui;
}